Repository navigation
Releases
Taichi Forge 0.7.1 / 发布说明
Taichi Forge 0.7.1
Source / 源码: b832fadd9
GitHub 与 PyPI 提供相同的 wheel;附件含完整源码、公开文档、构建清单与 SHA256SUMS。
GitHub and PyPI provide identical wheels. Assets include complete sources, public documentation, build metadata and SHA256SUMS.
中文
从 Python 定义交付可独立运行的数值库
- Produce(构建)。
ti.aot.export_package可从一个或多个 Python 模块的定义导出数值入口、共享函数、可读的 Host 构造与调度代码。可以指定单一后端,也可以用artifact_format="unified-bc-library"生成一份面向 x64、CUDA 和 Vulkan 的可移植 LLVM 库。使用设备专有操作的入口仍需要相应硬件和 provider。按包导出 - Prepare(消费时特化)。 Runtime 根据实际设备、模型尺寸、资源布局和可用的工作组能力,把通用代码和共享 helper 生成设备可执行代码。相容入口可以延迟内联。各实例拥有各自的可变状态,数组内容和普通运行参数可以逐次改变。Vulkan 消费者可跨进程复用相容的已编译 kernel。首次准备时间取决于入口和设备。生产与消费
- Perform(执行)。 应用可以用
ti.init(execution_mode="hybrid")保留脚本 JIT,通过正常 Python 导入调用包内计算。只安装兼容 Runtime 的应用可用ExecutionSession(mode="aot")独立运行。稳定的资源绑定和原生 Graph 可以复用。受支持的指针块和 bitmasked 稀疏布局按模型实例重建,实际活动节点由该实例维护。调用示例 - 增量构建。 保留上一次成功输出,复用生产端
build_cache,向新目录导出。未受改动影响的定义可以复用捕获和编译结果。应用只需分发导出目录及所声明的依赖,构建缓存留在生产端。缓存用法
其他用户可见变化
- CPU 的 fast 编译档使用 LLVM O1。普通 kernel 的离线缓存可在进程退出前逐项写盘。Graph 配置可以覆盖嵌套顺序段和 WHILE 区域。Vulkan 修正随机种子、随机状态竞争,部分 CPU/CUDA/Vulkan 反向求导路径减少冗余状态和梯度操作。待发布修复及适用范围
ti.solve和Matrix.inverse()增加了固定尺寸方阵的带选主元消元路径。已测尺寸包括 CPU/CUDA 的 32 阶和 Vulkan 的 32 阶 f32。更大尺寸的编译代价应按设备评估。局部矩阵求解- Vulkan 默认设备选择优先考虑满足能力要求的独立显卡。硬件渲染应用可以在支持的配置下通过 Runtime 调用 OptiX 等外部 provider。这些入口的驱动、适配器和资源要求随所选设备和操作而定。外部硬件 provider
前端与 Runtime 的私有 ABI 226。Runtime 支持的最高持久执行计划为 29。此版本写入的编译缓存 schema 为 104,GFX metadata 为 24。
从 0.7.0 迁移。 使用 0.7.1 版 Forge 前端和 Runtime。共享数值代码的入口可以分别特化各自允许固定的标量,普通标量在每次调用时读取。请从源码重新导出需要新格式或新资源能力的包。部署时分发完整导出目录,包括 code.tcm、package.json、host/ 和所需资产。已发布 0.7.0 的行为见下节。部署方式
English
Ship a numerical library from Python definitions
- Produce.
ti.aot.export_packageexports numerical entry points, shared functions, and readable Python for construction and scheduling from one or more modules. Target one backend or selectartifact_format="unified-bc-library"to produce one portable LLVM library for x64, CUDA, and Vulkan. Device-specific operations still require the corresponding hardware and providers. Package export - Prepare. The runtime uses the selected device, model dimensions, resource layouts, and workgroup capabilities to compile portable code and shared helpers into device executables. Eligible entries defer inlining to this stage. Each instance owns its mutable state. Array contents and ordinary arguments can change between calls. Vulkan consumers can reuse compatible compiled kernels across processes. First-use costs depend on the entry and device. Production and consumption
- Perform. Applications can select
ti.init(execution_mode="hybrid")to keep script JIT and call packaged computations through normal Python imports. An application with only the compatible Forge runtime can useExecutionSession(mode="aot"). Stable bindings and native Graphs can be reused. Supported pointer-block and bitmasked sparse layouts are rebuilt per model instance, with each instance tracking its own active nodes. Calling examples - Incremental builds. Keep the previous successful output, reuse the producer's
build_cache, and export to a new directory. Unaffected definitions can reuse capture and compilation results. Distribute the export directory and its declared dependencies. The build cache stays on the producer. Using the cache
Other user-visible changes
- The CPU fast tier uses LLVM O1. Individual offline kernel cache entries can reach disk before process exit. Graph configuration reaches nested sequential and WHILE regions. Vulkan fixes cover RNG seed handling and concurrent RNG state updates. Selected reverse-mode paths on CPU, CUDA and Vulkan reduce redundant state and gradient operations. Fixes and backend coverage
ti.solveandMatrix.inverse()support additional fixed square dimensions through partial-pivot elimination. Tested sizes include dimension 32 on CPU and CUDA, and dimension 32 in f32 on Vulkan. Compile cost at larger dimensions depends on the device. Local matrix solves- Default Vulkan device selection prefers an eligible discrete adapter. Supported hardware rendering paths can call external providers such as OptiX through the runtime. Driver, adapter and resource requirements depend on the device and operation. External hardware providers
The frontend/runtime private ABI is 226. The runtime reads up to persistent execution-plan version 29. This build writes compiled-cache schema 104 and GFX metadata 24.
Upgrading from 0.7.0. Use Forge frontend and runtime version 0.7.1. Entries sharing the same numerical code can specialize different scalar bindings. Ordinary scalar inputs stay live. Re-export packages from source to use the new format or resource capabilities. Ship the complete export directory, including code.tcm, package.json, host/, and required assets. The next section describes the published 0.7.0 release. Deployment profiles
Taichi Forge 0.7.0 / 发布说明
Taichi Forge 0.7.0
Source / 源码: 73d45703d
GitHub 与 PyPI 提供相同的 wheel;附件含完整源码、公开文档、构建清单与 SHA256SUMS。
GitHub and PyPI provide identical wheels. Assets include complete sources, public documentation, build metadata and SHA256SUMS.
中文
0.7.0 重点改善大型 kernel 和 Graph 的编译开销与内存占用,扩展 AOT 部署能力,
并修复自动微分和多后端执行问题。
主要更新
- 编译与内存: 减少静态循环展开、重复内联和优化分析中的冗余工作;大型 Graph
共享不可变调度元数据,编译缓存和运行库按需加载,减少重复产物。 - 启动配置: CUDA/Vulkan 为符合条件的普通循环在编译期选择 block 配置,并根据
已知范围减少空工作组,覆盖ti.ndrange、ti.grouped和可降为 range 的 dense Field。
保留显式用户配置,无需测速搜索。 - AOT 部署: CPU/CUDA/Vulkan 扩展参数、返回值、ArgPack、ndarray 梯度绑定和固定 Graph
导出;支持已描述的 native 算法与外部 provider 资源重建。应用产物与用户安装的外部库分离。 - Graph 与并发: 独立 CUDA/Vulkan 执行域支持逐提交参数、GPU 计时及完成集合等待。
符合条件的 CUDA 前处理、设备 WHILE 和收尾可合并为一次原生图提交。 - 渲染: 改善 Vulkan 管线缓存与资源复用,提供 SPIR-V 标量特化;OptiX 批次查询支持
遍历中的单/双面过滤。Python 与原生窗口公开get_scroll_delta()。 - 正确性: 修复 Vulkan SPIR-V/Struct cursor、自动微分、稀疏存储、异步资源退休和
窗口 resize/close 问题。各功能的后端、布局与资源要求见详细文档。
升级与编译设置
- 配对升级
taichi-forge与taichi-forge-runtime,重新导出旧 AOT 包;旧编译缓存自动重建。
runtime 仍与 Python 小版本无关,主包提供对应 CPython 扩展。 - 默认保持
compile_tier="fast"、advanced_optimization=False;CompileIQ 自动调优默认关闭。
编译期默认启动配置不依赖 CompileIQ。 - OptiX 仅保留 9.1(ABI 118,需要 NVIDIA R590+ 驱动),移除 8.1/9.0 adapter。
发布构建使用 CUDA Toolkit 12.8.1 / PTX 8.7;使用官方 wheel 不需要安装 CUDA Toolkit。
组件格式:私有 ABI 226,持久执行计划为 27,编译缓存 schema 为 91;
LLVM AOT metadata 为 19/20,GFX metadata 为 16。
python -m pip install --upgrade taichi-forge==0.7.0English
0.7.0 reduces compilation work and memory overhead for large kernels and Graphs,
expands AOT deployment, and fixes autodiff and backend execution issues.
Highlights
- Compilation and memory: Less redundant work in static-loop expansion, repeated
inlining and optimization passes. Large Graphs share immutable dispatch metadata;
demand loading and artifact deduplication reduce unnecessary storage and preparation. - Launch configuration: CUDA/Vulkan select block sizes at compile time for eligible
loops and reduce empty workgroups when bounds are known. This coversti.ndrange,
ti.groupedand dense Fields lowered to range tasks. Explicit user settings are
preserved, without benchmark searches. - AOT deployment: Broader CPU/CUDA/Vulkan support for arguments, returns, ArgPack,
ndarray gradient bindings and fixed Graph export. Described native algorithms and
provider resources can be reconstructed; vendor libraries remain separate dependencies. - Graphs and concurrency: Independent CUDA/Vulkan execution domains support
per-submission parameters, GPU timing and completion-set waits. Eligible CUDA
preprocessing, device WHILE and finalization can use a single native graph launch. - Rendering: Improved Vulkan pipeline caching and resource reuse, SPIR-V scalar
specialization, and traversal-time face filtering for OptiX batch queries.
Python and native windows exposeget_scroll_delta(). - Correctness: Fixes for Vulkan SPIR-V/Struct cursors, autodiff, sparse storage,
asynchronous resource retirement and window resize/close. Backend, layout and resource
requirements are documented in the detailed references.
Upgrading and compilation settings
- Upgrade
taichi-forgeandtaichi-forge-runtimetogether and re-export old AOT packages.
Old compiled caches rebuild automatically. The runtime remains Python-version-independent;
the main package supplies the CPython-specific extension. - Defaults remain
compile_tier="fast"andadvanced_optimization=False.
CompileIQ autotuning is disabled by default. Compile-time launch defaults do not require it. - OptiX now requires 9.1 (ABI 118, NVIDIA R590+ driver); the 8.1/9.0 adapters are removed.
Release builds use CUDA Toolkit 12.8.1 / PTX 8.7. Official wheels do not require a local Toolkit.
The private ABI is 226, persistent execution-plan version 27, and compiled-cache schema 91;
LLVM AOT metadata is 19/20, GFX metadata 16.
python -m pip install --upgrade taichi-forge==0.7.0Full changelog · Compilation options ·
AOT deployment · Execution domains
LLVM 20 Windows MSVC2026
llvm20 build: migrate packaging to LLVM 20 and taichi-forge