Skip to content

Commit

Permalink
do not import CUDA functions when CUDA device is not available (#198)
Browse files Browse the repository at this point in the history
* Do not import CUDA functions when CUDA device is not available

* update name

* update wording
  • Loading branch information
yxlao authored Dec 24, 2020
1 parent 44d925c commit fe2db3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ml3d/metrics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import open3d

if open3d._build_config['BUILD_CUDA_MODULE']:
if open3d.core.cuda.device_count() > 0:
# Open3D is built with CUDA and the machine has a CUDA device.
from open3d.ml.contrib import iou_bev_cuda as iou_bev
from open3d.ml.contrib import iou_3d_cuda as iou_3d
else:
Expand Down

0 comments on commit fe2db3d

Please sign in to comment.