Update README.zh.md
这个仓库是一个面向训练的 GPU 算子运行时。它体积很小,但工作流尽量贴近真实的算子库开发流程:
ops/<op>/
python/ operator_runtime/ backend.py ops/ _internal/ operator_runtime_testing/
operator_runtime.ops
operator_runtime._internal
operator_runtime_testing
copy
vector_add
reduce_sum
softmax
pip install -r requirements.txt
mkdir -p build cd build cmake .. -DCAMP_ENABLE_NVIDIA=ON -DCAMP_ENABLE_METAX=OFF cmake --build . -j$(nproc)
./scripts/build_metax.sh build
python tests/run_ops.py --op copy --backend nvidia --mode all CAMP_BUILD_DIR=build pytest tests/ -v --backend nvidia pytest tests/ -v --backend tilelang python tests/run_ops.py --op all --backend nvidia --mode bench ./scripts/build_metax.sh test
TileLang 后端需要安装 tilelang Python 包。MetaX 后端使用独立构建产物,构建时应关闭 NVIDIA 变体,并将后端源码放在 ops/*/metax/*.maca。
tilelang
ops/*/metax/*.maca
ops/<op>/nvidia/*.cu
include/operator_runtime/ops/<op>.h
tests/cases/<op>.py
PerformanceResult
T.empty(...)
out_idx
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Intro-ops
这个仓库是一个面向训练的 GPU 算子运行时。它体积很小,但工作流尽量贴近真实的算子库开发流程:
ops/<op>/下创建后端实现目录。Python 目录结构
operator_runtime.ops放公开算子绑定。operator_runtime._internal放私有 FFI 和运行时细节。operator_runtime_testing放断言、benchmark 等仅测试使用的工具。算子
copyvector_addreduce_sumsoftmax安装
构建
验证
TileLang 后端需要安装
tilelangPython 包。MetaX 后端使用独立构建产物,构建时应关闭 NVIDIA 变体,并将后端源码放在ops/*/metax/*.maca。生产映射
ops/<op>/nvidia/*.cu目录约定include/operator_runtime/ops/<op>.h头文件tests/cases/<op>.pyPerformanceResultT.empty(...)返回值的 puzzle-stage kernelout_idxtemplate