Replies: 1 comment
-
See https://halide-lang.org/tutorials/tutorial_lesson_16_rgb_generate.html for a discussion of the options, including how to handle mixed-layout situations using Func::specialize. If you do go for a single layout, definitely stick with planar. Interleaved layouts are the enemy of performance. |
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
-
I'm creating a pipeline which takes more then one buffer input.
One buffer has an interleaved layout and its dimensions (x,y) could change between pipeline calls.
Others are loaded images which by default have planar layout and will remain static in dimensions as the are only loaded once.
As the tutorial on layouts suggest interleaved might benefit from reorder to c,x,y and an unroll among other possible schedule optimisations. But in a mixed layout situation i can imagine that optimizing for one will unoptimize for the other.
So my question: What is the best strategy: work with mixed layouts? Or going to one? If going with one, which one?
My gut says converting the planars (static dimensions) once to interleaved and so al is handled interleaved as this is the layout used for the dynamic dimensioned buffer... but as a lot of things are sometimes counter intuitive this might not be the right way to go...
Any advice on this one? :)
Beta Was this translation helpful? Give feedback.
All reactions