Skip to content

Commit

Permalink
[BUILD] Remove libtopi from the build (apache#6189)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored and trevor-m committed Sep 3, 2020
1 parent 388514a commit 520f61a
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
14 changes: 2 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,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
Expand Down Expand Up @@ -258,10 +259,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
Expand Down Expand Up @@ -356,8 +353,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})
add_library(tvm_runtime_static STATIC ${RUNTIME_SRCS})

Expand All @@ -376,11 +372,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)
Expand All @@ -401,12 +395,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")
Expand All @@ -415,7 +407,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()

Expand Down Expand Up @@ -454,7 +445,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)
Expand Down
1 change: 0 additions & 1 deletion apps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 0 additions & 1 deletion conda/tvm/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ requirements:
test:
imports:
- tvm
- topi
requires:
- pytest
- scipy
Expand Down
2 changes: 1 addition & 1 deletion rust/tvm-rt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/task_python_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 520f61a

Please sign in to comment.