mirror of
https://github.com/marian-nmt/marian.git
synced 2024-09-17 09:47:34 +03:00
create marian lib
This commit is contained in:
parent
adbc97f448
commit
ab8bef8a03
@ -1,43 +1,37 @@
|
||||
|
||||
include_directories(.)
|
||||
|
||||
add_library(libcommon OBJECT
|
||||
cuda_add_library(marian_lib
|
||||
cnpy/cnpy.cpp
|
||||
exception.cpp
|
||||
)
|
||||
|
||||
cuda_add_library(common_cuda
|
||||
expressions.cu
|
||||
test.cu
|
||||
tensor.cu
|
||||
tensor_operators.cu
|
||||
)
|
||||
|
||||
target_link_libraries(common_cuda)
|
||||
target_link_libraries(marian_lib)
|
||||
|
||||
cuda_add_executable(
|
||||
marian
|
||||
tensor_operators.cu
|
||||
$<TARGET_OBJECTS:libcommon>
|
||||
)
|
||||
|
||||
target_link_libraries(marian common_cuda)
|
||||
target_link_libraries(marian marian_lib)
|
||||
|
||||
cuda_add_executable(
|
||||
train_mnist
|
||||
train_mnist.cu
|
||||
$<TARGET_OBJECTS:libcommon>
|
||||
)
|
||||
|
||||
target_link_libraries(train_mnist common_cuda)
|
||||
target_link_libraries(train_mnist marian_lib)
|
||||
|
||||
cuda_add_executable(
|
||||
validate_mnist
|
||||
validate_mnist.cu
|
||||
$<TARGET_OBJECTS:libcommon>
|
||||
)
|
||||
|
||||
target_link_libraries(validate_mnist common_cuda)
|
||||
target_link_libraries(validate_mnist marian_lib)
|
||||
|
||||
foreach(exec marian train_mnist validate_mnist)
|
||||
target_link_libraries(${exec} ${EXT_LIBS} cuda cudnn)
|
||||
|
Loading…
Reference in New Issue
Block a user