diff --git a/torchvision/csrc/ops/quantized/cpu/qnms_kernel.cpp b/torchvision/csrc/ops/quantized/cpu/qnms_kernel.cpp index fdcf21a2ae3..5493a2517b9 100644 --- a/torchvision/csrc/ops/quantized/cpu/qnms_kernel.cpp +++ b/torchvision/csrc/ops/quantized/cpu/qnms_kernel.cpp @@ -115,6 +115,11 @@ at::Tensor qnms_kernel( " and ", scores.size(0)); + TORCH_WARN_ONCE( + "Quantized NMS support is deprecated since torchvision 0.27 and will ", + "be removed in torchvision 0.28. Please dequantize your tensors before ", + "calling NMS."); + auto result = at::empty({0}); AT_DISPATCH_QINT_TYPES(dets.scalar_type(), "qnms_kernel", [&] { diff --git a/torchvision/csrc/ops/quantized/cpu/qroi_align_kernel.cpp b/torchvision/csrc/ops/quantized/cpu/qroi_align_kernel.cpp index c9097603f39..3a7ed01f833 100644 --- a/torchvision/csrc/ops/quantized/cpu/qroi_align_kernel.cpp +++ b/torchvision/csrc/ops/quantized/cpu/qroi_align_kernel.cpp @@ -243,6 +243,11 @@ at::Tensor qroi_align_forward_kernel( input.size(0) == 1, "Only one image per batch is allowed in roi_align when quantized tensors are passed."); + TORCH_WARN_ONCE( + "Quantized roi_align support is deprecated since torchvision 0.27 and ", + "will be removed in torchvision 0.28. Please dequantize your tensors ", + "before calling roi_align."); + at::TensorArg input_t{input, "input", 1}, rois_t{rois, "rois", 2}; at::CheckedFrom c = "qroi_align_forward_kernel";