(q_bits)
| 38 | |
| 39 | |
| 40 | def get_q_props(q_bits): |
| 41 | q_range = 2**q_bits |
| 42 | q_min = -(2**(q_bits - 1)) |
| 43 | q_max = (2**(q_bits - 1) - 1) |
| 44 | |
| 45 | q_min = torch.IntTensor([q_min]).to(device=get_accelerator().device_name()) |
| 46 | q_max = torch.IntTensor([q_max]).to(device=get_accelerator().device_name()) |
| 47 | return q_range, q_max, q_min |
| 48 | |
| 49 | |
| 50 | def get_scale_zero_point(q_bits, is_symmetric_quant, max, min, absmax, scales=None, zero_points=None): |
no test coverage detected
searching dependent graphs…