[BUILD] Remove libtopi from the build (#6189)
authorTianqi Chen <tqchen@users.noreply.github.com>
Sun, 2 Aug 2020 23:51:22 +0000 (16:51 -0700)
committerGitHub <noreply@github.com>
Sun, 2 Aug 2020 23:51:22 +0000 (16:51 -0700)
CMakeLists.txt
apps/README.md
conda/tvm/meta.yaml
rust/tvm-rt/README.md
tests/scripts/task_python_nightly.sh

index 1c66712..0ef2163 100644 (file)
@@ -196,6 +196,7 @@ file(GLOB_RECURSE COMPILER_SRCS
     src/te/*.cc
     src/autotvm/*.cc
     src/tir/*.cc
+    src/topi/*.cc
     src/driver/*.cc
     src/parser/*.cc
     src/printer/*.cc
@@ -243,11 +244,6 @@ endif(USE_VM_PROFILER)
 file(GLOB DATATYPE_SRCS src/target/datatype/*.cc)
 list(APPEND COMPILER_SRCS ${DATATYPE_SRCS})
 
-
-file(GLOB TOPI_SRCS
-    src/topi/*.cc
-)
-
 file(GLOB RUNTIME_SRCS
   src/runtime/*.cc
   src/runtime/vm/*.cc
@@ -341,8 +337,7 @@ else()
   set(CMAKE_CUDA_STANDARD 14)
 endif()
 
-add_library(tvm SHARED ${COMPILER_SRCS} ${RUNTIME_SRCS} ${TOPI_SRCS})
-add_library(tvm_topi SHARED ${TOPI_SRCS})
+add_library(tvm SHARED ${COMPILER_SRCS} ${RUNTIME_SRCS})
 add_library(tvm_runtime SHARED ${RUNTIME_SRCS})
 
 if(USE_CPP_RPC)
@@ -360,11 +355,9 @@ endif(USE_RELAY_DEBUG)
 if(USE_FALLBACK_STL_MAP)
   message(STATUS "Building with STL Map...")
   set_target_properties(tvm PROPERTIES COMPILE_DEFINITIONS "USE_FALLBACK_STL_MAP=1")
-  set_target_properties(tvm_topi PROPERTIES COMPILE_DEFINITIONS "USE_FALLBACK_STL_MAP=1")
 else()
   message(STATUS "Building with TVM Map...")
   set_target_properties(tvm PROPERTIES COMPILE_DEFINITIONS "USE_FALLBACK_STL_MAP=0")
-  set_target_properties(tvm_topi PROPERTIES COMPILE_DEFINITIONS "USE_FALLBACK_STL_MAP=0")
 endif(USE_FALLBACK_STL_MAP)
 
 if(BUILD_FOR_HEXAGON)
@@ -385,12 +378,10 @@ if(USE_THREADS AND NOT BUILD_FOR_HEXAGON)
   set(THREADS_PREFER_PTHREAD_FLAG TRUE)
   find_package(Threads REQUIRED)
   target_link_libraries(tvm Threads::Threads)
-  target_link_libraries(tvm_topi Threads::Threads)
   target_link_libraries(tvm_runtime Threads::Threads)
 endif()
 
 target_link_libraries(tvm ${TVM_LINKER_LIBS} ${TVM_RUNTIME_LINKER_LIBS})
-target_link_libraries(tvm_topi tvm ${TVM_LINKER_LIBS} ${TVM_RUNTIME_LINKER_LIBS})
 target_link_libraries(tvm_runtime ${TVM_RUNTIME_LINKER_LIBS})
 
 if (HIDE_PRIVATE_SYMBOLS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@@ -399,7 +390,6 @@ if (HIDE_PRIVATE_SYMBOLS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   # but it's not available until CMake 3.13. Switch to 'target_link_options'
   # once minimum CMake version is bumped up to 3.13 or above.
   target_link_libraries(tvm ${HIDE_SYMBOLS_LINKER_FLAGS})
-  target_link_libraries(tvm_topi ${HIDE_SYMBOLS_LINKER_FLAGS})
   target_link_libraries(tvm_runtime ${HIDE_SYMBOLS_LINKER_FLAGS})
 endif()
 
@@ -438,7 +428,6 @@ add_custom_target(runtime DEPENDS tvm_runtime)
 
 # Installation rules
 install(TARGETS tvm DESTINATION lib${LIB_SUFFIX})
-install(TARGETS tvm_topi DESTINATION lib${LIB_SUFFIX})
 install(TARGETS tvm_runtime DESTINATION lib${LIB_SUFFIX})
 
 if (INSTALL_DEV)
index 6db95ac..41c3924 100644 (file)
@@ -19,7 +19,6 @@
 This folder contains various extension projects using TVM,
 they also serve as examples on how to use TVM in your own project.
 
-If you are interested in writing optimized kernels with TVM, checkout [TOPI: TVM Operator Inventory](../topi).
 
 - [extension](extension) How to extend TVM C++ api along with python API.
 - [ios_rpc](ios_rpc) iOS RPC server.
index 829dc4b..39f6d21 100644 (file)
@@ -47,7 +47,6 @@ requirements:
 test:
   imports:
     - tvm
-    - topi
   requires:
     - pytest
     - scipy
index 662687e..a586cd7 100644 (file)
@@ -40,7 +40,7 @@ Please follow TVM [installation](https://tvm.apache.org/docs/install/index.html)
 One can use `register!` macro to expose a Rust closure with arguments which implement `TryFrom<ArgValue>`
 and return types which implement `Into<RetValue>`. Once registered with TVM these functions can be
 accessed via Python or C++, or any other language which implements the TVM packed function convention
-see `docs.tvm.ai` for more information.
+see the offcial documentation for more information.
 
 ```rust
 use tvm_rt::{ArgValue, RetValue};
index c2c0eab..36a6205 100755 (executable)
@@ -27,4 +27,4 @@ make cython3
 # cleanup pycache
 find . -type f -path "*.pyc" | xargs rm -f
 
-python3 -m pytest topi/tests/python/nightly
+python3 -m pytest tests/python/topi/nightly