Merged
Conversation
ManfeiBai
approved these changes
Jul 2, 2024
JackCaoG
reviewed
Jul 8, 2024
JackCaoG
reviewed
Jul 8, 2024
JackCaoG
approved these changes
Jul 8, 2024
Collaborator
|
We should also have a doc to explain how to use these quantized ops under https://github.com/pytorch/xla/tree/master/docs |
Collaborator
Author
It's in https://github.com/pytorch/xla/blob/master/docs/quantized_ops.md |
miladm
reviewed
Jul 9, 2024
|
|
||
| # Dot with int4 weight is only supported on TPU | ||
| if not (n_bit == 4 and xr.device_type() != 'TPU'): | ||
| m = m.to(device) |
Collaborator
There was a problem hiding this comment.
what's the behavior on CUDA and CPU device?
Collaborator
Author
There was a problem hiding this comment.
Because int4 only runs on XLA:TPU
Collaborator
There was a problem hiding this comment.
offline discussion summary: int4 works only on XLA:TPU today; XLA:CPU does not support INT4. XLA:GPU level of support is unclear as it is not tested currently.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add blockwise quantized dot support for 8-bit and 4-bit weight
Test: