Skip to content

Commit

Permalink
Fix for triangular_solve BEF executable unit test failure on ROCm.
Browse files Browse the repository at this point in the history
  • Loading branch information
rsanthanam-amd committed Apr 28, 2022
1 parent aae8198 commit 97c4c10
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 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,11 @@ 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 = 0;
if (platform == wrapper::Platform::CUDA)
a_num_elements = side_mode == CUBLAS_SIDE_LEFT ? m * m : n * n;
else
a_num_elements = side_mode == rocblas_side_left ? m * m : n * n;
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

0 comments on commit 97c4c10

Please sign in to comment.