Checks the availability of CUDA runtime/GPU, and NPP, and cuFFT libraries and prints an appropriate warning.
()
| 101 | |
| 102 | |
| 103 | def check_cuda_runtime(): |
| 104 | """ |
| 105 | Checks the availability of CUDA runtime/GPU, and NPP, and cuFFT libraries and prints an |
| 106 | appropriate warning. |
| 107 | """ |
| 108 | global cuda_checked |
| 109 | if not cuda_checked: |
| 110 | cuda_checked = True |
| 111 | if GetCudaVersion() == -1: |
| 112 | deprecation_warning("GPU is not available. Only CPU operators are available.") |
| 113 | |
| 114 | if GetCufftVersion() == -1: |
| 115 | deprecation_warning( |
| 116 | "nvidia-dali-cuda120 is no longer shipped with CUDA runtime. " |
| 117 | "You need to install it separately. cuFFT is typically " |
| 118 | "provided with CUDA Toolkit installation or an appropriate wheel. " |
| 119 | "Please check " |
| 120 | "https://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html" |
| 121 | "#pip-wheels-installation-linux " |
| 122 | "for the reference." |
| 123 | ) |
| 124 | |
| 125 | if GetNppVersion() == -1: |
| 126 | deprecation_warning( |
| 127 | "nvidia-dali-cuda120 is no longer shipped with CUDA runtime. " |
| 128 | "You need to install it separately. NPP is typically " |
| 129 | "provided with CUDA Toolkit installation or an appropriate wheel. " |
| 130 | "Please check " |
| 131 | "https://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html" |
| 132 | "#pip-wheels-installation-linux " |
| 133 | "for the reference." |
| 134 | ) |
| 135 | |
| 136 | |
| 137 | @atexit.register |
nothing calls this directly
no test coverage detected