Liger-Kernel
Liger-Kernel copied to clipboard
Add Ascend NPU device support.
Summary
This PR is the first step in the adaptation of Ascend NPU to Liger Kernel: adding NPU device support. For details, refer to [RFC] Native Ascend NPU Support for Liger Kernel, Section 2.1: Device Support Integration.
Details
Key Modifications:
- Add the installation method and basic function adaptation for NPU.
- Directly import via
triton.language.mathon NPU to avoid errors caused by non-existent interfaces.
Testing Done
Verification Status:
We have conducted verification on Atlas 800T A3, and basic test cases such as test_softmax and test_swiglu have passed. We will continue to improve it in the future.
- Hardware Type: <BLANK>
- [x] run
make testto ensure correctness - [x] run
make checkstyleto ensure code style - [x] run
make test-convergenceto ensure convergence