We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73cc61c commit bd9fa53Copy full SHA for bd9fa53
version.py
@@ -88,10 +88,14 @@ def non_free_opencv_algorithms_present():
88
89
#####################################################################
90
91
-for gpu in range(cv2.cuda.getCudaEnabledDeviceCount()):
92
- print("CUDA enabled GPU device index: " + str(gpu) + " ")
93
- cv2.cuda.printShortCudaDeviceInfo(gpu)
94
- print()
+try:
+ for gpu in range(cv2.cuda.getCudaEnabledDeviceCount()):
+ print("CUDA enabled GPU device index: " + str(gpu) + " ")
+ cv2.cuda.printShortCudaDeviceInfo(gpu)
95
+ print()
96
+except BaseException:
97
+ print("No CUDA enabled devices found : " +
98
+ "[none present or in powered down state]")
99
100
101
0 commit comments