feat: add extensible Ascend A5 / Ascend 950 runtime support#260
feat: add extensible Ascend A5 / Ascend 950 runtime support#260fxp19950422 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive support for running Qwen-Image models on Ascend NPU platforms (such as Ascend A5 and 950). It establishes a robust platform abstraction layer, implementing runtime adapters for CUDA, ROCm, and Ascend to handle platform-specific validation, component preparation, and compilation. Key additions include a new modular attention backend registry supporting MindIE-SD attention, MindIE-SD native quantization (MXFP8, W4A4, and FP8 attention), and MindIE compilation. Additionally, the Qwen DiT FB-cache mechanism has been enhanced to support multiple cache streams and sequence parallelism. Comprehensive unit and integration tests, along with documentation and examples, have been added to verify these platform integrations. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Overview
This PR ports the Ascend work from the v1-based #259 implementation onto the current mainline architecture without merging the unrelated v1 history. It introduces reusable platform, attention, and model-runtime abstractions so future Ascend model families can be added without scattering NPU-specific branches through shared pipelines.
Changes
Compatibility
Validation completed
Ascend hardware follow-up
The earlier v1 implementation in #259 was validated on Ascend hardware. The currently restarted container exposes /dev/davinci_manager and /dev/hisi_hdc but not /dev/davinci0 or /dev/devmm_svm; npu-smi therefore fails DCMI initialization and torch_npu reports zero devices. Mainline A5 hardware regression is pending restoration of the compute device mapping, after which the opt-in operator tests and the Qwen Image/Edit BF16, ControlNet/LoRA, FB-cache, offload, compile, MXFP8, W4A4, and FP8-attention matrix will be run.