From a6bdde33d668fa9b7d6bc1a0cd47d6d0c9c2d649 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Wed, 15 Nov 2023 12:27:45 +0100 Subject: [PATCH] [HIPIFY][BLAS][tests][fix] CUDA < 8.0 test fixes + [Reason] `cublasGemmAlgo_t` appeared in CUDA 8.0 --- tests/unit_tests/synthetic/libraries/cublas2rocblas.cu | 10 +++++----- .../synthetic/libraries/cublas2rocblas_v2.cu | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/unit_tests/synthetic/libraries/cublas2rocblas.cu b/tests/unit_tests/synthetic/libraries/cublas2rocblas.cu index ecd2f2f7..5c2c43d1 100644 --- a/tests/unit_tests/synthetic/libraries/cublas2rocblas.cu +++ b/tests/unit_tests/synthetic/libraries/cublas2rocblas.cu @@ -77,11 +77,6 @@ int main() { cublasAtomicsMode_t BLAS_ATOMICS_NOT_ALLOWED = CUBLAS_ATOMICS_NOT_ALLOWED; cublasAtomicsMode_t BLAS_ATOMICS_ALLOWED = CUBLAS_ATOMICS_ALLOWED; - // CHECK: rocblas_gemm_algo blasGemmAlgo; - // CHECK-NEXT: rocblas_gemm_algo BLAS_GEMM_DFALT = rocblas_gemm_algo_standard; - cublasGemmAlgo_t blasGemmAlgo; - cublasGemmAlgo_t BLAS_GEMM_DFALT = CUBLAS_GEMM_DFALT; - // CHECK: rocblas_handle blasHandle; cublasHandle_t blasHandle; @@ -1618,6 +1613,11 @@ int main() { // CHECK: rocblas_datatype DataType_2, DataType_3; cudaDataType DataType_2, DataType_3; + // CHECK: rocblas_gemm_algo blasGemmAlgo; + // CHECK-NEXT: rocblas_gemm_algo BLAS_GEMM_DFALT = rocblas_gemm_algo_standard; + cublasGemmAlgo_t blasGemmAlgo; + cublasGemmAlgo_t BLAS_GEMM_DFALT = CUBLAS_GEMM_DFALT; + // TODO: #1281 // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasNrm2Ex(cublasHandle_t handle, int n, const void* x, cudaDataType xType, int incx, void* result, cudaDataType resultType, cudaDataType executionType); // ROC: ROCBLAS_EXPORT rocblas_status rocblas_nrm2_ex(rocblas_handle handle, rocblas_int n, const void* x, rocblas_datatype x_type, rocblas_int incx, void* results, rocblas_datatype result_type, rocblas_datatype execution_type); diff --git a/tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu b/tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu index 1a235c2d..28ac0ac0 100644 --- a/tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu +++ b/tests/unit_tests/synthetic/libraries/cublas2rocblas_v2.cu @@ -78,11 +78,6 @@ int main() { cublasAtomicsMode_t BLAS_ATOMICS_NOT_ALLOWED = CUBLAS_ATOMICS_NOT_ALLOWED; cublasAtomicsMode_t BLAS_ATOMICS_ALLOWED = CUBLAS_ATOMICS_ALLOWED; - // CHECK: rocblas_gemm_algo blasGemmAlgo; - // CHECK-NEXT: rocblas_gemm_algo BLAS_GEMM_DFALT = rocblas_gemm_algo_standard; - cublasGemmAlgo_t blasGemmAlgo; - cublasGemmAlgo_t BLAS_GEMM_DFALT = CUBLAS_GEMM_DFALT; - // CHECK: rocblas_handle blasHandle; cublasHandle_t blasHandle; @@ -1765,6 +1760,11 @@ int main() { // CHECK: rocblas_datatype DataType_2, DataType_3; cudaDataType DataType_2, DataType_3; + // CHECK: rocblas_gemm_algo blasGemmAlgo; + // CHECK-NEXT: rocblas_gemm_algo BLAS_GEMM_DFALT = rocblas_gemm_algo_standard; + cublasGemmAlgo_t blasGemmAlgo; + cublasGemmAlgo_t BLAS_GEMM_DFALT = CUBLAS_GEMM_DFALT; + // TODO: #1281 // CUDA: CUBLASAPI cublasStatus_t CUBLASWINAPI cublasNrm2Ex(cublasHandle_t handle, int n, const void* x, cudaDataType xType, int incx, void* result, cudaDataType resultType, cudaDataType executionType); // ROC: ROCBLAS_EXPORT rocblas_status rocblas_nrm2_ex(rocblas_handle handle, rocblas_int n, const void* x, rocblas_datatype x_type, rocblas_int incx, void* results, rocblas_datatype result_type, rocblas_datatype execution_type);