Repository: pytorch
Issue: NotImplementedError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend.
Labels: module: cuda,triaged,module: vision

## 🐛 Bug

Currently trying to run YoloR from https://www.youtube.com/watch?v=vttJxYF-2gw&t=12s on my GPU, and getting the error:

```
Traceback (most recent call last):
  File "D:\yolor\detect.py", line 198, in <module>
    detect()
  File "D:\yolor\detect.py", line 94, in detect
    pred = non_max_suppression(pred, opt.conf_thres, opt.iou_thres, classes=opt.classes, agnostic=opt.agnostic_nms)
  File "D:\yolor\utils\general.py", line 341, in non_max_suppression
    i = torch.ops.torchvision.nms(boxes, scores, iou_thres)
NotImplementedError: Could not run 'torchvision::nms' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'torchvision::nms' is only available for these backends: [CPU, QuantizedCPU, BackendSelect, Named, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradXLA, UNKNOWN_TENSOR_TYPE_ID, AutogradMLC, Tracer, Autocast, Batched, VmapMode].

CPU: registered at C:\Users\circleci\project\torchvision\csrc\ops\cpu\nms_kernel.cpp:111 [kernel]
QuantizedCPU: registered at C:\Users\circleci\project\torchvision\csrc\ops\quantized\cpu\qnms_kernel.cpp:124 [kernel]
BackendSelect: fallthrough registered at ..\aten\src\ATen\core\BackendSelectFallbackKernel.cpp:3 [backend fallback]
Named: registered at ..\aten\src\ATen\core\NamedRegistrations.cpp:7 [backend fallback]
ADInplaceOrView: fallthrough registered at ..\aten\src\ATen\core\VariableFallbackKernel.cpp:60 [backend fallback]
AutogradOther: fallthrough registered at ..\aten\src\ATen\core\VariableFallbackKernel.cpp:35 [backend fallback]
AutogradCPU: fallthrough registered at ..\aten\src\ATen\core\VariableFallbackKernel.cpp:39 [backend fallback]
AutogradCUDA: fallthrough registered at ..\aten\src\ATen\core\VariableFallbackKernel.cpp:47 [backend fallback]
AutogradXLA: fallthrough registered at ..\aten\src\ATen\core\VariableFallbackKernel.cpp:51 [backend fallback]
UNKNOWN_TENSOR_TYPE_ID: fallthrough registered at ..\aten\src\ATen\core\VariableFallbackKernel.cpp:43 [backend fallback]
AutogradMLC: fallthrough registered at ..\aten\src\ATen\core\VariableFallbackKernel.cpp:55 [backend fallback]
Tracer: fallthrough registered at ..\torch\csrc\jit\frontend\tracer.cpp:1036 [backend fallback]
Autocast: fallthrough registered at ..\aten\src\ATen\autocast_mode.cpp:255 [backend fallback]
Batched: registered at ..\aten\src\ATen\BatchingRegistrations.cpp:1019 [backend fallback]
VmapMode: fallthrough registered at ..\aten\src\ATen\VmapModeRegistrations.cpp:33 [backend fallback]
```
Not sure why, or how to fix.

## Expected behavior

The code runs on the GPU properly, with no issues

## Environment

    **PyTorch Version (e.g., 1.0): 1.9.0
    OS (e.g., Linux): Windows
    How you installed PyTorch (conda, pip, source): pip
    Python version: Python 3.9.4
    CUDA/cuDNN version: Cuda compilation tools, release 11.3, V11.3.109
    GPU models and configuration: 2070 Super**



cc @ngimel @fmassa @vfdev-5 @pmeier