Skip to content

Commit

Permalink
version control
Browse files Browse the repository at this point in the history
  • Loading branch information
maktukmak committed Mar 21, 2024
1 parent 8cdf51d commit 2a50328
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions quanto/tensor/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .core import dtype_info
from .qtensor import QTensor, qfallback
from .qtype import qint8

from packaging import version

__all__ = ["get_qtensor_op_dispatch", "register_qtensor_op"]

Expand Down Expand Up @@ -181,7 +181,8 @@ def mm(op, input, other):
n, m = input.shape
p = other.shape[-1]
if (
(input.device.type == "cuda" or input.device.type == "cpu")
(input.device.type == "cuda" or
(input.device.type == "cpu" and version.parse(torch.__version__).release >= version.parse('2.4.0').release))
and input.qtype == qint8
and other.qtype == qint8
and n > 16
Expand Down

0 comments on commit 2a50328

Please sign in to comment.