Move the parameter to the given device. Then, if the device is a cuda device, quantize it.
(self, *args, **kwargs)
| 116 | return self.to(device, non_blocking=non_blocking) |
| 117 | |
| 118 | def to(self, *args, **kwargs): |
| 119 | """ |
| 120 | Move the parameter to the given device. Then, if the device is a cuda device, |
| 121 | quantize it. |
| 122 | """ |
| 123 | tensor = super().to(*args, **kwargs) |
| 124 | self.quantizer.to(*args, **kwargs) |
| 125 | self._ensure_quantized(tensor) |
| 126 | return tensor |
| 127 | |
| 128 | |
| 129 | class QuantizedLinear(nn.Linear): |