Skip to content

Commit

Permalink
ruff format bitsandbytes/functional.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Titus-von-Koeller committed Feb 23, 2024
1 parent bd9fb62 commit 01327aa
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions bitsandbytes/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,14 +795,22 @@ def __eq__(self, other):
return False

return (
torch.allclose(self.absmax, other.absmax, atol=1e-6) and
self.shape == other.shape and
torch.allclose(self.code, other.code, atol=1e-6) and
self.dtype == other.dtype and
self.blocksize == other.blocksize and
self.quant_type == other.quant_type and
(self.offset == other.offset if self.offset is not None and other.offset is not None else self.offset is other.offset) and
(self.state2 == other.state2 if self.state2 is not None and other.state2 is not None else self.state2 is other.state2)
torch.allclose(self.absmax, other.absmax, atol=1e-6)
and self.shape == other.shape
and torch.allclose(self.code, other.code, atol=1e-6)
and self.dtype == other.dtype
and self.blocksize == other.blocksize
and self.quant_type == other.quant_type
and (
self.offset == other.offset
if self.offset is not None and other.offset is not None
else self.offset is other.offset
)
and (
self.state2 == other.state2
if self.state2 is not None and other.state2 is not None
else self.state2 is other.state2
)
)


Expand Down

0 comments on commit 01327aa

Please sign in to comment.