-
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
Add Module-Based Model Runtime Interface for AOT (support C++ runtime) #9697
Conversation
66cc5a8
to
e879841
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just few nit suggestions.
@@ -390,6 +391,13 @@ if(USE_PROFILER) | |||
list(APPEND RUNTIME_SRCS ${RUNTIME_VM_PROFILER_SRCS}) | |||
endif(USE_PROFILER) | |||
|
|||
if(USE_AOT_EXECUTOR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add USE_AOT_EXECUTOR
to cmake/config.cmake with default value ON
|
||
|
||
def test_conv2d(): | ||
RELAY_MODEL = textwrap.dedent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to use relay directly to build the relay model. Here is an example:
tvm/tests/micro/zephyr/test_zephyr.py
Line 394 in 01599d1
y = relay.nn.conv2d( |
output_list = generate_ref_data(ir_mod, inputs, params) | ||
|
||
with tvm.transform.PassContext(opt_level=3, config={"tir.disable_vectorize": True}): | ||
mod = tvm.relay.build(ir_mod, params=params, target="c -executor=aot -link-params") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this to use executor
and runtime
args?
* These were autogenerated in the original PR, but checking them in as plain code until we can revisit the auto-generator approach.
multiple-models case.
94a72c3
to
94bcb1c
Compare
This PR implements Module-based Model Runtime for AOT RFC. It adds support for targeting the C++ runtime with the Ahead-of-Time Executor for workloads which are purely CPU-based (e.g. the Device API cannot be used).
cc @manupa-arm @kparzysz-quic @csullivan @mehrdadh @adstraw for early feedback while I iterate to prepare to merge this.