aboutsummaryrefslogtreecommitdiff
path: root/tests/benchmark_examples/RunExample.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/benchmark_examples/RunExample.cpp')
-rw-r--r--tests/benchmark_examples/RunExample.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/benchmark_examples/RunExample.cpp b/tests/benchmark_examples/RunExample.cpp
index e5dfe74d0e..a23d91e9de 100644
--- a/tests/benchmark_examples/RunExample.cpp
+++ b/tests/benchmark_examples/RunExample.cpp
@@ -128,7 +128,17 @@ int run_example(int argc, char **argv, std::unique_ptr<Example> example)
CLGEMMHeuristicsHandle gemm_h;
if(opencl_is_available())
{
- auto ctx_dev_err = create_opencl_context_and_device();
+ CLBackendType backend_type = CLBackendType::Native;
+ for(auto &arg : example_args->value())
+ {
+ if(arg.find("--target=clvk") != std::string::npos)
+ {
+ backend_type = CLBackendType::Clvk;
+ break;
+ }
+ }
+
+ auto ctx_dev_err = create_opencl_context_and_device(backend_type);
ARM_COMPUTE_ERROR_ON_MSG(std::get<2>(ctx_dev_err) != CL_SUCCESS, "Failed to create OpenCL context");
CLScheduler::get()
.default_init_with_context(std::get<1>(ctx_dev_err), std::get<0>(ctx_dev_err), nullptr, &gemm_h);