Replies: 1 comment 1 reply
-
Hey! Thanks for your interest :) Unfortunately, Triton is under pretty active development so functional parity with pytorch is still pretty far. However, here are a few things:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I wanted to give Triton a try, so I've set out to write a parallel version of PatchMatch.
I'm running into a couple of issues with my implementation and wonder if anyone can help point me in the right direction.
My kernel code looks like this:
First of all, I'm running into some issues setting up some arrays that I want to use to index certain parts of my tensors:
Similarly:
For the time being I've just hardcoded the literal values of the defaults in those spots. How can I create ranges based on kernel arguments?
Later on I run into some more problems:
First of all, I noticed that the
candidate_coords
tensor doesn't have the shape I expect. Then, when trying to convert coordinate values from the kNNF to pointer offsets, I run into some shape problem that I'm not sure how to debug. What's going on here?Also I have the feeling that I might not be calculating the pointer offsets correctly anyway. At the start I'm getting the offsets like this:
However, in the matmul tutorial, the stride is used to calculate the
a_ptrs
(what I'm callingA_grid
).I don't quite follow the grouping in the matmul tutorial, though, so I'm having trouble understanding how to translate it to my case which I'm doing without grouping for now.
To be honest, I don't know if my approach with crazy high-dimensional tensors makes sense at all for Triton (although something very similar works fine to vectorize the operations in my pytorch implementation). So I'd love to know if there's a better way of going about this.
I would appreciate any help or ideas!
The full code can be found here: https://github.com/JCBrouwer/patchmatch-triton
Beta Was this translation helpful? Give feedback.
All reactions