pytorch/test/quantization
Zhicheng Yan 77643ed2eb [torch quantization]raise exception when OOM during combine histogram in observer (#123309)
Summary:
Even with changes in D55347133, it is still possible to OOM in histogram observer, because the size of allocated tensor also depends on *downsample_rate*.

For example, I still see OOM due to the attempt of allocating a 10GB+ histogram tensor in multi-task model.

To fix OOM issue better, we use *try-catch* clause to avoid OOM.
Empirically, we set the max size of a single histogram tensor size to 1 GB.

Test Plan: Test the change for Multi-Task model (depth + segmentation)

Differential Revision: D55567292

Pull Request resolved: https://github.com/pytorch/pytorch/pull/123309
Approved by: https://github.com/jerryzh168
2024-04-06 03:15:02 +00:00
..
ao_migration ao migration: remove package test as this behavior is tested by other things (#94422) 2023-02-13 16:33:40 +00:00
bc [BE] Enable ruff's UP rules and autoformat test/ (#105434) 2023-07-19 20:36:06 +00:00
core [torch quantization]raise exception when OOM during combine histogram in observer (#123309) 2024-04-06 03:15:02 +00:00
eager [BE]: Update flake8 to v6.1.0 and fix lints (#116591) 2024-01-03 06:04:44 +00:00
fx [BE]: Apply RUF025 dict.fromkeys preview rule (#118637) 2024-01-30 20:46:54 +00:00
jit [quant] Remove deprecated torch.jit.quantized APIs (#118406) 2024-01-27 18:32:45 +00:00
pt2e [dynamo, 3.12] enable tests disabled due to missing dynamo 3.12 support (#123300) 2024-04-05 20:13:17 +00:00
serialized
__init__.py