diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2aa3fdc9..306b15c3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,37 +2,43 @@ include_directories(.) add_library(libcommon OBJECT - exception.cpp cnpy/cnpy.cpp + exception.cpp ) +cuda_add_library(common_cuda + expressions.cu + test.cu + tensor.cu + tensor_operators.cu +) + +target_link_libraries(common_cuda) + cuda_add_executable( marian - test.cu - expressions.cu tensor_operators.cu - tensor.cu $ ) +target_link_libraries(marian common_cuda) + cuda_add_executable( train_mnist train_mnist.cu - expressions.cu - tensor_operators.cu - tensor.cu $ ) +target_link_libraries(train_mnist common_cuda) + cuda_add_executable( validate_mnist validate_mnist.cu - expressions.cu - tensor_operators.cu - tensor.cu $ ) +target_link_libraries(validate_mnist common_cuda) + foreach(exec marian train_mnist validate_mnist) target_link_libraries(${exec} ${EXT_LIBS} cuda cudnn) cuda_add_cublas_to_target(${exec}) diff --git a/src/npz_converter.cpp b/src/npz_converter.cpp index 1ecbc11c..771ff11c 100644 --- a/src/npz_converter.cpp +++ b/src/npz_converter.cpp @@ -1,4 +1,4 @@ -#include "common/npz_converter.h" +#include "npz_converter.h"