Support for the Ascend backend: add npu runtime environment & JIT codegen#160
Open
PPPoint-t wants to merge 13 commits into
Open
Support for the Ascend backend: add npu runtime environment & JIT codegen#160PPPoint-t wants to merge 13 commits into
PPPoint-t wants to merge 13 commits into
Conversation
Rewrite problematic clamp on Ascend, add cache/config fallbacks
…is size-aware tuning
Replace the old name-based broadcast and loop/dot/where handling with a narrow SDPA key-boundary tail mask rewrite, including the stable_qk mask after exp2. Keep Ascend codegen compatibility fixes localized in Ascendifier: autotune key filtering, square block config rewrites, Ascend-safe config pruning, load fallback normalization, clamp lowering, and CANN libdevice routing. Clean up helper naming and rewrite state flow so the AST passes are easier to follow without changing the generated SDPA behavior.
Drop the injected Ascend autotune prune helper and its debug-only meta selection plumbing, while keeping autotune key filtering and square block config rewrites so axis-limit handling still runs. Format all modified Ascend backend files to maintain consistent code style.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepare the runtime environment needed by Ascend/NPU execution & Add the JIT codegen path for Ascend/NPU kernels.
NINETOOTHED_CACHE_DIRCodeGenerator_npukernel and launch symbols inJIT.__call__To make reviewing manageable, the entire Ascend NPU backend feature is split into 4 stacked phases. Reviewers can use the links below to view the clean diff of each phase directly within this repository:
Note: These links are just for architectural preview. I will submit official PRs to this repository sequentially as each phase gets merged.