Skip to content

Add Ascend NPU as a new backend #6034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
hipudding opened this issue Mar 13, 2024 · 4 comments
Closed
4 tasks done

Add Ascend NPU as a new backend #6034

hipudding opened this issue Mar 13, 2024 · 4 comments
Labels
enhancement New feature or request stale

Comments

@hipudding
Copy link
Collaborator

hipudding commented Mar 13, 2024

Prerequisites

Please answer the following questions for yourself before submitting an issue.

  • I am running the latest code. Development is very rapid so there are no tagged versions as of now.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new bug or useful enhancement to share.

Feature Description

Add Ascend NPU as a new backend.

Motivation

Ascend is a full-stack AI computing infrastructure for industry applications and services based on Huawei Ascend processors and software. For more information about Ascend, see Ascend Community.

CANN (Compute Architecture of Neural Networks), developped by Huawei, is a heterogeneous computing architecture for AI.

Pytorch has officially announced support for Ascend NPU (through key PrivateUse1), please see the PrivateUse1 tutorial here.

Provide new backend support for llama.cpp, allowing users who are using Ascend NPU to inference model with llama.cpp.

Possible Implementation

Currently, the community has provided a convenient backend access mechanism. Ascend NPU is a CUDA-LIKE device, and I plan to reference CUDA's implementation to complete the Ascend NPU backend.

Due to the large workload, I plan to complete this feature in multiple stages. First, I will focus on compiling, backend registration, and device runtime functionalities. Additionally, I will add a new test file to validate backend registration, memory allocation, tensor operations, and other functionalities.

Next, I will proceed to implement tensor operators and validate them.

Afterward, do performance implementation, including split tensor support.

See also: very first commit #6035.

@hipudding hipudding added the enhancement New feature or request label Mar 13, 2024
@hipudding
Copy link
Collaborator Author

hipudding commented Mar 13, 2024

@ggerganov Thanks for this awesome project, I'm looking forward to your suggestions.

@ggerganov
Copy link
Member

Interesting work! Looks like a good start. Follow @slaren's advice for any insights with the implementation

@hipudding
Copy link
Collaborator Author

Interesting work! Looks like a good start. Follow @slaren's advice for any insights with the implementation

Thanks. I will.

@github-actions github-actions bot added the stale label Apr 14, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants