Skip to content

Commit

Permalink
Merge dropping support for CUDA < 9.2, adding CUDA 11.4
Browse files Browse the repository at this point in the history
This removes all CUDA 9.1 and 9.0-specific workarounds and adds a CUDA 11.4 CI job

Related PR: #887
  • Loading branch information
upsj committed Oct 5, 2021
2 parents b89eb71 + eca1fc7 commit b9013be
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 316 deletions.
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ For Ginkgo core library:

The Ginkgo CUDA module has the following __additional__ requirements:

* _CUDA 9.0+_
* _CUDA 9.2+_
* Any host compiler restrictions your version of CUDA may impose also apply
here. For the newest CUDA version, this information can be found in the
[CUDA installation guide for Linux](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html)
Expand Down Expand Up @@ -87,7 +87,7 @@ __NOTE:__ Need to add `--autocrlf=input` after `git clone` in _Cygwin_.

The Ginkgo CUDA module has the following __additional__ requirements:

* _CUDA 9.0+_
* _CUDA 9.2+_
* _Microsoft Visual Studio_
* Any host compiler restrictions your version of CUDA may impose also apply
here. For the newest CUDA version, this information can be found in the
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.
#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

0 comments on commit b9013be

Please sign in to comment.