Skip to content

Commit 053a78b

Browse files
bensanderamcamd
authored andcommitted
Check return code (#329)
* Check rocBlas API result code in benchmark warmup calls * Run clang-format on testing_gemm*hpp files * Another formatting pas
1 parent f62cff9 commit 053a78b

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

clients/include/testing_gemm.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ rocblas_status testing_gemm(Arguments argus)
440440

441441
for(int i = 0; i < number_cold_calls; i++)
442442
{
443-
rocblas_gemm<T>(
444-
handle, transA, transB, M, N, K, &h_alpha, dA, lda, dB, ldb, &h_beta, dC, ldc);
443+
CHECK_ROCBLAS_ERROR(rocblas_gemm<T>(
444+
handle, transA, transB, M, N, K, &h_alpha, dA, lda, dB, ldb, &h_beta, dC, ldc));
445445
}
446446

447447
gpu_time_used = get_time_us(); // in microseconds
@@ -626,7 +626,6 @@ rocblas_status range_testing_gemm(Arguments argus)
626626
rocblas_error =
627627
norm_check_general<T>('F', size, size, size, hC_gold.data(), hC.data());
628628
}
629-
630629
} // end of if unit/norm check
631630

632631
if(myfile.is_open())

clients/include/testing_gemm_strided_batched.hpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -281,24 +281,24 @@ rocblas_status testing_gemm_strided_batched(Arguments argus)
281281

282282
for(int i = 0; i < number_cold_calls; i++)
283283
{
284-
rocblas_gemm_strided_batched<T>(handle,
285-
transA,
286-
transB,
287-
M,
288-
N,
289-
K,
290-
&h_alpha,
291-
dA,
292-
lda,
293-
stride_a,
294-
dB,
295-
ldb,
296-
stride_b,
297-
&h_beta,
298-
dC,
299-
ldc,
300-
stride_c,
301-
batch_count);
284+
CHECK_ROCBLAS_ERROR(rocblas_gemm_strided_batched<T>(handle,
285+
transA,
286+
transB,
287+
M,
288+
N,
289+
K,
290+
&h_alpha,
291+
dA,
292+
lda,
293+
stride_a,
294+
dB,
295+
ldb,
296+
stride_b,
297+
&h_beta,
298+
dC,
299+
ldc,
300+
stride_c,
301+
batch_count));
302302
}
303303

304304
gpu_time_used = get_time_us(); // in microseconds

0 commit comments

Comments
 (0)