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

Method runInstance

src/tests/performance/perf-sbmv.cpp:62–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 virtual nano_time_t clblasPerfSingle(void);
61
62 static void runInstance(BlasFunction fn, TestParams *params)
63 {
64 SbmvPerformanceTest<ElemType> perfCase(fn, params);
65 int ret = 0;
66 int opFactor = 1;
67 BlasBase *base;
68
69 base = clMath::BlasBase::getInstance();
70
71 if ((fn == FN_DSBMV) &&
72 !base->isDevSupportDoublePrecision()) {
73
74 std::cerr << ">> WARNING: The target device doesn't support native "
75 "double precision floating point arithmetic" <<
76 std::endl << ">> Test skipped" << std::endl;
77 return;
78 }
79
80 if (!perfCase.areResourcesSufficient(params)) {
81 std::cerr << ">> RESOURCE CHECK: Skip due to unsufficient resources" <<
82 std::endl;
83 }
84 else {
85 ret = perfCase.run(opFactor);
86 }
87
88 ASSERT_GE(ret, 0) << "Fatal error: can not allocate resources or "
89 "perform an OpenCL request!" << endl;
90 EXPECT_EQ(0, ret) << "The OpenCL version is slower in the case" << endl;
91 }
92
93private:
94 SbmvPerformanceTest(BlasFunction fn, TestParams *params);

Callers

nothing calls this directly

Calls 3

runMethod · 0.45

Tested by

no test coverage detected