summaryrefslogtreecommitdiff
path: root/samples/sgemm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samples/sgemm.cpp')
-rw-r--r--samples/sgemm.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/sgemm.cpp b/samples/sgemm.cpp
index a4b89968..401ecff8 100644
--- a/samples/sgemm.cpp
+++ b/samples/sgemm.cpp
@@ -95,8 +95,10 @@ int main() {
&queue_plain, &event);
// Record the execution time
- clWaitForEvents(1, &event);
- clReleaseEvent(event);
+ if (status == clblast::StatusCode::kSuccess) {
+ clWaitForEvents(1, &event);
+ clReleaseEvent(event);
+ }
auto elapsed_time = std::chrono::steady_clock::now() - start_time;
auto time_ms = std::chrono::duration<double,std::milli>(elapsed_time).count();