diff --git a/test/compare_sgemm_bgemm.c b/test/compare_sgemm_bgemm.c index 1fe4501e37..5ffd7eaabe 100644 --- a/test/compare_sgemm_bgemm.c +++ b/test/compare_sgemm_bgemm.c @@ -42,6 +42,7 @@ main (int argc, char *argv[]) blasint x, y; blasint one = 1; int ret = 0; + int ret2 = 0; int loop = BGEMM_LARGEST; char transA = 'N', transB = 'N'; float alpha = 1.0, beta = 1.0; @@ -143,6 +144,7 @@ main (int argc, char *argv[]) printf("Mismatch at i=%d, j=%d, k=%d: CC=%.6f, DD=%.6f\n", i, j, k, float16to32(CC[i * m + j]), truncate_float32_to_bfloat16(DD[i * m + j])); #endif + ret2++; ret++; } @@ -158,7 +160,7 @@ main (int argc, char *argv[]) } if (ret != 0) { - fprintf(stderr, "BGEMM FAILURES: %d\n", ret); + fprintf(stderr, "BGEMM FAILURES: %d (%d of which in comparison to naive loop)\n", ret,ret2); return 1; } diff --git a/test/compare_sgemm_shgemm.c b/test/compare_sgemm_shgemm.c index 7a97a06697..8f75cb78c2 100644 --- a/test/compare_sgemm_shgemm.c +++ b/test/compare_sgemm_shgemm.c @@ -122,12 +122,16 @@ main (int argc, char *argv[]) (float)AA[k * j + l] * (float)BB[i + l * n]; } if (!is_close(CC[i * m + j], C[i * m + j], 0.01, 0.001)) { - fprintf(stderr,"CC %f C %f \n",(float)CC[i*m+j],C[i*m+j]); - ret++; +#ifdef DEBUG + fprintf(stderr,"CC %f C %f \n",(float)CC[i*m+j],C[i*m+j]); +#endif + ret++; } - if (!is_close(CC[i * m + j], DD[i * m + j], 0.001, 0.0001)) { - fprintf(stderr,"CC %f DD %f \n",(float)CC[i*m+j],(float)DD[i*m+j]); - ret++; + if (!is_close(CC[i * m + j], DD[i * m + j], 0.01, 0.001)) { +#ifdef DEBUG + fprintf(stderr,"CC %f DD %f \n",(float)CC[i*m+j],(float)DD[i*m+j]); +#endif + ret++; } } }