Skip to content

Add Ascend NPU device support.#955

Merged
Tcc0403 merged 1 commit into
linkedin:mainfrom
Ginray:main-add-npu
Dec 2, 2025
Merged

Add Ascend NPU device support.#955
Tcc0403 merged 1 commit into
linkedin:mainfrom
Ginray:main-add-npu

Conversation

@Ginray

@Ginray Ginray commented Nov 27, 2025

Copy link
Copy Markdown
Contributor

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:

  1. Add the installation method and basic function adaptation for NPU.
  2. Directly import via triton.language.math on 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.
image

  • Hardware Type:
  • run make test to ensure correctness
  • run make checkstyle to ensure code style
  • run make test-convergence to ensure convergence

Comment thread src/liger_kernel/ops/utils.py Outdated
Comment thread src/liger_kernel/utils.py
Comment thread src/liger_kernel/ops/utils.py Outdated
@Ginray Ginray force-pushed the main-add-npu branch 2 times, most recently from ea6c737 to fcaf55e Compare November 28, 2025 09:38
Comment thread src/liger_kernel/ops/utils.py
@Ginray Ginray requested a review from Tcc0403 November 29, 2025 03:08
Comment thread setup.py Outdated
Tcc0403
Tcc0403 previously approved these changes Dec 1, 2025

@Tcc0403 Tcc0403 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ji-huazhong ji-huazhong left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Tcc0403 Tcc0403 merged commit 62c0544 into linkedin:main Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants