Using Specialize and compute_at efficiently #5134
ImageHandler
started this conversation in
General
Replies: 1 comment
-
@abadams @steven-johnson @zvookin any help would be great. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider a function (func1) which contains sevelral sub-functions (func2, func3, func4 etc.). All these subfunction iterate over the image full image size. The structure of the functions are as follow :
Code snippet (consider c code)
Halide equivalent :
Assume func2, func3, func4, func5 are already implemented.
-I have already written the halide code for this (all functions are written).
-I want to run it on HVX(Hexagon DSP) as target.
-From my previous experiences compute_at() will give a huge benefit in the latency.
-I have shown here only till func5 but there are many, and with many specialized switch statements
My Scheduling:
-What I want to do is use compute_at (so that temporary full sized buffers for func2_stage, func3_stage, func4_stage are not created) for every func, along with specialize to give vectorization benefit.
-But while building halide it say .specialize() can't be used with .compute_at()
i.e the following
What can be the best possible schedule for the above scenario?
Please help
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions