onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

Add CANN EP

Open wangxiyuan opened this issue 2 years ago • 1 comments

Description: This PR adds Ascend CANN execution provider support.

Motivation and Context

  • Why is this change required? What problem does it solve? As the info shown in the issue. CANN is the API layer for Ascend processor. Add CANN EP can allow user run onnx model on Ascend hardware via onnxruntime The detail change:
    1. Added CANN EP framework.
    2. Added the basic operators to support ResNet model.
    3. Added C/C++、Python API support
  • If it fixes an open issue, please link to the issue here. https://github.com/microsoft/onnxruntime/issues/11477

Author: lijiawei [email protected] wangxiyuan [email protected]

wangxiyuan avatar Aug 02 '22 02:08 wangxiyuan

Any maintainer can apporve the CI workflows? Thanks

wangxiyuan avatar Aug 08 '22 07:08 wangxiyuan

@skottmckay @edgchen1 Hi, could you please take a look at this PR? BIG thanks. I'm eager to know what should I do to push forward this code.

wangxiyuan avatar Aug 30 '22 00:08 wangxiyuan

@skottmckay @edgchen1 Hi, could you please take a look at this PR? BIG thanks. I'm eager to know what should I do to push forward this code.

To other reviewers: I reviewed the shared provider library/API aspects of it, I didn't look in great detail into the provider code itself.

RyanUnderhill avatar Aug 30 '22 01:08 RyanUnderhill

@souptc @RyanUnderhill @skottmckay @edgchen1 Hi, sorry to @ you again. The new commit is ready for review. All the GPU related code has been removed. Big thanks for your help.

wangxiyuan avatar Sep 01 '22 11:09 wangxiyuan

@souptc @RyanUnderhill @skottmckay @edgchen1 Hi, sorry to @ you again. could you please take a look at this PR?

FFFrog avatar Sep 05 '22 06:09 FFFrog

@souptc @RyanUnderhill @skottmckay @edgchen1 Hi, sorry to @ you again. could you please take a look at this PR?Thanks a lot.

FFFrog avatar Sep 16 '22 14:09 FFFrog

/azp run Linux CPU CI Pipeline

jywu-msft avatar Sep 19 '22 15:09 jywu-msft

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Sep 19 '22 15:09 azure-pipelines[bot]

/azp run Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, Windows CPU CI Pipeline, Windows GPU CI Pipeline

jywu-msft avatar Sep 20 '22 15:09 jywu-msft

/azp run Windows GPU TensorRT CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, onnxruntime-python-checks-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed

jywu-msft avatar Sep 20 '22 15:09 jywu-msft

Azure Pipelines successfully started running 8 pipeline(s).

azure-pipelines[bot] avatar Sep 20 '22 15:09 azure-pipelines[bot]

Azure Pipelines successfully started running 6 pipeline(s).

azure-pipelines[bot] avatar Sep 20 '22 15:09 azure-pipelines[bot]

A couple more follow-ups.

  1. you'll need to fix a build break due to GetCapability() signature change caused by https://github.com/microsoft/onnxruntime/pull/12791
  2. add some documentation. our docs are in the gh-pages branch. see https://github.com/microsoft/onnxruntime/tree/gh-pages/docs you'll need to create a separate docs PR and make appropriate modifications to build/eps.md and add a execution-providers/CANN-ExecutionProvider.md
  3. if you have some code examples/jupyter notebooks etc. they can go in https://github.com/microsoft/onnxruntime-inference-examples

jywu-msft avatar Sep 21 '22 14:09 jywu-msft

A couple more follow-ups.

  1. you'll need to fix a build break due to GetCapability() signature change caused by Update kernel matching logic: decouple from op schemas and remove kernel def hashes #12791
  2. add some documentation. our docs are in the gh-pages branch. see https://github.com/microsoft/onnxruntime/tree/gh-pages/docs you'll need to create a separate docs PR and make appropriate modifications to build/eps.md and add a execution-providers/CANN-ExecutionProvider.md
  3. if you have some code examples/jupyter notebooks etc. they can go in https://github.com/microsoft/onnxruntime-inference-examples

Thanks for your suggestion. It's really helpful. We'll refresh the PR ASAP.

Docs、Example、More operator、 Performance Optimizing and so on are on our TODO list. We'll keep contributing in the future.

wangxiyuan avatar Sep 22 '22 02:09 wangxiyuan

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux Nuphar CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, Windows CPU CI Pipeline, Windows GPU CI Pipeline

jywu-msft avatar Sep 22 '22 14:09 jywu-msft

Azure Pipelines successfully started running 9 pipeline(s).

azure-pipelines[bot] avatar Sep 22 '22 14:09 azure-pipelines[bot]

/azp run Windows GPU TensorRT CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, onnxruntime-python-checks-ci-pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed

jywu-msft avatar Sep 22 '22 19:09 jywu-msft

Azure Pipelines successfully started running 6 pipeline(s).

azure-pipelines[bot] avatar Sep 22 '22 19:09 azure-pipelines[bot]