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