diff options
author | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-07-31 17:13:34 +0100 |
---|---|---|
committer | Viet-Hoa Do <viet-hoa.do@arm.com> | 2023-08-22 08:42:23 +0000 |
commit | e1c3b466960d5e3fd5a54871287f5eb6102bfb8c (patch) | |
tree | ca7b46273f564cd96bbb6832fbcd743ce4642301 /compute_kernel_writer/validation/tests/CLKernelWriterCommentTest.h | |
parent | 47a396e3aae96f2dcad44f4e0d6cb6b87b368395 (diff) | |
download | ComputeLibrary-e1c3b466960d5e3fd5a54871287f5eb6102bfb8c.tar.gz |
Add CKW writing methods for CL unary ops
* Add writing methods for:
- Assignment.
- Cast.
- Unary expression.
* Add corresponding tests.
Partially resolves: COMPMID-6388.
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: Ia654173e2e1ee9cddb7819980251e0591934439f
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10155
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-by: Jakub Sujak <jakub.sujak@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'compute_kernel_writer/validation/tests/CLKernelWriterCommentTest.h')
-rw-r--r-- | compute_kernel_writer/validation/tests/CLKernelWriterCommentTest.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/compute_kernel_writer/validation/tests/CLKernelWriterCommentTest.h b/compute_kernel_writer/validation/tests/CLKernelWriterCommentTest.h index ff09ea8073..b36c3905ec 100644 --- a/compute_kernel_writer/validation/tests/CLKernelWriterCommentTest.h +++ b/compute_kernel_writer/validation/tests/CLKernelWriterCommentTest.h @@ -22,8 +22,8 @@ * SOFTWARE. */ -#ifndef CKW_VALIDATION_TESTS_CLKERNELTEST_H -#define CKW_VALIDATION_TESTS_CLKERNELTEST_H +#ifndef CKW_VALIDATION_TESTS_CLKERNELWRITERCOMMENTTEST_H +#define CKW_VALIDATION_TESTS_CLKERNELWRITERCOMMENTTEST_H #include "src/cl/CLKernelWriter.h" #include "validation/tests/common/Common.h" @@ -45,14 +45,18 @@ public: KernelWriterInterceptor<CLKernelWriter> writer; - writer.comment("previous code"); + writer.op_comment("previous code"); writer.start_capture_code(); - writer.comment("code under test 0"); - writer.comment("code under test 1"); + writer.op_comment("code under test 0"); + writer.op_comment("code under test 1"); +#ifdef COMPUTE_KERNEL_WRITER_DEBUG_ENABLED constexpr auto expected_code = "// code under test 0\n// code under test 1\n"; +#else // COMPUTE_KERNEL_WRITER_DEBUG_ENABLED + constexpr auto expected_code = ""; +#endif // COMPUTE_KERNEL_WRITER_DEBUG_ENABLED VALIDATE_TEST(writer.check_added_code(expected_code), all_tests_passed, 0); @@ -67,4 +71,4 @@ public: } // namespace ckw -#endif // CKW_VALIDATION_TESTS_CLKERNELTEST_H +#endif // CKW_VALIDATION_TESTS_CLKERNELWRITERCOMMENTTEST_H |