From 28c9cca853ad41c0b9c23675e12308bc1e0ddad7 Mon Sep 17 00:00:00 2001 From: Ziyu Guo Date: Fri, 1 Mar 2019 23:45:36 +0000 Subject: [PATCH 1/2] Remove unnecessary utility code --- CMakeLists.txt | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 192aae209847..de88f1f10681 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) From c5d4b5ee9b4ed0a9012e031a117c189bcd1eefcd Mon Sep 17 00:00:00 2001 From: Ziyu Guo Date: Sat, 2 Mar 2019 02:41:35 +0000 Subject: [PATCH 2/2] remove code relaying on cmake 3.6+ --- CMakeLists.txt | 6 ------ nnvm/src/compiler/alter_op_layout.cc | 3 --- 2 files changed, 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de88f1f10681..9db4dcd826ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,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 diff --git a/nnvm/src/compiler/alter_op_layout.cc b/nnvm/src/compiler/alter_op_layout.cc index f70b4f1b625b..f62e39efd9eb 100644 --- a/nnvm/src/compiler/alter_op_layout.cc +++ b/nnvm/src/compiler/alter_op_layout.cc @@ -56,11 +56,8 @@ Graph AlterOpLayout(const Graph& src) { const auto& layouts = src.GetAttr >("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 in_layout; for (const auto& e : inode.inputs) { in_layout.emplace_back(layouts[idx_graph.entry_id(e)]);