2019-05-03 14:30:06 -04:00
|
|
|
find_package(TensorFlow)
|
|
|
|
if(${TensorFlow_FOUND})
|
|
|
|
set(CUDA_HOME "/usr/local/cuda")
|
|
|
|
include_directories("${TF_INC}/tensorflow/include")
|
|
|
|
include_directories("${CUDA_HOME}/include")
|
|
|
|
link_directories(${TF_LIB})
|
2019-06-05 14:43:38 -07:00
|
|
|
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${TF_ABI})
|
2019-06-26 18:50:53 -07:00
|
|
|
add_library(tf_blocksparse SHARED dot.cpp conv2d.cpp)
|
2019-05-03 14:30:06 -04:00
|
|
|
target_link_libraries(tf_blocksparse tensorflow_framework triton)
|
2019-06-11 13:27:54 -07:00
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run.py
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/run.py
|
|
|
|
COPYONLY)
|
2019-05-03 14:30:06 -04:00
|
|
|
endif()
|