(self, other)
| 587 | self.state2.code = self.state2.code.to(device) |
| 588 | |
| 589 | def __eq__(self, other): |
| 590 | if not isinstance(other, QuantState): |
| 591 | return False |
| 592 | |
| 593 | return ( |
| 594 | torch.allclose(self.absmax, other.absmax, atol=1e-6) |
| 595 | and self.shape == other.shape |
| 596 | and torch.allclose(self.code, other.code, atol=1e-6) |
| 597 | and self.dtype == other.dtype |
| 598 | and self.blocksize == other.blocksize |
| 599 | and self.quant_type == other.quant_type |
| 600 | and ( |
| 601 | self.offset == other.offset |
| 602 | if self.offset is not None and other.offset is not None |
| 603 | else self.offset is other.offset |
| 604 | ) |
| 605 | and ( |
| 606 | self.state2 == other.state2 |
| 607 | if self.state2 is not None and other.state2 is not None |
| 608 | else self.state2 is other.state2 |
| 609 | ) |
| 610 | ) |
| 611 | |
| 612 | |
| 613 | def quantize_blockwise( |
nothing calls this directly
no outgoing calls
no test coverage detected