HN에게 물어보세요: Taichi-Lang의 개발 빈도가 감소한 이유는 무엇입니까?

hackernews | | 🔧 개발도구
#오픈소스
원문 출처: hackernews · Genesis Park에서 요약 및 분석

요약

Taichi Lang은 고성능 수치 연산을 위해 Python에 내장된 오픈 소스 병렬 프로그래밍 언어로, JIT 컴파일러를 통해 연산 집약적인 코드를 GPU나 CPU 명령어로 변환합니다. Python과 유사한 문법과 NumPy 및 PyTorch와의 호환성을 제공하며, 실시간 물리 시뮬레이션과 AI 등 다양한 분야에서 활용됩니다. 또한 @ti.kernel 데코레이터를 사용해 병렬 실행을 위한 효율적인 기계어로 자동 컴파일하는 성능 최적화 기능을 갖추고 있습니다.

본문

pip install taichi # Install Taichi Lang ti gallery # Launch demo gallery Taichi Lang is an open-source, imperative, parallel programming language for high-performance numerical computation. It is embedded in Python and uses just-in-time (JIT) compiler frameworks, for example LLVM, to offload the compute-intensive Python code to the native GPU or CPU instructions. The language has broad applications spanning real-time physical simulation, numerical computation, augmented reality, artificial intelligence, vision and robotics, visual effects in films and games, general-purpose computing, and much more. - Built around Python: Taichi Lang shares almost the same syntax with Python, allowing you to write algorithms with minimal language barrier. It is also well integrated into the Python ecosystem, including NumPy and PyTorch. - Flexibility: Taichi Lang provides a set of generic data containers known as SNode (/ˈsnoʊd/), an effective mechanism for composing hierarchical, multi-dimensional fields. This can cover many use patterns in numerical simulation (e.g. spatially sparse computing). - Performance: With the @ti.kernel decorator, Taichi Lang's JIT compiler automatically compiles your Python functions into efficient GPU or CPU machine code for parallel execution. - Portability: Write your code once and run it everywhere. Currently, Taichi Lang supports most mainstream GPU APIs, such as CUDA and Vulkan. - ... and many more features! A cross-platform, Vulkan-based 3D visualizer, differentiable programming, quantized computation (experimental), etc. Prerequisites - Operating systems - Windows - Linux - macOS - Python: 3.6 ~ 3.10 (64-bit only) - Compute backends - x64/ARM CPUs - CUDA - Vulkan - OpenGL (4.3+) - Apple Metal - WebAssembly (experiemental) Use Python's package installer pip to install Taichi Lang: pip install --upgrade taichi We also provide a nightly package. Note that nightly packages may crash because they are not fully tested. We cannot guarantee their validity, and you are at your own risk trying out our latest, untested features. The nightly packages can be installed from our self-hosted PyPI (Using self-hosted PyPI allows us to provide more frequent releases over a longer period of time) pip install -i https://pypi.taichi.graphics/simple/ taichi-nightly Here is how you can program a 2D fractal in Taichi: # python/taichi/examples/simulation/fractal.py import taichi as ti ti.init(arch=ti.gpu) n = 320 pixels = ti.field(dtype=float, shape=(n * 2, n)) @ti.func def complex_sqr(z): return ti.Vector([z[0]**2 - z[1]**2, z[1] * z[0] * 2]) @ti.kernel def paint(t: float): for i, j in pixels: # Parallelized over all pixels c = ti.Vector([-0.8, ti.cos(t) * 0.2]) z = ti.Vector([i / n - 1, j / n - 0.5]) * 2 iterations = 0 while z.norm() < 20 and iterations < 50: z = complex_sqr(z) + c iterations += 1 pixels[i, j] = 1 - iterations * 0.02 gui = ti.GUI("Julia Set", res=(n * 2, n)) for i in range(1000000): paint(i * 0.03) gui.set_image(pixels) gui.show() If Taichi Lang is properly installed, you should get the animation below 🎉: See Get started for more information. If you wish to try our experimental features or build Taichi Lang for your own environments, see Developer installation. Kudos to all of our amazing contributors! Taichi Lang thrives through open-source. In that spirit, we welcome all kinds of contributions from the community. If you would like to participate, check out the Contribution Guidelines first. Contributor avatars are randomly shuffled. Taichi Lang is distributed under the terms of Apache License (Version 2.0). See Apache License for details. For more information about the events or community, please refer to this page - If you spot an technical or documentation issue, file an issue at GitHub Issues - If you spot any security issue, mail directly to [email protected]. - Nerf with Taichi - Taichi Lang examples - Advanced Taichi Lang examples - Awesome Taichi - DiffTaichi - Taichi elements - Taichi Houdini - More... - SIGGRAPH 2020 course on Taichi basics: YouTube, Bilibili, slides (pdf). - Chinagraph 2020 用太极编写物理引擎: 哔哩哔哩 - GAMES 201 高级物理引擎实战指南 2020: 课件 - 太极图形课第一季:课件 - TaichiCon: Taichi Developer Conferences - More to come... If you use Taichi Lang in your research, please cite the corresponding papers:

Genesis Park 편집팀이 AI를 활용하여 작성한 분석입니다. 원문은 출처 링크를 통해 확인할 수 있습니다.

공유

관련 저널 읽기

전체 보기 →