Skip to content

Commit

Permalink
Remove unnecessary utility code (#6)
Browse files Browse the repository at this point in the history
* Remove unnecessary utility code

* remove code relaying on cmake 3.6+
  • Loading branch information
ziyu-guo authored and wweic committed Mar 2, 2019
1 parent 303e228 commit a7b1b83
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
36 changes: 0 additions & 36 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,36 +29,6 @@ tvm_option(USE_ROCM "Build with ROCM" OFF)
tvm_option(ROCM_PATH "The path to rocm" /opt/rocm)
tvm_option(USE_RPC "Build with RPC" ON)
tvm_option(USE_LLVM "Build with LLVM, can be set to specific llvm-config path" OFF)
if(USE_LLVM STREQUAL "ON")
getFromList(BUILD_PATH_SRC ".*LLVM.*" LLVM_PATH)
endif()
if(USE_CUDA STREQUAL "ON")
getFromList(BUILD_PATH_SRC ".*\/Cuda.*" USE_CUDA)
execute_process(COMMAND ls ${USE_CUDA} OUTPUT_VARIABLE CUDA_SRC_DIR)
if (NOT ${CUDA_SRC_DIR} MATCHES "build[^-]")
set(USE_CUDA ${USE_CUDA}/../../DEV.STD.PTHREAD/build)
else()
set(USE_CUDA ${USE_CUDA}/build)
endif()
endif()
if(USE_CUDNN STREQUAL "ON")
getFromList(BUILD_PATH_SRC ".*Cudnn.*" USE_CUDNN)
execute_process(COMMAND ls ${USE_CUDNN} OUTPUT_VARIABLE CUDNN_SRC_DIR)
if (NOT ${CUDNN_SRC_DIR} MATCHES "build[^-]")
set(USE_CUDNN ${USE_CUDNN}/../../DEV.STD.PTHREAD/build)
else()
set(USE_CUDNN ${USE_CUDNN}/build)
endif()
endif()
if(USE_TENSORRT STREQUAL "ON")
getFromList(BUILD_PATH_SRC ".*DLC_TENSORRT.*" USE_TENSORRT)
execute_process(COMMAND ls ${USE_TENSORRT} OUTPUT_VARIABLE TENSORRT_SRC_DIR)
if (NOT ${TENSORRT_SRC_DIR} MATCHES "Config")
set(USE_TENSORRT ${USE_TENSORRT}/../../DEV.STD.PTHREAD/build)
else()
set(USE_TENSORRT ${USE_TENSORRT}/build)
endif()
endif()
tvm_option(USE_STACKVM_RUNTIME "Include stackvm into the runtime" OFF)
tvm_option(USE_GRAPH_RUNTIME "Build with tiny graph runtime" ON)
tvm_option(USE_GRAPH_RUNTIME_DEBUG "Build with tiny graph runtime debug mode" OFF)
Expand Down Expand Up @@ -161,14 +131,8 @@ file(GLOB_RECURSE NNVM_COMPILER_SRCS
nnvm/src/core/*.cc
nnvm/src/pass/*.cc
nnvm/src/compiler/*.cc
nnvm/src/frontend/*.cc
nnvm/src/top/*.cc
3rdparty/dmlc-core/src/*.cc
3rdparty/dmlc-core/include/*.h
)
list(FILTER NNVM_COMPILER_SRCS EXCLUDE REGEX ".*/io/azure_filesys.cc")
list(FILTER NNVM_COMPILER_SRCS EXCLUDE REGEX ".*/io/hdfs_filesys.cc")
list(FILTER NNVM_COMPILER_SRCS EXCLUDE REGEX ".*/io/s3_filesys.cc")

file(GLOB TOPI_SRCS
topi/src/*.cc
Expand Down
3 changes: 0 additions & 3 deletions nnvm/src/compiler/alter_op_layout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,8 @@ Graph AlterOpLayout(const Graph& src) {
const auto& layouts = src.GetAttr<std::vector<Layout> >("layout");
for (uint32_t nid = 0; nid < idx_graph.num_nodes(); ++nid) {
const auto &inode = idx_graph[nid];
<<<<<<< HEAD
=======
// record input layouts for all nodes,
// while replaced nodes will ignore the records here and have undefined input layouts.
>>>>>>> [Bugfix] Recover original layout when alter_layout function return None (#2101)
std::vector<Layout> in_layout;
for (const auto& e : inode.inputs) {
in_layout.emplace_back(layouts[idx_graph.entry_id(e)]);
Expand Down

0 comments on commit a7b1b83

Please sign in to comment.