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

[FIX] Remove leftover instances of USE_GRAPH_EXECUTOR_DEBUG #8796

Merged
merged 3 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,9 @@ if(USE_GRAPH_RUNTIME AND NOT DEFINED USE_GRAPH_EXECUTOR)
endif(USE_GRAPH_RUNTIME AND NOT DEFINED USE_GRAPH_EXECUTOR)

# NOTE(areusch): USE_GRAPH_RUNTIME_DEBUG will be deleted in a future release
if(USE_GRAPH_RUNTIME_DEBUG AND NOT DEFINED USE_GRAPH_EXECUTOR_DEBUG)
message(WARNING "USE_GRAPH_RUNTIME_DEBUG renamed to USE_GRAPH_EXECUTOR_DEBUG. Please update your config.cmake")
set(USE_GRAPH_EXECUTOR_DEBUG ${USE_GRAPH_RUNTIME_DEBUG})
if(USE_GRAPH_RUNTIME_DEBUG AND NOT DEFINED USE_PROFILER)
message(WARNING "USE_GRAPH_RUNTIME_DEBUG renamed to USE_PROFILER. Please update your config.cmake")
set(USE_PROFILER ${USE_GRAPH_RUNTIME_DEBUG})
unset(USE_GRAPH_RUNTIME_DEBUG CACHE)
endif(USE_GRAPH_RUNTIME_DEBUG AND NOT DEFINED USE_GRAPH_EXECUTOR_DEBUG)

Expand All @@ -357,10 +357,12 @@ endif(USE_GRAPH_EXECUTOR)

# convert old options for profiler
if(USE_GRAPH_EXECUTOR_DEBUG)
message(WARNING "USE_GRAPH_EXECUTOR renamed to USE_PROFILER. Please update your config.cmake")
unset(USE_GRAPH_EXECUTOR_DEBUG CACHE)
set(USE_PROFILER ON)
endif()
if(USE_VM_PROFILER)
message(WARNING "USE_VM_PROFILER renamed to USE_PROFILER. Please update your config.cmake")
unset(USE_VM_PROFILER CACHE)
set(USE_PROFILER ON)
endif()
Expand Down
2 changes: 1 addition & 1 deletion apps/microtvm/reference-vm/zephyr/rebuild-tvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fi
cp cmake/config.cmake "${BUILD_DIR}"
cd "${BUILD_DIR}"
sed -i 's/USE_MICRO OFF/USE_MICRO ON/' config.cmake
sed -i 's/USE_GRAPH_EXECUTOR_DEBUG OFF/USE_GRAPH_EXECUTOR_DEBUG ON/' config.cmake
sed -i 's/USE_PROFILER OFF/USE_PROFILER ON/' config.cmake
sed -i 's/USE_LLVM OFF/USE_LLVM ON/' config.cmake
cmake ..
rm -rf standalone_crt host_standalone_crt # remove stale generated files
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/LibInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function(add_lib_info src_file)
TVM_INFO_CUDA_VERSION="${TVM_INFO_CUDA_VERSION}"
TVM_INFO_USE_STACKVM_RUNTIME="${USE_STACKVM_RUNTIME}"
TVM_INFO_USE_GRAPH_EXECUTOR="${USE_GRAPH_EXECUTOR}"
TVM_INFO_USE_GRAPH_EXECUTOR_DEBUG="${USE_GRAPH_EXECUTOR_DEBUG}"
TVM_INFO_USE_PROFILER="${USE_PROFILER}"
TVM_INFO_USE_OPENMP="${USE_OPENMP}"
TVM_INFO_USE_RELAY_DEBUG="${USE_RELAY_DEBUG}"
TVM_INFO_USE_RTTI="${USE_RTTI}"
Expand Down
2 changes: 1 addition & 1 deletion conda/recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cmake ^
-DUSE_CPP_RPC=ON ^
-DUSE_SORT=ON ^
-DUSE_RANDOM=ON ^
-DUSE_GRAPH_EXECUTOR_DEBUG=ON ^
-DUSE_PROFILER=ON ^
-DINSTALL_DEV=ON ^
%SRC_DIR%

Expand Down
2 changes: 1 addition & 1 deletion conda/recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cmake -DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DUSE_CPP_RPC=OFF \
-DUSE_SORT=ON \
-DUSE_RANDOM=ON \
-DUSE_GRAPH_EXECUTOR_DEBUG=ON \
-DUSE_PROFILER=ON \
-DUSE_LLVM=ON \
-DINSTALL_DEV=ON \
-DUSE_LIBBACKTRACE=AUTO \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public NDArray debugGetOutput(String node, NDArray out) {
if (fdebugGetOutput != null) {
fdebugGetOutput.pushArg(node).pushArg(out).invoke();
} else {
throw new RuntimeException("Please compile runtime with USE_GRAPH_EXECUTOR_DEBUG = 0");
throw new RuntimeException("Please compile runtime with USE_PROFILER = ON");
}
return out;
}
Expand All @@ -162,7 +162,7 @@ public NDArray debugGetOutput(int node, NDArray out) {
if (fdebugGetOutput != null) {
fdebugGetOutput.pushArg(node).pushArg(out).invoke();
} else {
throw new RuntimeException("Please compile runtime with USE_GRAPH_EXECUTOR_DEBUG = 0");
throw new RuntimeException("Please compile runtime with USE_PROFILER = ON");
}
return out;
}
Expand Down
3 changes: 1 addition & 2 deletions python/tvm/contrib/debugger/debug_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ def create(graph_json_str, libmod, device, dump_root=None):
fcreate = tvm._ffi.get_global_func("tvm.graph_executor_debug.create")
except ValueError:
raise ValueError(
"Please set '(USE_GRAPH_EXECUTOR_DEBUG ON)' in "
"config.cmake and rebuild TVM to enable debug mode"
"Please set '(USE_PROFILER ON)' in " "config.cmake and rebuild TVM to enable debug mode"
)
func_obj = fcreate(graph_json_str, libmod, *device_type_id)
return GraphModuleDebug(func_obj, dev, graph_json_str, dump_root)
Expand Down
6 changes: 3 additions & 3 deletions src/support/libinfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
#define TVM_INFO_USE_GRAPH_EXECUTOR "NOT-FOUND"
#endif

#ifndef TVM_INFO_USE_GRAPH_EXECUTOR_DEBUG
#define TVM_INFO_USE_GRAPH_EXECUTOR_DEBUG "NOT-FOUND"
#ifndef TVM_INFO_USE_PROFILER
#define TVM_INFO_USE_PROFILER "NOT-FOUND"
#endif

#ifndef TVM_INFO_USE_OPENMP
Expand Down Expand Up @@ -244,7 +244,7 @@ TVM_DLL Map<String, String> GetLibInfo() {
{"CUDA_VERSION", TVM_INFO_CUDA_VERSION},
{"USE_STACKVM_RUNTIME", TVM_INFO_USE_STACKVM_RUNTIME},
{"USE_GRAPH_EXECUTOR", TVM_INFO_USE_GRAPH_EXECUTOR},
{"USE_GRAPH_EXECUTOR_DEBUG", TVM_INFO_USE_GRAPH_EXECUTOR_DEBUG},
{"USE_PROFILER", TVM_INFO_USE_PROFILER},
{"USE_OPENMP", TVM_INFO_USE_OPENMP},
{"USE_RELAY_DEBUG", TVM_INFO_USE_RELAY_DEBUG},
{"USE_RTTI", TVM_INFO_USE_RTTI},
Expand Down