aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2021-04-28 13:29:17 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2021-04-28 15:38:26 +0000
commit660eea4dcb74c37d407a6aa148db1b30123e7d21 (patch)
tree28e3d9e70e7658d85573868e346bd7fa89605772
parente92b0458a0432254f8e49bc306aebfe172bb4d0e (diff)
downloadComputeLibrary-660eea4dcb74c37d407a6aa148db1b30123e7d21.tar.gz
Properly parse clvk option in validate examples
Change-Id: Id26030c770f0c94bf0853ccd96d9c6ad6cc7199e Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5518 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--tests/validate_examples/RunExample.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/validate_examples/RunExample.cpp b/tests/validate_examples/RunExample.cpp
index 70cc8f1609..5066e9663d 100644
--- a/tests/validate_examples/RunExample.cpp
+++ b/tests/validate_examples/RunExample.cpp
@@ -151,9 +151,13 @@ int run_example(int argc, char **argv, std::unique_ptr<ValidateExample> example)
if(opencl_is_available())
{
CLBackendType backend_type = CLBackendType::Native;
- if(options.target->value() == Target::CLVK)
+ for(auto &arg : example_args->value())
{
- backend_type = CLBackendType::Clvk;
+ 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");