File tree Expand file tree Collapse file tree
test/quantization/quantize_/workflows/float8 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import unittest
99from contextlib import nullcontext
1010from typing import Tuple
11+ from unittest .mock import patch
1112
1213import torch
1314from torch ._inductor .utils import run_and_get_code
3839 is_sm_at_least_100 ,
3940 torch_version_at_least ,
4041)
41- from unittest .mock import patch
4242
4343# Needed since changing args to function causes recompiles
4444torch ._dynamo .config .cache_size_limit = 128
Original file line number Diff line number Diff line change @@ -296,7 +296,10 @@ def _check_hardware_support(
296296
297297 if is_per_tensor or is_per_row :
298298 assert torch .xpu .is_available () or (
299- torch .cuda .is_available () and is_sm_at_least_89 () or is_MI300 () or is_MI350 ()
299+ torch .cuda .is_available ()
300+ and is_sm_at_least_89 ()
301+ or is_MI300 ()
302+ or is_MI350 ()
300303 ), (
301304 "Float8 dynamic quantization requires CUDA compute capability ≥8.9 or MI300+ or XPU."
302305 )
You can’t perform that action at this time.
0 commit comments