Skip to content

Commit afbd7c2

Browse files
authored
Reduce expected accuracy compared to naive code and silence matrix element printout
1 parent c9dae4c commit afbd7c2

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

test/compare_sgemm_shgemm.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,16 @@ main (int argc, char *argv[])
122122
(float)AA[k * j + l] * (float)BB[i + l * n];
123123
}
124124
if (!is_close(CC[i * m + j], C[i * m + j], 0.01, 0.001)) {
125-
fprintf(stderr,"CC %f C %f \n",(float)CC[i*m+j],C[i*m+j]);
126-
ret++;
125+
#ifdef DEBUG
126+
fprintf(stderr,"CC %f C %f \n",(float)CC[i*m+j],C[i*m+j]);
127+
#endif
128+
ret++;
127129
}
128-
if (!is_close(CC[i * m + j], DD[i * m + j], 0.001, 0.0001)) {
129-
fprintf(stderr,"CC %f DD %f \n",(float)CC[i*m+j],(float)DD[i*m+j]);
130-
ret++;
130+
if (!is_close(CC[i * m + j], DD[i * m + j], 0.01, 0.001)) {
131+
#ifdef DEBUG
132+
fprintf(stderr,"CC %f DD %f \n",(float)CC[i*m+j],(float)DD[i*m+j]);
133+
#endif
134+
ret++;
131135
}
132136
}
133137
}

0 commit comments

Comments
 (0)