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 am trying to write a erosion-morophology kernel in Triton, which (leaving out the boilerplate) looks like this:
kernel = tl.load(...)
...
for i in range(kernel_size_x):
for j in range(kernel_size_y):
if kernel[i, j] > 0:
result = tl.minimum(
result, input[i : i + BLOCK_SIZE, j : j + BLOCK_SIZE]
)
However, the direct access kernel[i, j] to the elements of kernel raises a compilation error. Is something along these lines actually possible in Triton? If not, can this be implemented without having to create an 4D intermediate tensor through broadcasting?
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 am trying to write a erosion-morophology kernel in Triton, which (leaving out the boilerplate) looks like this:
However, the direct access
kernel[i, j]
to the elements of kernel raises a compilation error. Is something along these lines actually possible in Triton? If not, can this be implemented without having to create an 4D intermediate tensor through broadcasting?Beta Was this translation helpful? Give feedback.
All reactions