Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sparse solver on GPU #600

Merged
merged 10 commits into from
Mar 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update cmake file
nychiang committed Mar 13, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 3b42f8df5f06de139baa5ad174ab5b8874b7c5c4
18 changes: 18 additions & 0 deletions src/Drivers/Sparse/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -7,6 +7,19 @@ target_link_libraries(NlpSparseEx2.exe HiOp::HiOp)
add_executable(NlpSparseEx3.exe NlpSparseEx3.cpp NlpSparseEx3Driver.cpp)
target_link_libraries(NlpSparseEx3.exe HiOp::HiOp)

if(HIOP_USE_RAJA)
if(HIOP_USE_GPU AND HIOP_USE_CUDA)
set_source_files_properties(
NlpSparseRajaEx2.cpp
NlpSparseRajaEx2Driver.cpp
PROPERTIES LANGUAGE CUDA
)
endif()
add_executable(NlpSparseRajaEx2.exe NlpSparseRajaEx2Driver.cpp NlpSparseRajaEx2.cpp)
target_link_libraries(NlpSparseRajaEx2.exe HiOp::HiOp)
install(TARGETS NlpSparseRajaEx2.exe DESTINATION bin)
endif()

if(HIOP_BUILD_SHARED)
add_executable(NlpSparseCEx1.exe NlpSparseCEx1.c)
target_link_libraries(NlpSparseCEx1.exe HiOp::HiOp)
@@ -52,6 +65,11 @@ if(HIOP_USE_GINKGO)
add_test(NAME NlpSparse2_6 COMMAND ${RUNCMD} "$<TARGET_FILE:NlpSparseEx2.exe>" "500" "-ginkgo_hip" "-inertiafree" "-selfcheck")
endif(HIOP_USE_HIP)
endif(HIOP_USE_GINKGO)

if(HIOP_USE_RAJA)
add_test(NAME NlpSparseRaja2_1 COMMAND ${RUNCMD} bash -c "$<TARGET_FILE:NlpSparseRajaEx2.exe> 500 -selfcheck ")
endif()

add_test(NAME NlpSparse3_1 COMMAND ${RUNCMD} "$<TARGET_FILE:NlpSparseEx3.exe>" "500" "-selfcheck")
if(HIOP_BUILD_SHARED AND NOT HIOP_USE_GPU)
add_test(NAME NlpSparseCinterface COMMAND ${RUNCMD} "$<TARGET_FILE:NlpSparseCEx1.exe>")