Skip to content

Fix for triangular_solve BEF executable unit test failure on ROCm. #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion backends/gpu/lib/kernels/blas_kernels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ static Error BlasTrsmBatch(
const void** a_array = const_cast<const void**>(b_array + batchCount);

auto side_mode = wrapper::BlasSideMode::FromOpaqueValue(*sideMode);
int32_t a_num_elements = side_mode == CUBLAS_SIDE_LEFT ? m * m : n * n;
int32_t a_num_elements = n * n;
if ((platform == wrapper::Platform::CUDA && side_mode == CUBLAS_SIDE_LEFT) ||
(platform == wrapper::Platform::ROCm && side_mode == rocblas_side_left))
a_num_elements = m * m;
ptrdiff_t a_batch_stride_bytes = *data_type_size_bytes * a_num_elements;
ptrdiff_t b_batch_stride_bytes = *data_type_size_bytes * m * n;
const char* a_ptr = static_cast<const char*>(A.pointer().raw(platform));
Expand Down