Skip to content
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

Refactor MNN KleidiAI interface #3152

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xhzheng1895
Copy link
Contributor

Refactor MNN_KleidiAI interface to support more model types, and facilitate subsequent KleidiAI ukernels' integration.

Re-abstract information stored in class KleidiAI:

  1. static info: not related to loaded model, initialized when interface is constructed and never changed.
  2. status: will change while pipeline is running.

Let interface and loaded model decouple for more complex mix of multiple types of models. Add mAccelType in MNN data structure, kleidiAI interface will rely on this type to decide which branch to go.

Move some pack functions to mnn_kleidiai_util.cpp.

Add CPU feature detection in source/backend/cpu/CPURuntime.hpp. Subsequent ukernels need SME information.

Refactor MNN_KleidiAI interface to support more model types,
and facilitate subsequent KleidiAI ukernels' integration.

Re-abstract information stored in class KleidiAI:
1) static info: not related to loaded model, initialized when
interface is constructed and never changed.
2) status: will change while pipeline is running.

Let interface and loaded model decouple for more complex mix
of multiple types of models. Add mAccelType in MNN data structure,
kleidiAI interface will rely on this type to decide which branch
to go.

Move some pack functions to mnn_kleidiai_util.cpp.

Add CPU feature detection in source/backend/cpu/CPURuntime.hpp.
Subsequent ukernels need SME information.
@xhzheng1895 xhzheng1895 closed this Jan 9, 2025
@xhzheng1895 xhzheng1895 reopened this Jan 9, 2025
@xhzheng1895 xhzheng1895 marked this pull request as ready for review January 9, 2025 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant