[example/tensorflow] no longer hardcoding library dir
This commit is contained in:
@@ -7,4 +7,9 @@ if(${TensorFlow_FOUND})
|
|||||||
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${TF_ABI})
|
add_definitions(-D_GLIBCXX_USE_CXX11_ABI=${TF_ABI})
|
||||||
add_library(tf_blocksparse SHARED dot.cpp)
|
add_library(tf_blocksparse SHARED dot.cpp)
|
||||||
target_link_libraries(tf_blocksparse tensorflow_framework triton)
|
target_link_libraries(tf_blocksparse tensorflow_framework triton)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET tf_blocksparse POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/run.py
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/run.py)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -3,7 +3,7 @@ import tensorflow as tf
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
from time import time
|
from time import time
|
||||||
data_files_path = tf.resource_loader.get_data_files_path()
|
data_files_path = tf.resource_loader.get_data_files_path()
|
||||||
library_dir = '/home/philippe/development/triton/build/examples/python/tensorflow'
|
library_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
module = tf.load_op_library(os.path.join(library_dir, 'libtf_blocksparse.so'))
|
module = tf.load_op_library(os.path.join(library_dir, 'libtf_blocksparse.so'))
|
||||||
|
|
||||||
M, N, K = 256,256,256
|
M, N, K = 256,256,256
|
||||||
|
Reference in New Issue
Block a user