Skip to content

Commit 1cea42f

Browse files
committed
Update
[ghstack-poisoned]
1 parent 5b9d876 commit 1cea42f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/dtypes/test_affine_quantized.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def test_flatten_unflatten(self, device, dtype):
189189
for apply_quant in apply_quant_list:
190190
linear = torch.nn.Linear(128, 256, dtype=dtype, device=device)
191191
if isinstance(apply_quant, AOBaseWorkflowConfig):
192-
quantize_(linear, apply_quant)
192+
quantize_(linear, apply_quant)
193193
else:
194194
ql = apply_quant(linear)
195195
lp_tensor = ql.weight

torchao/quantization/quant_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,7 @@ def insert_subclass(lin):
481481

482482
def quantize_(
483483
model: torch.nn.Module,
484-
config: Union[
485-
AOBaseWorkflowConfig, Callable[[torch.nn.Module], torch.nn.Module]
486-
],
484+
config: Union[AOBaseWorkflowConfig, Callable[[torch.nn.Module], torch.nn.Module]],
487485
filter_fn: Optional[Callable[[torch.nn.Module, str], bool]] = None,
488486
set_inductor_config: bool = True,
489487
device: Optional[torch.types.Device] = None,
@@ -535,7 +533,9 @@ def quantize_(
535533

536534
else:
537535
# old behavior, keep to avoid breaking BC
538-
warnings.warn("""Passing a generic Callable to `quantize_` is no longer recommended and will be deprecated at a later release. Please see https://github.com/pytorch/ao/pull/1595 for instructions on how to pass in workflow configuration instead.""")
536+
warnings.warn(
537+
"""Passing a generic Callable to `quantize_` is no longer recommended and will be deprecated at a later release. Please see https://github.com/pytorch/ao/pull/1595 for instructions on how to pass in workflow configuration instead."""
538+
)
539539

540540
# make the variable name make sense
541541
apply_tensor_subclass = config

0 commit comments

Comments
 (0)