Why using scaled offsets in block ptr? #208
Unanswered
Nullkooland
asked this question in
Q&A
Replies: 1 comment
-
Thanks for your question! This is an interesting observation. I'll take a look and get back to you with some thoughts. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I'm working on a solution for #203, and I noticed that there's a difference of
offsets
param oftt.make_tensor_ptr
andtts.make_tptr
.tt.make_tensor_ptr
is using per-dimensionoffests
whiletts.make_tptr
is using scaledoffsets
which is multiplied bystrides
. So during conversion oftt.make_tensor_ptr
totts.make_tptr
, the per-dimensionoffests
is converted to scaledoffsets
by insertingarith.muli
op with thestrides
(See #90), however I need the per-dimensionoffsets
to figure out the N-D masked shape on the last block boundary.I wonder what's the rationale behind adopting the scaled
offsets
early intts.make_tptr
, since thestrides
param is also included and we can get the scaledoffsets
later instructured-to-memref
pass.@nhat-nguyen @haishanzzzz Could you take a look?
Beta Was this translation helpful? Give feedback.
All reactions