summaryrefslogtreecommitdiff
path: root/test/performance
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2017-04-13 21:31:27 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2017-04-13 21:31:27 +0200
commitf7f8ec644f51d16f888b6a7086009b79c0beef8f (patch)
tree88f652bba2a980b44010f415ed5d48af15d0b063 /test/performance
parentf24c142948fc71d8b37826c1275259668fe0d0e5 (diff)
Fixed CUDA malloc and cuBLAS handles: cuBLAS as a performance-reference now works
Diffstat (limited to 'test/performance')
-rw-r--r--test/performance/client.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/performance/client.cpp b/test/performance/client.cpp
index a2f0f9f4..dc98ffbd 100644
--- a/test/performance/client.cpp
+++ b/test/performance/client.cpp
@@ -183,7 +183,7 @@ void Client<T,U>::PerformanceTest(Arguments<U> &args, const SetMetric set_sizes)
if (args.compare_clblas) { clblasSetup(); }
#endif
#ifdef CLBLAST_REF_CUBLAS
- cudaSetDevice(static_cast<int>(args.device_id));
+ if (args.compare_cublas) { cublasSetup(args); }
#endif
// Iterates over all "num_step" values jumping by "step" each time
@@ -272,6 +272,9 @@ void Client<T,U>::PerformanceTest(Arguments<U> &args, const SetMetric set_sizes)
#ifdef CLBLAST_REF_CLBLAS
if (args.compare_clblas) { clblasTeardown(); }
#endif
+ #ifdef CLBLAST_REF_CUBLAS
+ if (args.compare_cublas) { cublasTeardown(args); }
+ #endif
}
// =================================================================================================