(random_tensor, bits)
| 46 | |
| 47 | @pytest.mark.parametrize("bits", [4, 8, 12, 16]) |
| 48 | def test_absmax_quantize_bits(random_tensor, bits): |
| 49 | quant, dequant = absmax_quantize(random_tensor, bits=bits) |
| 50 | assert quant.dtype == torch.int8 |
| 51 | assert torch.allclose(dequant, random_tensor, atol=1e-2) |
| 52 | |
| 53 | |
| 54 | # More Tests for BitLinear: |
nothing calls this directly
no outgoing calls
no test coverage detected