Skip to content

Commit

Permalink
Merge pull request #1528 from emankov/HIPIFY
Browse files Browse the repository at this point in the history
[HIPIFY][tests][Linux][fix] Fix `CUDA 10.1.x` tests
  • Loading branch information
emankov authored Jun 7, 2024
2 parents b8f6dfa + 9a17470 commit d7d0f07
Showing 1 changed file with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 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
// 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

// CHECK: #include <hip/hip_runtime.h>
#include <cuda_runtime.h>
Expand Down Expand Up @@ -59,20 +59,12 @@ int main() {
cudaDataType dataType;
#endif

#if CUDA_VERSION >= 10010 && CUSPARSE_VERSION >= 10200
#if CUDA_VERSION >= 10010

#if (CUSPARSE_VER_MAJOR == 10 && CUSPARSE_VER_MINOR == 2) || CUSPARSE_VERSION >= 10300
// TODO: cusparseCsr2CscAlg_t has no analogue in rocSPARSE. The deletion of declaration and usage is needed to be implemented
cusparseCsr2CscAlg_t Csr2CscAlg_t;

#if (CUDA_VERSION < 11000 && !defined(_WIN32)) || CUDA_VERSION >= 11000
// CHECK: rocsparse_spmat_descr spMatDescr_t, spmatA, spmatB, spmatC;
cusparseSpMatDescr_t spMatDescr_t, spmatA, spmatB, spmatC;

// CHECK: rocsparse_dnmat_descr dnMatDescr_t, dnmatA, dnmatB, dnmatC;
cusparseDnMatDescr_t dnMatDescr_t, dnmatA, dnmatB, dnmatC;

// CHECK: rocsparse_spmm_alg spMMAlg_t;
cusparseSpMMAlg_t spMMAlg_t;

// CHECK: _rocsparse_spvec_descr *spVecDescr = nullptr;
// CHECK-NEXT: rocsparse_spvec_descr spVecDescr_t;
cusparseSpVecDescr *spVecDescr = nullptr;
Expand All @@ -83,6 +75,18 @@ int main() {
cusparseDnVecDescr *dnVecDescr = nullptr;
cusparseDnVecDescr_t dnVecDescr_t, vecX, vecY;
#endif

#if (CUDA_VERSION < 11000 && !defined(_WIN32)) || CUDA_VERSION >= 11000
// CHECK: rocsparse_spmat_descr spMatDescr_t, spmatA, spmatB, spmatC;
cusparseSpMatDescr_t spMatDescr_t, spmatA, spmatB, spmatC;

// CHECK: rocsparse_dnmat_descr dnMatDescr_t, dnmatA, dnmatB, dnmatC;
cusparseDnMatDescr_t dnMatDescr_t, dnmatA, dnmatB, dnmatC;

// CHECK: rocsparse_spmm_alg spMMAlg_t;
cusparseSpMMAlg_t spMMAlg_t;
#endif

#endif

return 0;
Expand Down

0 comments on commit d7d0f07

Please sign in to comment.