Move dyn_int8_act_int4_wei_cpu_layout to prototype/dtypes#3299
Move dyn_int8_act_int4_wei_cpu_layout to prototype/dtypes#3299jainapurva merged 7 commits intomainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3299
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4f5ddd8 with merge base 6259e98 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
a4df015 to
d3db93e
Compare
andrewor14
left a comment
There was a problem hiding this comment.
Thanks, just left some small nits about testing
| warnings.simplefilter("always") # Ensure all warnings are captured | ||
| assert any( | ||
| issubclass(warning.category, DeprecationWarning) | ||
| and "CutlassInt4PackedLayout" in str(warning.message) |
There was a problem hiding this comment.
can we merge these tests to do this in a loop or reuse the code somehow?
| ] | ||
| for mod in modules_to_clear: | ||
| if mod in sys.modules: | ||
| del sys.modules[mod] |
There was a problem hiding this comment.
maybe easier to just reset the warnings like this:
Line 46 in 6259e98
There was a problem hiding this comment.
This won't work here, as the warning are generated during import rather than use
There was a problem hiding this comment.
ok no problem, we'll delete this test soon anyway hopefully
This pull request moves Int8DynamicActInt4WeightCPULayout and its implementation from torchao/dtypes/uintx/dyn_int8_act_int4_wei_cpu_layout.py to torchao/prototype/dtypes/uintx/dyn_int8_act_int4_wei_cpu_layout.py, and exposed it via torchao.prototype.dtypes while maintaining BC at torchao.prototype.dtypes.uintx with a deprecation warning for future torchao release.
Updates API documentation to reflect the changes
Reference Issue: #2752