-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[type] Support offset load in bit vectorized loop #2127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!! Looks great. Just a few minor comments.
ti.bit_vectorize(32) | ||
for i, j in x: | ||
y[i, j] = x[i, j + 1] | ||
z[i, j] = x[i, j - 1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are ready, we can test x[i - 1, j]/x[i + 1, j]
too. You can also allocate only the y
field, and reuse the functions assign_vectorized
and verify
by adding template arguments dx: ti.template(), dy: ti.template()
, and the loop bodies should be something like y[i, j] = x[i + dx, j + dy]
.
Co-authored-by: Yuanming Hu <[email protected]>
Co-authored-by: Yuanming Hu <[email protected]>
Co-authored-by: Yuanming Hu <[email protected]>
Co-authored-by: Yuanming Hu <[email protected]>
Thanks for the review and help along the way! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! LGTM now. Thanks for the hard work!
Related issue = #1905
[Click here for the format server]