Skip to content

feat(*): add neuron adapter api as draft #3293

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lgyStoic
Copy link
Contributor

@lgyStoic lgyStoic commented Mar 5, 2025

add neuro backend as draft

@CLAassistant
Copy link

CLAassistant commented Mar 5, 2025

CLA assistant check
All committers have signed the CLA.

@lgyStoic lgyStoic marked this pull request as draft March 5, 2025 15:29
@lgyStoic
Copy link
Contributor Author

lgyStoic commented Mar 6, 2025

https://pytorch.org/executorch/stable/build-run-mediatek-backend.html as reference, I got sdk and mtk adapter header from executorch repo, and mtk adapter api is quit similar as nnapi interface. @jxt1234

@lgyStoic
Copy link
Contributor Author

lgyStoic commented Mar 6, 2025

@wangzhaode @jxt1234
Thus far, we have successfully implemented basic support for all operators in ResNet101 (such as convolution, addition, raster, etc.), demonstrating that this approach is indeed viable. Moreover, on the Dimensity 9000 and 9200 platforms, the speed significantly surpasses that of NNAPI. However, several issues remain to be addressed:

  • The MTK Adapter API closely resembles NNAPI but exhibits certain distinctions. If these differences prevent code reuse, it will result in the existence of two nearly identical codebases, complicating maintenance efforts.
  • It is imperative to complete the implementation of the remaining operators to ensure compatibility with a broader range of widely used neural networks.
  • Introducing a caching mechanism is essential to eliminate the need for recompilation with each execution, a feature that NNAPI also incorporates.

simple benchmark blow
image
image

Copy link

github-actions bot commented May 5, 2025

Marking as stale. No activity in 60 days.

@FranzKafkaYu
Copy link

So can we use this PR for MTK APU acceleration in ResNet model for now?

@lgyStoic
Copy link
Contributor Author

So can we use this PR for MTK APU acceleration in ResNet model for now?

@FranzKafkaYu yep,this pull request is already done all dependency for running restnet on mtk neuron pilot; also can run quantized int8 mnn model on neuron plot; demo upper show that ablity, for simpliy I use reset101 model work when click mobilenet button, and show correct classification result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants