Commit efca1d6
Handle meta tensors in FX quantization (#2622)
Summary:
Pull Request resolved: #2622
X-link: pytorch/pytorch#142262
If module being quantized contains a some meta tensors and some tensors with actual device, we should not fail quantization.
Quantization should also not fail if new quantized module is created on a meta device.
If devices contain meta, copying from meta to meta is not necessary, copying from another device to meta can be skipped.
Reviewed By: emlin
Differential Revision: D66895899
fbshipit-source-id: bba8de9ddc5f86292521985dc588f9dbe14b4b4c1 parent dab48e4 commit efca1d6
1 file changed
+33
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
14 | 25 | | |
15 | 26 | | |
16 | 27 | | |
| |||
971 | 982 | | |
972 | 983 | | |
973 | 984 | | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
974 | 1006 | | |
975 | 1007 | | |
976 | 1008 | | |
| |||
0 commit comments