2020-09-25 07:26:29 +08:00
|
|
|
include_directories(
|
|
|
|
${TORCH_INCLUDE_DIRS}
|
|
|
|
${TORCH_INSTALL_PREFIX}/include/TH
|
|
|
|
${TORCH_INSTALL_PREFIX}/include/THC/opt/pytorch/pytorch
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2020-11-18 08:04:14 +08:00
|
|
|
${Python3_INCLUDE_DIRS}
|
2020-09-25 07:26:29 +08:00
|
|
|
)
|
|
|
|
link_directories("${TORCH_INSTALL_PREFIX}/lib")
|
2020-11-13 14:27:05 +08:00
|
|
|
add_library(npcomp_torch_builder_bindings
|
2020-09-26 09:13:16 +08:00
|
|
|
acap_dispatch.cpp
|
2020-10-30 08:41:15 +08:00
|
|
|
debug.cpp
|
2020-10-02 09:59:58 +08:00
|
|
|
func_builder.cpp
|
2020-09-29 09:36:00 +08:00
|
|
|
module_builder.cpp
|
2020-09-25 07:26:29 +08:00
|
|
|
python_bindings.cpp
|
|
|
|
)
|
|
|
|
|
2020-11-13 14:27:05 +08:00
|
|
|
target_link_libraries(npcomp_torch_builder_bindings
|
2020-09-25 07:26:29 +08:00
|
|
|
${TORCH_LIBRARIES}
|
2020-11-18 08:04:14 +08:00
|
|
|
${Python3_LIBRARIES}
|
2020-09-25 07:26:29 +08:00
|
|
|
torch_python
|
|
|
|
)
|