DLCompiler是上海人工智能实验室(上海 AI 实验室)DeepLink 团队开源扩展 Triton 的深度学习编译器:
- 跨架构 DSL 扩展:通过扩展 DSL,让 DSA 芯片(昇腾芯片)也能享受 GPU 级的编程体验和性能,成为 “跨架构 AI Kernel DSL” 。
- 智能自动优化:实现智能核间调度,充分释放多核算力;结合创新的访存合并优化,将离散访问自动重组为高速连续访问,大幅提升算子性能与带宽利用率。

# 因包过大,超过pypi限制(我们也在申请更大的容量),暂时支持从github安装
pip install https://github.com/DeepLink-org/DLCompiler/releases/download/v0.0.2/dlcompiler-3.4.0-cp310-cp310-linux_aarch64.whl
# 也可以先下载,然后再安装
wget https://github.com/DeepLink-org/DLCompiler/releases/download/v0.0.2/dlcompiler-3.4.0-cp310-cp310-linux_aarch64.whl
pip install dlcompiler-3.4.0-cp310-cp310-linux_aarch64.whlpip install attrs==24.2.0 numpy==1.26.4 scipy==1.13.1 decorator==5.1.1 \
psutil==6.0.0 pytest==8.3.2 pytest-xdist==3.6.1 pyyaml pybind11 nanobind- 要求torch_npu版本 >= 2.6.0
pip install torch_npu==2.6.0bash compile_shared.sh apply_patch=true # 如果不应用patch,可以直接执行 bash compile_shared.shexport DLC_DUMP_IR=1 # 默认在当前目录下python ./test/ascend/passed_tests/test_silu_and_mul.pybash compile_on_mlu.shcd build/triton/tutorials
python 01-vector-add.pybash compile_on_maca.sh