cardboardcode / epd_core

A ROS2 package that accelerates the training and deployment of CV models for industries.
Apache License 2.0
0 stars 0 forks source link

Faulty check for CUDA installation presence via CMakeLists.txt #10

Closed cardboardcode closed 2 years ago

cardboardcode commented 2 years ago

Issue Description

The following check implemented within easy_perception_deployment's CMakeLists.txt simply does not work in verifying that a version of CUDA have been installed in order to set the right GPU flag.

if(EXISTS ${CMAKE_CUDA_COMPILER})
  message(AUTHOR_WARNING "Using [-GPU-].")
  add_definitions(-DUSE_GPU=true)
else()
  message(AUTHOR_WARNING "Your local onnxruntime does not support CUDA. Using [-CPU-] instead.")
  add_definitions(-DUSE_GPU=false)
endif()

Perhaps modifications or a new feature needs to be implemented to properly check CUDA presence before installing.

cardboardcode commented 2 years ago

Reference

Apparently, there is a cmake command called FindCUDA. However it has been deprecated since cmake 3.10. EPD depends minimally on cmake 3.13.

The author's installation uses cmake 3.14.4 by running cmake --version in terminal.

https://cmake.org/cmake/help/latest/module/FindCUDA.html

cardboardcode commented 2 years ago

Closing with #54.