MCPcopy Create free account
hub / github.com/NVIDIA/DALI / check_cuda_runtime

Function check_cuda_runtime

dali/python/nvidia/dali/backend.py:103–134  ·  view source on GitHub ↗

Checks the availability of CUDA runtime/GPU, and NPP, and cuFFT libraries and prints an appropriate warning.

()

Source from the content-addressed store, hash-verified

101
102
103def 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

Callers

nothing calls this directly

Calls 3

deprecation_warningFunction · 0.85
GetCufftVersionFunction · 0.85
GetNppVersionFunction · 0.85

Tested by

no test coverage detected