Skip to content

Commit 9a17470

Browse files
committed
[HIPIFY][tests][Linux][fix] Fix CUDA 10.1.x tests
1 parent 415033c commit 9a17470

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

tests/unit_tests/synthetic/libraries/cusparse2rocsparse_10010_12000.cu

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %run_test hipify "%s" "%t" %hipify_args 4 --skip-excluded-preprocessor-conditional-blocks --experimental --roc --use-hip-data-types %clang_args -ferror-limit=500
1+
// RUN: %run_test hipify "%s" "%t" %hipify_args 5 --skip-excluded-preprocessor-conditional-blocks --experimental --roc --use-hip-data-types --amap %clang_args -ferror-limit=500
22

33
// CHECK: #include <hip/hip_runtime.h>
44
#include <cuda_runtime.h>
@@ -59,20 +59,12 @@ int main() {
5959
cudaDataType dataType;
6060
#endif
6161

62-
#if CUDA_VERSION >= 10010 && CUSPARSE_VERSION >= 10200
62+
#if CUDA_VERSION >= 10010
63+
64+
#if (CUSPARSE_VER_MAJOR == 10 && CUSPARSE_VER_MINOR == 2) || CUSPARSE_VERSION >= 10300
6365
// TODO: cusparseCsr2CscAlg_t has no analogue in rocSPARSE. The deletion of declaration and usage is needed to be implemented
6466
cusparseCsr2CscAlg_t Csr2CscAlg_t;
6567

66-
#if (CUDA_VERSION < 11000 && !defined(_WIN32)) || CUDA_VERSION >= 11000
67-
// CHECK: rocsparse_spmat_descr spMatDescr_t, spmatA, spmatB, spmatC;
68-
cusparseSpMatDescr_t spMatDescr_t, spmatA, spmatB, spmatC;
69-
70-
// CHECK: rocsparse_dnmat_descr dnMatDescr_t, dnmatA, dnmatB, dnmatC;
71-
cusparseDnMatDescr_t dnMatDescr_t, dnmatA, dnmatB, dnmatC;
72-
73-
// CHECK: rocsparse_spmm_alg spMMAlg_t;
74-
cusparseSpMMAlg_t spMMAlg_t;
75-
7668
// CHECK: _rocsparse_spvec_descr *spVecDescr = nullptr;
7769
// CHECK-NEXT: rocsparse_spvec_descr spVecDescr_t;
7870
cusparseSpVecDescr *spVecDescr = nullptr;
@@ -83,6 +75,18 @@ int main() {
8375
cusparseDnVecDescr *dnVecDescr = nullptr;
8476
cusparseDnVecDescr_t dnVecDescr_t, vecX, vecY;
8577
#endif
78+
79+
#if (CUDA_VERSION < 11000 && !defined(_WIN32)) || CUDA_VERSION >= 11000
80+
// CHECK: rocsparse_spmat_descr spMatDescr_t, spmatA, spmatB, spmatC;
81+
cusparseSpMatDescr_t spMatDescr_t, spmatA, spmatB, spmatC;
82+
83+
// CHECK: rocsparse_dnmat_descr dnMatDescr_t, dnmatA, dnmatB, dnmatC;
84+
cusparseDnMatDescr_t dnMatDescr_t, dnmatA, dnmatB, dnmatC;
85+
86+
// CHECK: rocsparse_spmm_alg spMMAlg_t;
87+
cusparseSpMMAlg_t spMMAlg_t;
88+
#endif
89+
8690
#endif
8791

8892
return 0;

0 commit comments

Comments
 (0)