-
-
Notifications
You must be signed in to change notification settings - Fork 827
replace tl.libdevice.llrint with tl.extra.cuda.libdevice.rint #1372
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ def _quantize_rowwise( | |
|
|
||
| abs_x = tl.abs(x) | ||
| max_val = tl.max(tl.where(row_mask, abs_x, 0), axis=0) | ||
| output = tl.libdevice.llrint(127.0 * (x / max_val)) | ||
| output = tl.extra.cuda.libdevice.rint(127.0 * (x / max_val)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| tl.store(output_ptr + offsets, output, mask=row_mask) | ||
| tl.store(output_maxs + pid, max_val) | ||
|
|
||
|
|
||
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.
Same issue here: should be
tl.extra.cuda.libdevice.llrint(notrint) to match the original semantics.