Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
update tvm and use soft link
Browse files Browse the repository at this point in the history
  • Loading branch information
Fan committed Sep 27, 2019
1 parent 248468e commit d69cc01
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/tvm
Submodule tvm updated from afd4b3 to 16bed7
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -757,17 +757,12 @@ if(USE_TVM_OP)
endif()

add_custom_command(TARGET mxnet POST_BUILD
COMMAND ${Python3_EXECUTABLE} -m pip install --user psutil
COMMAND ${CMAKE_COMMAND} -E env
PYTHONPATH="${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/python:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/topi/python:${CMAKE_CURRENT_SOURCE_DIR}/contrib"
LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/3rdparty/tvm:$ENV{LD_LIBRARY_PATH}
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/tvmop/compile.py -o${CMAKE_CURRENT_BINARY_DIR}/libtvmop.so --config ${CMAKE_CURRENT_BINARY_DIR}/tvmop.conf
)

add_custom_command(TARGET mxnet POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/contrib/tvmop/space.py ${CMAKE_CURRENT_SOURCE_DIR}/python/mxnet/space.py
)
endif()

target_link_libraries(mxnet PUBLIC ${mxnet_LINKER_LIBS})
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -633,12 +633,10 @@ lib/libtvm_runtime.so:

lib/libtvmop.so: lib/libtvm_runtime.so $(wildcard contrib/tvmop/*/*.py contrib/tvmop/*.py)
echo "Compile TVM operators"
python3 -m pip install --user psutil
@mkdir -p $(@D)
PYTHONPATH=$(TVM_PATH)/python:$(TVM_PATH)/topi/python:$(ROOTDIR)/contrib \
LD_LIBRARY_PATH=$(ROOTDIR)/lib \
python3 $(ROOTDIR)/contrib/tvmop/compile.py -o $(ROOTDIR)/lib/libtvmop.so --config $(ROOTDIR)/tvmop.conf
cp $(ROOTDIR)/contrib/tvmop/space.py $(ROOTDIR)/python/mxnet/space.py

NNVM_INC = $(wildcard $(NNVM_PATH)/include/*/*.h)
NNVM_SRC = $(wildcard $(NNVM_PATH)/src/*/*/*.cc $(NNVM_PATH)/src/*/*.cc $(NNVM_PATH)/src/*.cc)
Expand Down
1 change: 1 addition & 0 deletions python/mxnet/space.py

0 comments on commit d69cc01

Please sign in to comment.