Skip to content

Commit

Permalink
[BLAS][HIP] Fix blas support for rocBLAS 4+ (uxlfoundation#519)
Browse files Browse the repository at this point in the history
  • Loading branch information
npmiller authored and normallytangent committed Aug 6, 2024
1 parent dde8190 commit 6fd98a4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/blas/backends/rocblas/rocblas_level3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,17 @@ inline void trmm(Func func, sycl::queue &queue, side left_right, uplo upper_lowe
auto a_ = sc.get_mem<rocDataType *>(a_acc);
auto b_ = sc.get_mem<rocDataType *>(b_acc);
rocblas_status err;
#if ROCBLAS_VERSION_MAJOR >= 4
ROCBLAS_ERROR_FUNC_SYNC(func, err, handle, get_rocblas_side_mode(left_right),
get_rocblas_fill_mode(upper_lower),
get_rocblas_operation(trans), get_rocblas_diag_type(unit_diag),
m, n, (rocDataType *)&alpha, a_, lda, b_, ldb, b_, ldb);
#else
ROCBLAS_ERROR_FUNC_SYNC(func, err, handle, get_rocblas_side_mode(left_right),
get_rocblas_fill_mode(upper_lower),
get_rocblas_operation(trans), get_rocblas_diag_type(unit_diag),
m, n, (rocDataType *)&alpha, a_, lda, b_, ldb);
#endif
});
});
}
Expand Down Expand Up @@ -805,10 +812,17 @@ inline sycl::event trmm(Func func, sycl::queue &queue, side left_right, uplo upp
auto a_ = reinterpret_cast<const rocDataType *>(a);
auto b_ = reinterpret_cast<rocDataType *>(b);
rocblas_status err;
#if ROCBLAS_VERSION_MAJOR >= 4
ROCBLAS_ERROR_FUNC_SYNC(func, err, handle, get_rocblas_side_mode(left_right),
get_rocblas_fill_mode(upper_lower),
get_rocblas_operation(trans), get_rocblas_diag_type(unit_diag),
m, n, (rocDataType *)&alpha, a_, lda, b_, ldb, b_, ldb);
#else
ROCBLAS_ERROR_FUNC_SYNC(func, err, handle, get_rocblas_side_mode(left_right),
get_rocblas_fill_mode(upper_lower),
get_rocblas_operation(trans), get_rocblas_diag_type(unit_diag),
m, n, (rocDataType *)&alpha, a_, lda, b_, ldb);
#endif
});
});

Expand Down

0 comments on commit 6fd98a4

Please sign in to comment.