diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2021-07-06 13:19:41 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-07-06 16:38:19 +0000 |
commit | 5e281814c5110724d99fe8ee64bdf42ef2c31bce (patch) | |
tree | 008a57c80f5b846265b0339f6e3a9f7876fa8922 /src/core/CL/CLHelpers.cpp | |
parent | 900289936c458eff95499e0a0eaba989a27aaa4d (diff) | |
download | ComputeLibrary-5e281814c5110724d99fe8ee64bdf42ef2c31bce.tar.gz |
Fix manual LOOP_UNROLLING
The issue is caused by the number of iterations passed to
LOOP_UNROLLING. When we use the manual LOOP_UNROLLING, the number of
iterations must be less than or equal to 128.
To overcome this problem, we create a utility function to check if
any of the critical iterations (kernel dimensions) are beyond that
limit. If so, the utility function, disable the manual loop unrolling.
Resolves COMPMID-4609
Change-Id: I7221c967609e462a5abd1cbb74e2a120f344fcb3
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5913
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/CL/CLHelpers.cpp')
-rw-r--r-- | src/core/CL/CLHelpers.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/CL/CLHelpers.cpp b/src/core/CL/CLHelpers.cpp index 3323929742..5c53455eeb 100644 --- a/src/core/CL/CLHelpers.cpp +++ b/src/core/CL/CLHelpers.cpp @@ -466,4 +466,16 @@ bool export_weights_to_cl_image(const ITensorInfo *tensor) return true; } +void set_unroll_with_pragma(CLBuildOptions &built_opts, std::initializer_list<int> values) +{ + for(const int value : values) + { + if(value > max_manual_loop_unrolling) + { + built_opts.add_option("-DUNROLL_WITH_PRAGMA"); + return; + } + } +} + } // namespace arm_compute |