File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
aten/src/ATen/native/quantized Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ Tensor& quantize_tensor_per_channel_affine(
151151 AT_DISPATCH_QINT_TYPES (qtensor.scalar_type (), fn_name, [&]() {
152152 checkQuantizedTensor<scalar_t >(fn_name, qtensor);
153153 if (qtensor.device ().type () != c10::DeviceType::CUDA &&
154+ qtensor.device ().type () != c10::DeviceType::XPU &&
154155 qtensor.device ().type () != c10::DeviceType::PrivateUse1) {
155156 checkZeroPoints<underlying_t >(fn_name, zero_points);
156157 } // for cuda and privateuse1, this check will occur in the actual device function
@@ -242,6 +243,7 @@ Tensor& dequantize_tensor_per_channel_affine(
242243 AT_DISPATCH_QINT_TYPES (qtensor.scalar_type (), fn_name, [&]() {
243244 checkQuantizedTensor<scalar_t >(fn_name, qtensor);
244245 if (qtensor.device ().type () != c10::DeviceType::CUDA &&
246+ qtensor.device ().type () != c10::DeviceType::XPU &&
245247 qtensor.device ().type () != c10::DeviceType::PrivateUse1){
246248 checkZeroPoints<underlying_t >(fn_name, zero_points);
247249 } // for cuda and privateuse1, this check will occur in the actual device function
You can’t perform that action at this time.
0 commit comments