pytorch/test/quantization
ekamiti 9e473fd868 Make adding Buffers more like adding Parameters (#125971)
Add similar semantics for creating a buffer object similar to creating a parameter. This is done by introducing a new Buffer class that can be used for type disambiguation. The underlying functionality of registering a buffer remains the same as the register_buffer method has not been changed. The persistent parameter in the Buffer type is to indicate whether a buffer object should be persistent or not. Other non-test changes have to do with getting the new Buffer type recognized by inductor and dynamo. Remaining changes are test changes to make sure that the Buffer type can be used as a drop in replacement for register_buffer as it just leads to register_buffer being called. The addition of this new functionality still allows for normal tensors to be used as buffers so these changes are intended to be backwards compatible.

Fixes #35735

Co-authored-by: Mikayla Gawarecki <mikaylagawarecki@gmail.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/125971
Approved by: https://github.com/albanD, https://github.com/anijain2305, https://github.com/mlazos
2024-07-31 10:32:40 +00:00
..
ao_migration Enable UFMT on all of test/quantization/ao_migration &bc (#123994) 2024-04-13 06:36:10 +00:00
bc Enable UFMT on all of test/quantization/ao_migration &bc (#123994) 2024-04-13 06:36:10 +00:00
core Make adding Buffers more like adding Parameters (#125971) 2024-07-31 10:32:40 +00:00
eager Make adding Buffers more like adding Parameters (#125971) 2024-07-31 10:32:40 +00:00
fx [BE]: Update ruff to v0.4.4 (#125031) 2024-05-12 20:02:37 +00:00
jit Enable UFMT on all of test/quantization/jit &pt2e (#124010) 2024-04-14 06:07:23 +00:00
pt2e Revert "[pt2e][quant] Ensure BN node is erased after convert (#131651)" 2024-07-29 16:42:24 +00:00
serialized
__init__.py