Skip to content

Add Module-Based Model Runtime Interface for AOT (support C++ runtime) - #9697

Closed
areusch wants to merge 41 commits into
apache:mainfrom
areusch:aot-executor-no-codegen
Closed

Add Module-Based Model Runtime Interface for AOT (support C++ runtime)#9697
areusch wants to merge 41 commits into
apache:mainfrom
areusch:aot-executor-no-codegen

Conversation

@areusch

Copy link
Copy Markdown
Contributor

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.

@areusch
areuschforce-pushed the aot-executor-no-codegen branch 2 times, most recently from 66cc5a8 to e879841CompareDecember 13, 2021 04:50

@mehrdadhmehrdadh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just few nit suggestions.

Comment threadCMakeLists.txt
list(APPEND RUNTIME_SRCS ${RUNTIME_VM_PROFILER_SRCS})
endif(USE_PROFILER)

if(USE_AOT_EXECUTOR)

Copy link
Copy Markdown
Member

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(

Copy link
Copy Markdown
Member

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:

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")

Copy link
Copy Markdown
Member

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?

@areusch
areuschforce-pushed the aot-executor-no-codegen branch from 94a72c3 to 94bcb1cCompareJanuary 5, 2022 20:06
@masahi

Copy link
Copy Markdown
Member

#10283

@masahimasahi closed this Feb 26, 2022
Sign up for freeto 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.

3 participants

@areusch@masahi@mehrdadh