From a7b1b83e14292805bafad75109d8713bd7d681f1 Mon Sep 17 00:00:00 2001 From: ziyu-guo <40365354+ziyu-guo@users.noreply.github.com> Date: Sat, 2 Mar 2019 15:18:39 -0800 Subject: [PATCH] Remove unnecessary utility code (#6) * Remove unnecessary utility code * remove code relaying on cmake 3.6+ --- CMakeLists.txt | 36 ---------------------------- nnvm/src/compiler/alter_op_layout.cc | 3 --- 2 files changed, 39 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 192aae209847..9db4dcd826ce 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) @@ -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 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)]);