MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / checkIsTrmmFaster

Function checkIsTrmmFaster

src/tests/performance/test-performance.cpp:1180–1205  ·  view source on GitHub ↗

ensure that a TRMM function is faster then the respective GEMM one

Source from the content-addressed store, hash-verified

1178#if 0
1179// ensure that a TRMM function is faster then the respective GEMM one
1180static void
1181checkIsTrmmFaster(BlasFunction trmmFn, BlasFunction gemmFn)
1182{
1183 const char *s1, *s2;
1184 gflops_t gf1, gf2;
1185
1186 gf1 = perfRecorder->clblasAvgPerf(trmmFn);
1187 gf2 = perfRecorder->clblasAvgPerf(gemmFn);
1188
1189 if (isDoubleZero((double)gf1) || isDoubleZero((double)gf2)) {
1190 // skip, respective tests has not been run
1191 return;
1192 }
1193
1194 s1 = functionToString(trmmFn);
1195 s2 = functionToString(gemmFn);
1196 cerr << "Check if the " << s1 << " function is faster than the " <<
1197 s2 << " one" << endl;
1198
1199 if (gf1 * 2 > gf2) { // since TRMM has in twice as less operations as GEMM
1200 cerr << "PASS" << endl << endl;
1201 }
1202 else {
1203 cerr << "FAIL" << endl << endl;
1204 }
1205}
1206#endif
1207
1208int

Callers 1

mainFunction · 0.85

Calls 3

isDoubleZeroFunction · 0.85
functionToStringFunction · 0.85
clblasAvgPerfMethod · 0.80

Tested by

no test coverage detected