You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to execute compute and write memory concurrently:
x_idx(x, y) = calculate1(input, x, y);
y_idx(x, y) = calculate2(intput, x, y);
using halide, calcuating x_idx and y_idx spends 4ms.
for(int i = 0; i < input.height(); i++)
for(int j = 0; j < intput.width();j++)
output(x_idx(i,j), y_idx(i,j)) = input(i, j);
using c code, spend 10ms, cannot use multithread.
The equivalent halide code below:
RDom r(0, input.width(), 0, input.height());
output(x_idx(r.x, r.y), y_idx(r.x, r.y)) = input(r.x, r.y);
To write memory as soon as compute 4 pixel(neon 128), can I schedule RVar using async like this x_idx.store_root().compute_at(output, x).async?
Expect you reply. Thanks!
This discussion was converted from issue #6458 on December 07, 2021 05:22.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want to execute compute and write memory concurrently:
x_idx(x, y) = calculate1(input, x, y);
y_idx(x, y) = calculate2(intput, x, y);
using halide, calcuating x_idx and y_idx spends 4ms.
for(int i = 0; i < input.height(); i++)
for(int j = 0; j < intput.width();j++)
output(x_idx(i,j), y_idx(i,j)) = input(i, j);
using c code, spend 10ms, cannot use multithread.
The equivalent halide code below:
RDom r(0, input.width(), 0, input.height());
output(x_idx(r.x, r.y), y_idx(r.x, r.y)) = input(r.x, r.y);
To write memory as soon as compute 4 pixel(neon 128), can I schedule RVar using async like this x_idx.store_root().compute_at(output, x).async?
Expect you reply. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions