You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[reland] Fixing aliasing behavior for slice in AQT int4wo layout (#2176)
* [reland] Fixing aliasing behavior for slice in AQT TensorCoreTiledLayout (#2174)
Summary:
slice op is supposed to preserve aliasing (output of slice should alias the input),
but this is not true for TensorCoreTiledLayout (used by int4wo), and some others like gemlite
Reason is that we do unpacking, pading and prepacking right now, which creates new tensors.
We fixes it in this PR by doing slicing on the packed inner Tensor directly, specifically packed_weight and scale_and_zero
in TensorCoreTiledLayout.
Test Plan:
python test/dtypes/test_affine_quantized.py -k test_slice_and_copy_int4wo
Reviewers:
Subscribers:
Tasks:
Tags:
* simplify code
* add check for data_ptr
* format
* avoid div by zero
* format
* fix shape
0 commit comments