Simple 2D reduction #1995
Unanswered
NightWinkle
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
As an exercise, I wanted to implement simple 2D reductions in Triton, over two vectors x of size N and y of size M, of the following form :
s[i] = sum(exp(-(x[i] - y[j])/(2*sigma)) for j in range(M))
I wrote the following code :
I've ignored boundary effects in this example. The performance I get is worse than PyKeops implementation for the similar sum (https://www.kernel-operations.io/keops/engine/map_reduce_schemes.html), while it should be the same results from my understanding (even though there is no fine control over local and shared memory).
Is there something i'm doing wrong ?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions