Bug in the README's example

Issue #4 new
Pekka Jääskeläinen created an issue

There's a single char typo in the example referred to in the README, leading to wrong results. The test case doesn't verify the results, thus it usually goes unnoticed:

diff --git a/examples/sgemm_example.cpp b/examples/sgemm_example.cpp
index 581b6d3..6ccce96 100644
--- a/examples/sgemm_example.cpp
+++ b/examples/sgemm_example.cpp
@@ -61,7 +61,7 @@ int main() {
      printf("Data download failure\n");
      exit(1);
   }
-  status = hcblasSetMatrix(handle, K, N, sizeof(float), h_B, K, d_A, N);
+  status = hcblasSetMatrix(handle, K, N, sizeof(float), h_B, K, d_B, N);
   if(status != HCBLAS_STATUS_SUCCESS) {
      printf("Data download failure\n");
      exit(1);

Comments (0)

  1. Log in to comment