Commit 3cf2f19
add copy_ support for float4 dtype (pytorch#169595)
Summary:
Enables `copy_` support for the `torch.float4_e2m1fn_x2` dtype. This is
useful when slicing a tensor across dim1 and then calling contiguous,
which can happen in vllm and therefore should be supported.
Test Plan:
```
pytest test/quantization/core/experimental/test_floatx.py -s -k test_float4_e2m1fn_x2
```
Reviewers:
Subscribers:
Tasks:
Tags:
Pull Request resolved: pytorch#169595
Approved by: https://github.com/drisspg
ghstack dependencies: pytorch#1695751 parent ae64a53 commit 3cf2f19
File tree
3 files changed
+9
-0
lines changed- aten/src/ATen/native
- cpu
- cuda
- test/quantization/core/experimental
3 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| |||
0 commit comments