Skip to content
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

Rename GraphRuntime to GraphExecutor #7653

Merged
merged 16 commits into from
Mar 30, 2021
Merged

Conversation

areusch
Copy link
Contributor

@areusch areusch commented Mar 12, 2021

This PR implements the "GraphRuntime" part of [RFC] Rename GraphRuntime and ilk to e.g. GraphExecutor. It's quite invasive, so it would be great if everyone could look it over. I think this PR is almost entirely targeted find-replace, as shown by the commit history.

one thing I noticed: @u99127 to look at ARM Compute Lib changes, i'm not sure how you prefer to notate ARM compute lib.

@tqchen @jroesch @junrushao1994 @tkonolige @zhiics @manupa-arm @ZihengJiang

@areusch
Copy link
Contributor Author

areusch commented Mar 12, 2021

µTVM note: you will need to nuke build/standalone_crt after this change.

@u99127
Copy link
Contributor

u99127 commented Mar 12, 2021

@d-smirnov , @lhutton1 , @mbaret : could you please take a look ?

CMakeLists.txt Outdated
@@ -303,12 +303,12 @@ else()
list(APPEND COMPILER_SRCS ${STACKVM_RUNTIME_SRCS})
endif(USE_STACKVM_RUNTIME)

if(USE_GRAPH_RUNTIME)
if(USE_GRAPH_EXECUTOR)
message(STATUS "Build with Graph runtime support...")
Copy link
Contributor

Choose a reason for hiding this comment

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

Missed one

CMakeLists.txt Outdated
@@ -326,7 +326,7 @@ if(USE_PROFILER)
file(GLOB RUNTIME_GRAPH_DEBUG_SRCS src/runtime/graph/debug/*.cc)
Copy link
Contributor

Choose a reason for hiding this comment

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

missed this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is fine, the var name derives from the path. or do you mean we should fix path to e.g. src/runtime/graph_executor/...?

@@ -88,7 +88,7 @@ The configuration of TVM can be modified by `config.cmake`.
- On macOS, for some versions of Xcode, you need to add ``-lc++abi`` in the LDFLAGS or you'll get link errors.
- Change ``set(USE_CUDA OFF)`` to ``set(USE_CUDA ON)`` to enable CUDA backend. Do the same for other backends and libraries
you want to build for (OpenCL, RCOM, METAL, VULKAN, ...).
- To help with debugging, ensure the embedded graph runtime and debugging functions are enabled with ``set(USE_GRAPH_RUNTIME ON)`` and ``set(USE_GRAPH_RUNTIME_DEBUG ON)``
- To help with debugging, ensure the embedded graph executor and debugging functions are enabled with ``set(USE_GRAPH_EXECUTOR ON)`` and ``set(USE_GRAPH_EXECUTOR_DEBUG ON)``
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- To help with debugging, ensure the embedded graph executor and debugging functions are enabled with ``set(USE_GRAPH_EXECUTOR ON)`` and ``set(USE_GRAPH_EXECUTOR_DEBUG ON)``
- To help with debugging, ensure the embedded graph executor and debugging functions are enabled with ``set(USE_GRAPH_EXECUTOR ON)`` and ``set(USE_PROFILER ON)``

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

I think we probably need to create an alias for graph_runtime (if they are all replaced by graph_executor) and remove it in the next release for backward compatibility. We can issue a warning to when graph_runtime is used. Otherwise, I think it would break the downstream deployment once they sync with upstream TVM. Please ignore if you have it already.

@areusch
Copy link
Contributor Author

areusch commented Mar 18, 2021

@zhiics good call. I added python backwards compatibility for the create API. I don't know whether we are sensitive to backwards compatibility for the other languages. since the rest are compiled, it seems like we may not need a deprecation warning there (but, I am happy to add one, I am just not sure what would be best). I could also see us doing something slightly different than precedent here given the magnitude of the change.

@tqchen tqchen added status: need review status: need update need update based on feedbacks labels Mar 18, 2021
@areusch areusch force-pushed the executor-rename branch 2 times, most recently from b0ff20a to bc9bab8 Compare March 19, 2021 15:35
@zhiics
Copy link
Member

zhiics commented Mar 23, 2021

@areusch yeah, warning may not be needed. I was just trying to make sure that we don't break all the downstream deployment by letting them know that what is going to happen there.

@areusch
Copy link
Contributor Author

areusch commented Mar 23, 2021

@zhiics it's definitely a breaking change, i'm not opposed to the warning or some other way to notify downstream users. I don't know if code or forum or other is the best channel for that--i'm inclined to lean towards code in case forum or elsewhere also has snippets that may become outdated. i'm happy to do whatever you propose--which way do you prefer?

@tqchen @jroesch in case they have thoughts

@areusch areusch force-pushed the executor-rename branch 2 times, most recently from 50110b3 to 2f10d74 Compare March 23, 2021 19:26
@tqchen
Copy link
Member

tqchen commented Mar 23, 2021

Given we are pre-1.0 we can just do our best effort when backward compact is possible but not necessary have to spend an extra mile of effort. may not hurt to post a notice to forum as well. e.g. https://discuss.tvm.apache.org/t/notice-tvm-runtime-rpc-upgrade-in-pr7488/9237/5

@zhiics
Copy link
Member

zhiics commented Mar 24, 2021

@zhiics it's definitely a breaking change, i'm not opposed to the warning or some other way to notify downstream users. I don't know if code or forum or other is the best channel for that--i'm inclined to lean towards code in case forum or elsewhere also has snippets that may become outdated. i'm happy to do whatever you propose--which way do you prefer?

@tqchen @jroesch in case they have thoughts

@areusch Thanks. I also prefer code for the the same reason you mentioned.

@areusch
Copy link
Contributor Author

areusch commented Mar 24, 2021

@zhiics I've added Python backwards-compat. Please let me know if you think this is adequate. If so, I think we are ready to merge.

mResultView.setText(label);
}
Log.i(TAG, "prediction finished");
if (null != graphExecutorModule) {
Copy link

@cnv1989 cnv1989 Mar 24, 2021

Choose a reason for hiding this comment

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

Why is the indent size here is 2 while everywhere else its 4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch @cnv1989, I had run git-clang-format directly rather than with the script, and it looks like it affected java files. reverted.

@areusch areusch force-pushed the executor-rename branch 3 times, most recently from 3ce0117 to f5b48b6 Compare March 25, 2021 00:00
Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

LGTM. @yzhliu @jroesch @tqchen please also take a look since there are language binding changes as well.

@areusch
Copy link
Contributor Author

areusch commented Mar 26, 2021

@yzhliu @jroesch @tqchen would be great if we can merge this soon as it's easy for this PR to run in to merge conflicts.

@tqchen
Copy link
Member

tqchen commented Mar 26, 2021

oops. sorry there is a merge conflict due to another renaming PR. @areusch can you rebase. will prioritize merging this

@areusch areusch force-pushed the executor-rename branch 2 times, most recently from 2bf1d69 to a269414 Compare March 28, 2021 16:46
@tqchen tqchen merged commit 9b43a64 into apache:main Mar 30, 2021
@tqchen tqchen added status: accepted and removed status: need review status: need update need update based on feedbacks labels Mar 30, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
Fix graph runtime -> graph executor
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
Fix graph runtime -> graph executor

lint
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
Fix graph runtime -> graph executor

lint
Lunderberg added a commit to Lunderberg/tvm-vta that referenced this pull request Aug 13, 2021
Following TVM's rename in apache/tvm#7653,
update to avoid errors when tvm.contrib.graph_runtime is removed
entirely.
tmoreau89 pushed a commit to apache/tvm-vta that referenced this pull request Aug 19, 2021
Following TVM's rename in apache/tvm#7653,
update to avoid errors when tvm.contrib.graph_runtime is removed
entirely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants