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

Remove CUDA < 9.2, add CUDA 11.4 #887

Merged
merged 4 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
78 changes: 19 additions & 59 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,65 +254,6 @@ trigger_pipeline:

# Build jobs
# Job with example runs.
build/cuda90/gcc/all/debug/shared:
<<: *default_build
extends:
- .quick_test_condition
- .use_gko-cuda90-gnu5-llvm39
variables:
<<: *default_variables
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_TYPE: "Debug"
FAST_TESTS: "ON"
RUN_EXAMPLES: "ON"
CUDA_ARCH: 35

build/cuda90/clang/all/release/static:
<<: *default_build
extends:
- .full_test_condition
- .use_gko-cuda90-gnu5-llvm39
variables:
<<: *default_variables
C_COMPILER: "clang"
CXX_COMPILER: "clang++"
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_TYPE: "Release"
BUILD_SHARED_LIBS: "OFF"
CUDA_ARCH: 35

# cuda 9.1 and friends
build/cuda91/gcc/all/debug/static:
<<: *default_build
extends:
- .full_test_condition
- .use_gko-cuda91-gnu6-llvm40
variables:
<<: *default_variables
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_TYPE: "Debug"
FAST_TESTS: "ON"
BUILD_SHARED_LIBS: "OFF"
CUDA_ARCH: 35

build/cuda91/clang/all/release/shared:
<<: *default_build
extends:
- .full_test_condition
- .use_gko-cuda91-gnu6-llvm40
variables:
<<: *default_variables
C_COMPILER: "clang"
CXX_COMPILER: "clang++"
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_TYPE: "Release"
CUDA_ARCH: 35


# cuda 9.2 and friends
build/cuda92/gcc/all/release/shared:
<<: *default_build_with_test
Expand All @@ -325,6 +266,7 @@ build/cuda92/gcc/all/release/shared:
BUILD_CUDA: "ON"
BUILD_HIP: "ON"
BUILD_TYPE: "Release"
RUN_EXAMPLES: "ON"
CUDA_ARCH: 61

# cuda 10.0 and friends
Expand Down Expand Up @@ -552,6 +494,24 @@ build/cuda110/intel/cuda/debug/static:
BUILD_SHARED_LIBS: "OFF"
CUDA_ARCH: 61

# cuda 11.4 and friends
build/cuda114/gcc/cuda/debug/shared:
<<: *default_build_with_test
extends:
- .quick_test_condition
- .use_gko_cuda114-gnu11-llvm12
variables:
<<: *default_variables
BUILD_OMP: "ON"
BUILD_CUDA: "ON"
BUILD_TYPE: "Debug"
FAST_TESTS: "ON"
# fix gtest issue https://github.com/google/googletest/issues/3514
CXX_FLAGS: "-Wno-error=maybe-uninitialized"
# disable spurious unused argument warning
EXTRA_CMAKE_FLAGS: "-DCMAKE_CUDA_FLAGS=-diag-suppress=177"
CUDA_ARCH: 61

# HIP AMD
build/amd/gcc/hip/debug/shared:
<<: *default_build_with_test
Expand Down
6 changes: 6 additions & 0 deletions .gitlab/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
- private_ci
- nvidia-gpu

.use_gko_cuda114-gnu11-llvm12:
image: ginkgohub/cuda:114-gnu11-llvm12
tags:
- private_ci
- nvidia-gpu

.use_gko-amd-gnu8-llvm7:
image: ginkgohub/rocm:gnu8-llvm7
tags:
Expand Down
129 changes: 0 additions & 129 deletions cuda/base/cusparse_bindings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,6 @@ inline void destroy(cusparseSpMatDescr_t descr)
#endif


// CUDA versions 9.2 and above have csrsm2.
Copy link
Member

@pratikvn pratikvn Oct 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we don't support CUDA <9.2 at all ? I thought this PR would stop using a CI job for <9.2 but we would still support <9.2 ? Maybe we can leave these #if defines, so if someone wants to compile with CUDA <9.2, they still can ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would very much complicate #764 (due to the support for multiple rhs/need for tranposition), so I would really prefer to just deprecate support for older versions. Compute capabilities down to 3.0 are still officially supported in CUDA 10, so we are not losing any hardware support by this.

Copy link
Member

@pratikvn pratikvn Oct 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, then that is fine with me. Please also update the README.md, INSTALL.md and other pages where we currently say we support CUDA 9.0+. I guess now it would be CUDA 10.0+ 9.2+

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9.2 still works fine :)

#if (defined(CUDA_VERSION) && (CUDA_VERSION >= 9020))


inline csrsm2Info_t create_solve_info()
{
csrsm2Info_t info{};
Expand All @@ -868,27 +864,6 @@ inline void destroy(csrsm2Info_t info)
}


// CUDA_VERSION<=9.1 do not support csrsm2.
#elif (defined(CUDA_VERSION) && (CUDA_VERSION < 9020))


inline cusparseSolveAnalysisInfo_t create_solve_info()
{
cusparseSolveAnalysisInfo_t info{};
GKO_ASSERT_NO_CUSPARSE_ERRORS(cusparseCreateSolveAnalysisInfo(&info));
return info;
}


inline void destroy(cusparseSolveAnalysisInfo_t info)
{
GKO_ASSERT_NO_CUSPARSE_ERRORS(cusparseDestroySolveAnalysisInfo(info));
}


#endif


inline csrilu02Info_t create_ilu0_info()
{
csrilu02Info_t info{};
Expand Down Expand Up @@ -917,10 +892,6 @@ inline void destroy(csric02Info_t info)
}


// CUDA versions 9.2 and above have csrsm2.
#if (defined(CUDA_VERSION) && (CUDA_VERSION >= 9020))


#define GKO_BIND_CUSPARSE32_BUFFERSIZEEXT(ValueType, CusparseName) \
inline void buffer_size_ext( \
cusparseHandle_t handle, int algo, cusparseOperation_t trans1, \
Expand Down Expand Up @@ -1076,106 +1047,6 @@ GKO_BIND_CUSPARSE64_CSRSM2_SOLVE(ValueType, detail::not_implemented);
#undef GKO_BIND_CUSPARSE64_CSRSM2_SOLVE


// CUDA_VERSION<=9.1 do not support csrsm2.
#elif (defined(CUDA_VERSION) && (CUDA_VERSION < 9020))


#define GKO_BIND_CUSPARSE32_CSRSM_ANALYSIS(ValueType, CusparseName) \
inline void csrsm_analysis( \
cusparseHandle_t handle, cusparseOperation_t trans, size_type m, \
size_type nnz, const cusparseMatDescr_t descr, \
const ValueType* csrVal, const int32* csrRowPtr, \
const int32* csrColInd, cusparseSolveAnalysisInfo_t factor_info) \
{ \
GKO_ASSERT_NO_CUSPARSE_ERRORS( \
CusparseName(handle, trans, m, nnz, descr, as_culibs_type(csrVal), \
csrRowPtr, csrColInd, factor_info)); \
} \
static_assert(true, \
"This assert is used to counter the false positive extra " \
"semi-colon warnings")

#define GKO_BIND_CUSPARSE64_CSRSM_ANALYSIS(ValueType, CusparseName) \
inline void csrsm_analysis( \
cusparseHandle_t handle, cusparseOperation_t trans, size_type m, \
size_type nnz, const cusparseMatDescr_t descr, \
const ValueType* csrVal, const int64* csrRowPtr, \
const int64* csrColInd, cusparseSolveAnalysisInfo_t factor_info) \
GKO_NOT_IMPLEMENTED; \
static_assert(true, \
"This assert is used to counter the " \
"false positive extra " \
"semi-colon warnings")

GKO_BIND_CUSPARSE32_CSRSM_ANALYSIS(float, cusparseScsrsm_analysis);
GKO_BIND_CUSPARSE32_CSRSM_ANALYSIS(double, cusparseDcsrsm_analysis);
GKO_BIND_CUSPARSE32_CSRSM_ANALYSIS(std::complex<float>,
cusparseCcsrsm_analysis);
GKO_BIND_CUSPARSE32_CSRSM_ANALYSIS(std::complex<double>,
cusparseZcsrsm_analysis);
GKO_BIND_CUSPARSE64_CSRSM_ANALYSIS(float, cusparseScsrsm_analysis);
GKO_BIND_CUSPARSE64_CSRSM_ANALYSIS(double, cusparseDcsrsm_analysis);
GKO_BIND_CUSPARSE64_CSRSM_ANALYSIS(std::complex<float>,
cusparseCcsrsm_analysis);
GKO_BIND_CUSPARSE64_CSRSM_ANALYSIS(std::complex<double>,
cusparseZcsrsm_analysis);
template <typename ValueType>
GKO_BIND_CUSPARSE32_CSRSM_ANALYSIS(ValueType, detail::not_implemented);
template <typename ValueType>
GKO_BIND_CUSPARSE64_CSRSM_ANALYSIS(ValueType, detail::not_implemented);
#undef GKO_BIND_CUSPARSE32_CSRSM_ANALYSIS
#undef GKO_BIND_CUSPARSE64_CSRSM_ANALYSIS

#define GKO_BIND_CUSPARSE32_CSRSM_SOLVE(ValueType, CusparseName) \
inline void csrsm_solve( \
cusparseHandle_t handle, cusparseOperation_t trans, size_type m, \
size_type n, const ValueType* one, const cusparseMatDescr_t descr, \
const ValueType* csrVal, const int32* csrRowPtr, \
const int32* csrColInd, cusparseSolveAnalysisInfo_t factor_info, \
const ValueType* rhs, int32 rhs_stride, ValueType* sol, \
int32 sol_stride) \
{ \
GKO_ASSERT_NO_CUSPARSE_ERRORS( \
CusparseName(handle, trans, m, n, as_culibs_type(one), descr, \
as_culibs_type(csrVal), csrRowPtr, csrColInd, \
factor_info, as_culibs_type(rhs), rhs_stride, \
as_culibs_type(sol), sol_stride)); \
} \
static_assert(true, \
"This assert is used to counter the false positive extra " \
"semi-colon warnings")

#define GKO_BIND_CUSPARSE64_CSRSM_SOLVE(ValueType, CusparseName) \
inline void csrsm_solve( \
cusparseHandle_t handle, cusparseOperation_t trans1, size_type m, \
size_type n, const ValueType* one, const cusparseMatDescr_t descr, \
const ValueType* csrVal, const int64* csrRowPtr, \
const int64* csrColInd, cusparseSolveAnalysisInfo_t factor_info, \
const ValueType* rhs, int64 rhs_stride, ValueType* sol, \
int64 sol_stride) GKO_NOT_IMPLEMENTED; \
static_assert(true, \
"This assert is used to counter the false positive extra " \
"semi-colon warnings")

GKO_BIND_CUSPARSE32_CSRSM_SOLVE(float, cusparseScsrsm_solve);
GKO_BIND_CUSPARSE32_CSRSM_SOLVE(double, cusparseDcsrsm_solve);
GKO_BIND_CUSPARSE32_CSRSM_SOLVE(std::complex<float>, cusparseCcsrsm_solve);
GKO_BIND_CUSPARSE32_CSRSM_SOLVE(std::complex<double>, cusparseZcsrsm_solve);
GKO_BIND_CUSPARSE64_CSRSM_SOLVE(float, cusparseScsrsm_solve);
GKO_BIND_CUSPARSE64_CSRSM_SOLVE(double, cusparseDcsrsm_solve);
GKO_BIND_CUSPARSE64_CSRSM_SOLVE(std::complex<float>, cusparseCcsrsm_solve);
GKO_BIND_CUSPARSE64_CSRSM_SOLVE(std::complex<double>, cusparseZcsrsm_solve);
template <typename ValueType>
GKO_BIND_CUSPARSE32_CSRSM_SOLVE(ValueType, detail::not_implemented);
template <typename ValueType>
GKO_BIND_CUSPARSE64_CSRSM_SOLVE(ValueType, detail::not_implemented);
#undef GKO_BIND_CUSPARSE32_CSRSM_SOLVE
#undef GKO_BIND_CUSPARSE64_CSRSM_SOLVE


#endif


template <typename IndexType>
void create_identity_permutation(cusparseHandle_t handle, IndexType size,
IndexType* permutation) GKO_NOT_IMPLEMENTED;
Expand Down
Loading