Skip to content

Conversation

@f2013519
Copy link
Contributor

Summary

This PR adds support for partitioning and compiling the Marvell BYOC target along with initial integration with tvmc. Support for the runtime (simulator based & hardware) and other features (int8) will be added in phases as described in the pre-RFC post: https://discuss.tvm.apache.org/t/prerfc-byoc-integrating-marvell-ml-ai-accelerator-to-the-tvm-byoc-framework/16155.

Please see the pre-RFC for a detailed description of the design and roadmap going forward.

Building

We have introduced a new cmake flag:
USE_MRVL=ON/OFF

This flag enables Marvell BYOC codegen and is required for using the Marvell BYOC functionality, running unit tests, etc.

Usage

The tvmc interface for Marvell BYOC will be similar to other composite targets.

The below command is an example of cross-compilation of an ONNX model for an Octeon target.

python3 -m tvm.driver.tvmc compile
--target="mrvl, llvm"
--target-llvm-mtriple=aarch64-linux-gnu
--target-llvm-mcpu=neoverse-n2
--target-mrvl-num_tiles=4
--cross-compiler aarch64-linux-gnu-gcc
--output model.tar
model.onnx

Supported operators will be partitioned and compiled for the MLIP and the remaining operators will be compiled for the ARM Neoverse cores using the default LLVM target.

TVM Python API based compilation is also supported, please refer to the doc added as part of this PR for details.

@f2013519
Copy link
Contributor Author

cc @Hzfengsy @vinx13

Copy link
Member

@Hzfengsy Hzfengsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. BTW, as we are moving to TVM Unity / Relax, would be great if you could consider supporting MRVL for unity flow for emerging needs (e.g. LLMs)

@f2013519
Copy link
Contributor Author

LGTM. BTW, as we are moving to TVM Unity / Relax, would be great if you could consider supporting MRVL for unity flow for emerging needs (e.g. LLMs)

Thanks @Hzfengsy. We are closely following TVM Unity / Relax development and it is part of our future roadmap. We will work on it once we complete the initial Relay flow support.

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.

2 participants