How to describe a lookup operation like gather instruction #6559
Unanswered
daleidalei
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
-
Hi, I have a little problem describing a lookup operation similar to the gather instruction on a new hardware platform,I wrote such a compute and shedule as follows:
The generated partial IR looks like this:
The problem I'm currently having is that the size of the input_buffer allocation is not what I expected, I expected the buffer allocated by input_buffer to be consistent with the tile size, because the soc on-chip buffer is relatively small, and such a large buffer cannot be stored. The reason for this is that the value of index_buffer can be guaranteed by the input, x in index_buffer will not exceed tile_w and y will not exceed tile_h, so it is enough for input_buffer to allocate tile_w*tile_h size buffer, If the upper bounds in clamp are tile_w and tile_h, this description does not conform to the mathematical definition, and the subsequent comparison with the cpu output will also be inconsistent.
How to express a mathematical definition than can achieve my expectations?
Looking forward for your reply, best wishes!
Beta Was this translation helpful? Give feedback.
All reactions