You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RFC] Exploring an Ascend NPU backend for cross-platform architecture research
#75
NextTransformer compares Transformer architectures under a controlled training protocol. I think extending these experiments to Ascend NPUs could open up an interesting direction for the project.
Similar theoretical FLOPs do not necessarily translate into similar execution costs across hardware platforms. Kernel implementations, memory access patterns, and communication overhead can affect different architectures in different ways.
This raises an interesting question: do the relative efficiency advantages of different Transformer architectures carry over across hardware and software stacks?
Running the same architecture experiments on both NVIDIA GPUs and Ascend NPUs would provide another perspective on this question. The goal would be to compare architectures within each backend under a consistent protocol, then examine whether their relative advantages remain consistent across platforms.
These projects show how model architecture development, kernel implementation, and hardware-specific systems can evolve together. It would be interesting to explore this dimension within NextTransformer's existing architecture research framework.
A possible starting point
Rather than porting the entire framework at once, I suggest starting with the existing dense_full reference implementation on a single Ascend NPU.
A small initial implementation could cover:
Opt-in NPU device initialization through torch_npu.
The existing SDPA attention path.
The registered Muon+AdamW optimizer.
Debug-size forward/backward and optimizer-update tests.
Checkpoint save/load and fresh-process training continuation.
I have access to an Ascend 910B4 with 32 GiB of memory for feasibility testing. Hardware validation is pending, and I plan to begin with isolated tests.
If this direction is useful to the project, I would like to work with the maintainers on the integration design and dependency compatibility before changing shared training code.
Questions for the community
Would an Ascend execution backend be useful for NextTransformer's cross-platform architecture research?
Would you prefer the NPU-specific implementation to extend the existing runtime helpers or use a separate device abstraction?
Given the current PyTorch 2.9.1 pin, would a separately maintained and version-pinned TorchNPU environment be an acceptable approach?
I would be happy to take the lead on the initial implementation, hardware validation, and follow-up maintenance.
I would appreciate feedback on the direction and proposed starting point before opening the implementation issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Motivation
NextTransformer compares Transformer architectures under a controlled training protocol. I think extending these experiments to Ascend NPUs could open up an interesting direction for the project.
Similar theoretical FLOPs do not necessarily translate into similar execution costs across hardware platforms. Kernel implementations, memory access patterns, and communication overhead can affect different architectures in different ways.
This raises an interesting question: do the relative efficiency advantages of different Transformer architectures carry over across hardware and software stacks?
Running the same architecture experiments on both NVIDIA GPUs and Ascend NPUs would provide another perspective on this question. The goal would be to compare architectures within each backend under a consistent protocol, then examine whether their relative advantages remain consistent across platforms.
Recent DeepSeek work provides a useful example. DeepSeek-V3.2 introduces DeepSeek Sparse Attention (DSA), changing how long-context attention selects and accesses historical KV entries. DeepSeek has also released Ascend-oriented projects such as [DeepGEMM-Ascend](https://github.com/deepseek-ai/DeepGEMM-Ascend), [DeepEP-Ascend](https://github.com/deepseek-ai/DeepEP-Ascend), and [DeepInfer](https://github.com/deepseek-ai/DeepInfer).
These projects show how model architecture development, kernel implementation, and hardware-specific systems can evolve together. It would be interesting to explore this dimension within NextTransformer's existing architecture research framework.
A possible starting point
Rather than porting the entire framework at once, I suggest starting with the existing
dense_fullreference implementation on a single Ascend NPU.A small initial implementation could cover:
torch_npu.I have access to an Ascend 910B4 with 32 GiB of memory for feasibility testing. Hardware validation is pending, and I plan to begin with isolated tests.
If this direction is useful to the project, I would like to work with the maintainers on the integration design and dependency compatibility before changing shared training code.
Questions for the community
I would be happy to take the lead on the initial implementation, hardware validation, and follow-up maintenance.
I would appreciate feedback on the direction and proposed starting point before opening the implementation issue.
All reactions