Skip to content

[Feature Request] Support Ascend NPU for sparse attention implementationΒ #18

@kertenn

Description

@kertenn

🌟 Feature Description

I would like to propose adding support for Ascend NPU (Huawei's AI processor) to this sparse attention repository. This would enable the efficient execution of sparse attention mechanisms on Ascend hardware, which is widely used in China and increasingly in global markets.

🎯 Motivation & Background

  1. Growing Ascend Ecosystem: Ascend NPUs (e.g.,Ascend 910) are becoming popular for AI workloads, especially in Chinese cloud services and research institutions.

  2. Performance Potential: The sparse attention pattern is particularly suitable for Ascend's architecture, which excels at:

    • Matrix computations
    • Memory-bandwidth optimized operations
    • Large-scale parallel processing
  3. Community Demand: Many developers in China are interested in running efficient sparse attention models on Ascend hardware for both research and production.

πŸ’‘ Proposed Approach

I'm interested in contributing to this effort and would like to discuss:

  1. Implementation Strategy:

    • Port existing CUDA kernels to Ascend's CANN (Compute Architecture for Neural Networks)
    • Leverage Ascend's custom operator development framework
  2. Test Plan:

    • Functional correctness tests comparing with CPU/CUDA implementations
    • Performance benchmarks on Ascend 910

πŸ” Related Resources

  • Similar successful ports in other repos (e.g. Liger-Kernel)

🀝 Help Needed

I'm looking for:

  1. Feedback on whether this feature aligns with the project's roadmap
  2. Guidance on implementation approach and code structure
  3. Collaboration with maintainers who understand the existing codebase

Would the maintainers and community be interested in supporting Ascend NPU? I'm excited to contribute and work with you on this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions