-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[pre-RFC][BYOC] Marvell ML/AI Accelerator Integration #9730
Conversation
Thanks for your contribution. When you have a chance could you update the description of the PR with more details, and potentially link to the pre-RFC discussion? Thanks! |
Hello @tqchen, @jroesch, or any other reviewer: We have also posted a pre-RFC (11691 with the same title for discussion along with this POC PR and code changes. Once we can get some feedback, we (Marvell) are going to request for a RFC via the other site https://github.com/apache/tvm-rfcs. As the Jenkins failure, I saw the console log of this commit's Jenkins BUILD:cpu stage and I will need some help from a reviewer. FYI - In this pre-RFC BYOC-Marvell changes, we need to define a new dmlc.json.Write() function for the writer, which is going to be called & used by the Save() function of the newly defined GraphInputNodeMrvlExt class. This is in the src/relay/backend/contrib/mrvl/graph_executor_codegen_mrvl.cc file.
We can see the above from nm and c++filter commands below... But in the libtvm.so file, they are defined... Thus, the tests/python/unittest/test_runtime_module_load.py::test_dso_module_load runtime test failed during the Jenkins BUILD:cpu stage.
|
Hello @jroesch,
|
Wondering if someone can help out provide some insights and pointers related to the failing "rust" tests. 2021-12-15 18:46:35.799320: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: |
Hello @jroesch, We have followed the tvm-RFC steps; and we have converted contents in our pre-RFC posting into a RFC one, plus, added more required sub sections as explained by the RFC template format.
RFC.md below
SummaryIntegrate Marvell’s ML/AI accelerator with TVM BYOC framework in order to bring the TVM ecosystem to Marvell customers. MotivationMarvell MLIP is an ML/AI inference accelerator and is embedded on our ARM Neoverse N2-based OCTEON 10 processor. Guide-level explanationBased on what Marvell ML/AI inference accelerator does the best, a given pre-trained network model STEP (1) Run TVM-Mrvl-BYOC AOT ML Frontend Compilation and Mrvl-BYOC code-gen. The steps involved in this are:
STEP (2) Run Mrvl-ML/AI Backend Compiler to generate model binary for each Mrvl subgraph
STEP (3a) or (3b) Run inference on the software Simulator or on the Mrvl ML/AI HW accelerator for the Mrvl subgraph
STEP (4) Use TVM-llvm Compiler & Runtime to run inference
Reference-level explanationIllustration using a MNIST modelLet's use a Keras MNIST fashion model below as an example (partial & pseudo code for illustration).
We can train the above MNIST fashion model using the following train_images dataset and save
As illustrated in the tests/python/contrib/test_mrvl/test_mrvl_codegen.py and infrastructure.py files as well as
The mod_mrvl_subgraph object and the mod_non_mrvl_subgraph object returned from the aot_build_and_json_code() Different strategy can be used to cut the MNIST model into different sets of at most one Mrvl subgraph and at
Drawbacks
Rationale and alternatives
Unresolved questions
Future possibilities
|
Hi @jroesch, We have filed a RFC PR-48 (RFC][BYOC] Marvell ML/AI Accelerator Integration) at the TVM GitHub https://github.com/apache/tvm-rfcs repo. Thanks,
|
Hello @jroesch , Trying to refresh this pre-RFC as it seems to have become dormant (perhaps due to Holidays). Would appreciate your help as it seems to be blocked by rust/cargo related issues that we are not familiar with. Thank you! |
Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.