Skip to content

Commit b110649

Browse files
committed
Fix quantization requires torchao >= 0.11.0
1 parent bc82841 commit b110649

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

optimum/exporters/executorch/quantization.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ def quantize_model_(
2727
return
2828

2929
# TODO: Update torchao to use 0.11.0 once released
30-
if parse(torchao.__version__) < parse("0.11.0.dev0"):
31-
raise RuntimeError("Quantization requires torchao >= 0.11.0. Please upgrade torchao.")
30+
if parse(torchao.__version__) < "0.11.0":
31+
raise RuntimeError(f"Quantization requires torchao >= 0.11.0 (current is {torchao.__version__}). Please upgrade torchao.")
3232

3333
from torchao.quantization.granularity import PerAxis, PerGroup
3434
from torchao.quantization.quant_api import (

0 commit comments

Comments
 (0)