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
2
2
3
3
// CHECK: #include <hip/hip_runtime.h>
4
4
#include < cuda_runtime.h>
@@ -59,20 +59,12 @@ int main() {
59
59
cudaDataType dataType;
60
60
#endif
61
61
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
63
65
// TODO: cusparseCsr2CscAlg_t has no analogue in rocSPARSE. The deletion of declaration and usage is needed to be implemented
64
66
cusparseCsr2CscAlg_t Csr2CscAlg_t;
65
67
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
-
76
68
// CHECK: _rocsparse_spvec_descr *spVecDescr = nullptr;
77
69
// CHECK-NEXT: rocsparse_spvec_descr spVecDescr_t;
78
70
cusparseSpVecDescr *spVecDescr = nullptr ;
@@ -83,6 +75,18 @@ int main() {
83
75
cusparseDnVecDescr *dnVecDescr = nullptr ;
84
76
cusparseDnVecDescr_t dnVecDescr_t, vecX, vecY;
85
77
#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
+
86
90
#endif
87
91
88
92
return 0 ;
0 commit comments