Skip to content

Commit e417afc

Browse files
authored
Remove broken test (#2188)
* Remove broken test Summary: this test is weird, autoquant has potential to not alter model size, if we're testing aqt, this is a bad test, if we're testing get_model_size there's another test that's better. This is breaking CI and doesn't make a lot of sense so lets remove it Test Plan: see CI Reviewers: Subscribers: Tasks: Tags: * ruff format Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: * undo overzealous delete Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent b01514c commit e417afc

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

test/integration/test_integration.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,43 +2049,6 @@ def forward(self, x):
20492049

20502050

20512051
class TestUtils(unittest.TestCase):
2052-
@parameterized.expand(COMMON_DEVICE_DTYPE)
2053-
@unittest.skipIf(not TORCH_VERSION_AT_LEAST_2_5, "autoquant requires 2.5+.")
2054-
def test_get_model_size_autoquant(self, device, dtype):
2055-
if device != "cuda" and dtype != torch.bfloat16:
2056-
self.skipTest(f"autoquant currently does not support {device}")
2057-
if device != "cuda" or not torch.cuda.is_available():
2058-
self.skipTest(f"autoquant currently does not support {device}")
2059-
if torch.cuda.is_available() and torch.cuda.get_device_capability() < (8, 0):
2060-
if dtype == torch.bfloat16:
2061-
self.skipTest("bfloat16 requires sm80+")
2062-
m, k, n = 16, 128, 128
2063-
model = (
2064-
torch.nn.Sequential(
2065-
torch.nn.ReLU(),
2066-
torch.nn.Linear(k, n),
2067-
torch.nn.ReLU(),
2068-
)
2069-
.to(device)
2070-
.to(dtype)
2071-
)
2072-
example_input = torch.randn(m, k, device=device, dtype=dtype)
2073-
size = torchao.utils.get_model_size_in_bytes(model)
2074-
2075-
from torchao.quantization.autoquant import (
2076-
AQInt8WeightOnlyQuantizedLinearWeight2,
2077-
)
2078-
2079-
qtensor_class_list = (AQInt8WeightOnlyQuantizedLinearWeight2,)
2080-
mod = torchao.autoquant(
2081-
torch.compile(model),
2082-
qtensor_class_list=qtensor_class_list,
2083-
set_inductor_config=False,
2084-
)
2085-
mod(example_input)
2086-
size2 = torchao.utils.get_model_size_in_bytes(mod)
2087-
self.assertTrue(size2 < size)
2088-
20892052
@parameterized.expand(
20902053
list(itertools.product(TENSOR_SUBCLASS_APIS, COMMON_DEVICES, COMMON_DTYPES)),
20912054
)

0 commit comments

Comments
 (0)