Repository navigation
Release 0.11.0
主要依赖库版本描述
- python 3.9 或者更高
- [torch-mlu] 2.7.1;
- [torch-npu] 2.7.1;
- pytorch与torch-mlu或torch-npu对应;
- [triton-x] 3.2.0.post9 或者更高;
主要特性与改进
- 增加
GraphRunner用于提供基于torch.nn.Module的NpuGraph与MluGraph模块封装,使用样例:import torch from xpu_graph import GraphRunner, Target model = torch.nn.Sequential(*[torch.nn.Linear(1024, 1024)] * 3).npu() input_tensor = torch.empty(1024, 1024).uniform_(10, 100).npu() golden = model(input_tensor) device_graph = GraphRunner[Target.npu]( model, lambda input_tensor: input_tensor, lambda input_buffer, input_tensor: (input_buffer.copy_(input_tensor), True), ) device_graph.capture(torch.empty_like(input_tensor).uniform_(1, 2)) assert torch.allclose(device_graph(input_tensor), golden)
Bug修复与其他改动
- 修复
LayerNorm相关pass对不带weight和bias的场景的分支处理。 - 修复
CustomBatchMatmul调用pass对bias非连续场景的支持。
What's Changed
Exciting New Features 🎉
Other Changes
- feat(tensorify_scalars): tensorify python scalars after dispatch by @yfchen-byted in #475
- fix(mlu_compiler/artifact): fix returned artifact of mlu_compile by @yfchen-byted in #474
- fix(combo_bmm): add dtype restrict, fix shape bug and adjust matching requirements by @jyjyjyjyjyjyjyj in #468
- fix: remove --pid=host flag to improve container isolation by @YYYYimo in #487
- chore(pre-commit): replace black and isort with ruff by @YYYYimo in #489
- fix(device_graph_runner): ensure stream sync after graph replay by @YYYYimo in #491
- fix(mlu): fix layernorm and batchmatmul by @jyjyjyjyjyjyjyj in #492
New Contributors
Full Changelog: 0.10.1...0.11.0