aboutsummaryrefslogtreecommitdiff
path: root/compute_kernel_writer/validation/tests/CLKernelWriterDeclareTensorTest.h
diff options
context:
space:
mode:
Diffstat (limited to 'compute_kernel_writer/validation/tests/CLKernelWriterDeclareTensorTest.h')
-rw-r--r--compute_kernel_writer/validation/tests/CLKernelWriterDeclareTensorTest.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/compute_kernel_writer/validation/tests/CLKernelWriterDeclareTensorTest.h b/compute_kernel_writer/validation/tests/CLKernelWriterDeclareTensorTest.h
index 3e1056972e..855c747f13 100644
--- a/compute_kernel_writer/validation/tests/CLKernelWriterDeclareTensorTest.h
+++ b/compute_kernel_writer/validation/tests/CLKernelWriterDeclareTensorTest.h
@@ -81,7 +81,15 @@ public:
"{\n"
"}\n";
- const auto &actual_code = kernel->source_code();
+ std::string actual_code = kernel->source_code();
+
+ std::size_t pos = actual_code.find("__kernel");
+
+ if (pos != std::string::npos)
+ {
+ // Remove text before "__kernel"
+ actual_code = actual_code.substr(pos);
+ }
int test_id = 0;
VALIDATE_TEST(kernel->arguments().size() == 4, all_tests_passed, test_id++);