Commit ab3792e
authored
Allow different dtype for scales_and_zeros (#1923)
Allow different dtype for scales_and_zeros (#1923)
Summary:
Pull Request resolved: #1923
D59410096 tried to allow different dtype for scales and zeros but in https://www.internalfb.com/code/fbsource/fbcode/pytorch/ao/torchao/dtypes/uintx/tensor_core_tiled_layout.py?lines=262 where the `pack_tinygemm_scales_and_zeros` is getting called, there is no dtype input. As a result, if the dtype of scales and zeros are not `torch.bfloat16`, it will result in an error in `guard_dtype_size`. This diff is to set the dtype as the same as scales and zeros to avoid this issue.
Reviewed By: andrewor14
Differential Revision: D710795041 parent 386e219 commit ab3792e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
0 commit comments