-
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
[runtime] AOTExecutor implementation and c target code-generator #10283
Merged
Merged
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8745a3c
Add memory pools to Metadata classes.
areusch 81a4352
Move ShapeToJSON to utils.
areusch 3ea361b
Track returned TensorType from AOTExecutorCodegen.
areusch 2e4c277
Support calling Relay functions with Tuple.
areusch e5571e2
Expand supported TIR calling conventions to work with C++ runtime.
areusch 9e81293
Rename MetadataModule to ConstLoaderModule.
areusch 66c8ef5
Add runtime AOT executor module.
areusch b49bea6
Add AOT code-generation.
areusch 033885c
Add a runtime Module to mux between .text Metadata and live Metadata.
areusch 3717f0c
Move launch_param to namespace
areusch b78b6c4
Add test of c++ AOT.
areusch 2384fcc
Fix incongruity between kTvmRuntimeCrt constant
areusch 5ec990f
Expand ExecutorCodegenMetadata to include AOT runtime metadata.
areusch aef76ca
commit cpp test
areusch 84e5b92
Make Metadata compile under C.
areusch ccc6c9c
Ignore ephemeral metadata_module export_model_library_format.
areusch c0be55c
address manupa, kparszsyc, masahi comments.
areusch fda6d53
further address comments
areusch f32ba4b
clang and python format
areusch 4f658a6
Fix broken test
areusch 2d42f22
Address lingering comments from masahi, kparszyzc
areusch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
|
||
"""This module contains Python wrappers for the TVM C++ Executor implementations. | ||
|
||
NOTE: at present, only AOT Executor is contained here. The others are: | ||
- GraphExecutor, in python/tvm/contrib/graph_executor.py | ||
- VM Executor, in python/tvm/runtime/vm.py | ||
|
||
TODO(areusch): Consolidate these into this module. | ||
""" | ||
from .aot_executor import AotModule |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 just realized that, we have two notions of
executor
. One is the runtime one above, the other istvm/python/tvm/relay/build_module.py
Line 647 in 55849e6
which is used a lot in the test cases.
Do we intend to support
create_executor(kind="aot", ...)
, given that we can now run things via the cpp runtime?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.
yeah that is a good point. added support here.