aboutsummaryrefslogtreecommitdiff
path: root/tests/validate_examples/RunExample.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validate_examples/RunExample.cpp')
-rw-r--r--tests/validate_examples/RunExample.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/tests/validate_examples/RunExample.cpp b/tests/validate_examples/RunExample.cpp
index aca4ddcc7c..36bf587551 100644
--- a/tests/validate_examples/RunExample.cpp
+++ b/tests/validate_examples/RunExample.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021, 2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -27,8 +27,9 @@
#include "utils/Utils.cpp"
#include "ValidateExample.h"
-#include "arm_compute/runtime/Scheduler.h"
#include "arm_compute/runtime/CL/CLHelpers.h"
+#include "arm_compute/runtime/Scheduler.h"
+#include "arm_compute/core/Version.h"
#include "tests/AssetsLibrary.h"
#include "tests/Globals.h"
#include "tests/framework/Framework.h"
@@ -40,9 +41,6 @@
#ifdef ARM_COMPUTE_CL
#include "arm_compute/runtime/CL/CLScheduler.h"
#endif /* ARM_COMPUTE_CL */
-#ifdef ARM_COMPUTE_GC
-#include "arm_compute/runtime/GLES_COMPUTE/GCScheduler.h"
-#endif /* ARM_COMPUTE_GC */
#include <libgen.h>
@@ -139,8 +137,8 @@ int run_example(int argc, char **argv, std::unique_ptr<ValidateExample> example)
g_example_argv.emplace_back(const_cast<char *>(arg.c_str())); // NOLINT
}
- library = support::cpp14::make_unique<AssetsLibrary>("." /* Only using random values */, seed->value());
- fixed_library = support::cpp14::make_unique<AssetsLibrary>(".", fixed_seed);
+ library = std::make_unique<AssetsLibrary>("." /* Only using random values */, seed->value());
+ fixed_library = std::make_unique<AssetsLibrary>(".", fixed_seed);
if(options.log_level->value() > framework::LogLevel::NONE)
{
@@ -153,7 +151,16 @@ int run_example(int argc, char **argv, std::unique_ptr<ValidateExample> example)
#ifdef ARM_COMPUTE_CL
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);
}