Skip to content

Commit

Permalink
fix zeropoint copy
Browse files Browse the repository at this point in the history
  • Loading branch information
SunMarc authored and dacorvo committed Mar 5, 2024
1 parent d4928ba commit 3bddd0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quanto/tensor/qbitstensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __torch_dispatch__(cls, op, types, args, kwargs=None):
data = op(t._data, **data_kwargs)
zeropoint_kwargs = copy(kwargs)
zeropoint_kwargs["dtype"] = torch.int8
zeropoint = op(t._data, **data_kwargs)
zeropoint = op(t._zeropoint, **data_kwargs)
return QBitsTensor(t._qtype, t._axis, t.size(), t.stride(), data, scale, zeropoint)
args, kwargs = pytree.tree_map_only(QBitsTensor, lambda x: x.qtensor(), (args, kwargs or {}))
return op(*args, **kwargs)

0 comments on commit 3bddd0a

Please sign in to comment.