-
Notifications
You must be signed in to change notification settings - Fork 91
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
Unify more CUDA and HIP files into common #1516
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1bbc923
run script
upsj 0bec810
unify missing files, CMake changes
upsj c3d2b59
adapt headers
upsj ea542f2
fix fbcsr instantiation
upsj 885b213
fix includes for thrust and sparselib block
upsj 2941a30
revert batch changes
upsj 0dfba21
fix batch
upsj d2420b4
add newlines to the end of files where missing
upsj 6511ede
unify index_map
upsj c05b054
unify stopping criteria
upsj e72dc9a
fix include guard naming
upsj 8549e82
fix formatting
upsj a0f5a82
add unification script
upsj 11d1064
mirror cuda_hip in generated headers
upsj d10c4e7
fix HIP warnings
upsj d47dab2
review updates
upsj 391a638
Revert "add unification script"
upsj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
add_subdirectory(unified) | ||
add_subdirectory(cuda_hip) | ||
set(GKO_UNIFIED_COMMON_SOURCES ${GKO_UNIFIED_COMMON_SOURCES} PARENT_SCOPE) | ||
set(GKO_CUDA_HIP_COMMON_SOURCES ${GKO_CUDA_HIP_COMMON_SOURCES} PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
include(${PROJECT_SOURCE_DIR}/cmake/template_instantiation.cmake) | ||
set(CUDA_HIP_SOURCES | ||
base/device_matrix_data_kernels.cpp | ||
components/prefix_sum_kernels.cpp | ||
distributed/index_map_kernels.cpp | ||
distributed/matrix_kernels.cpp | ||
distributed/partition_helpers_kernels.cpp | ||
distributed/partition_kernels.cpp | ||
distributed/vector_kernels.cpp | ||
factorization/cholesky_kernels.cpp | ||
factorization/factorization_kernels.cpp | ||
factorization/lu_kernels.cpp | ||
factorization/par_ic_kernels.cpp | ||
factorization/par_ilu_kernels.cpp | ||
matrix/coo_kernels.cpp | ||
matrix/dense_kernels.cpp | ||
matrix/diagonal_kernels.cpp | ||
matrix/ell_kernels.cpp | ||
matrix/sellp_kernels.cpp | ||
matrix/sparsity_csr_kernels.cpp | ||
multigrid/pgm_kernels.cpp | ||
preconditioner/isai_kernels.cpp | ||
preconditioner/jacobi_kernels.cpp | ||
reorder/rcm_kernels.cpp | ||
solver/cb_gmres_kernels.cpp | ||
solver/idr_kernels.cpp | ||
solver/multigrid_kernels.cpp | ||
stop/criterion_kernels.cpp | ||
stop/residual_norm_kernels.cpp | ||
) | ||
list(TRANSFORM CUDA_HIP_SOURCES PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/) | ||
set(GKO_CUDA_HIP_COMMON_SOURCES ${CUDA_HIP_SOURCES} PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#ifndef GKO_COMMON_CUDA_HIP_BASE_SPARSELIB_BLOCK_BINDINGS_HPP_ | ||
#define GKO_COMMON_CUDA_HIP_BASE_SPARSELIB_BLOCK_BINDINGS_HPP_ | ||
|
||
|
||
#if defined(GKO_COMPILING_CUDA) | ||
#include "cuda/base/cusparse_block_bindings.hpp" | ||
#elif defined(GKO_COMPILING_HIP) | ||
#include "hip/base/hipsparse_block_bindings.hip.hpp" | ||
#else | ||
#error "Executor definition missing" | ||
#endif | ||
|
||
|
||
#endif // GKO_COMMON_CUDA_HIP_BASE_SPARSELIB_BLOCK_BINDINGS_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when it becomes the header, it needs the header guard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The file is not self-sufficient without the
unified/kernel_launch.hpp
header, just like before, so it does not need one.