ganyc717 / Darknet-On-OpenCL

Darknet On OpenCL
MIT License
101 stars 44 forks source link

requires CUDA header files installation for AMD GPUs? #29

Open rajhlinux opened 2 years ago

rajhlinux commented 2 years ago

I get the following error:

$ cmake ..
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is Clang 13.0.0
-- The CXX compiler identification is Clang 13.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Looking for CL_VERSION_3_0
-- Looking for CL_VERSION_3_0 - found
-- Found OpenCL: /usr/local/lib/libOpenCL.so (found version "3.0") 
-- Found OpenCV: /usr/local (found version "4.6.0") 
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/home/user/Darknet-On-OpenCL/build
user@user:/usr/home/user/Darknet-On-OpenCL/build $ make -j8
[  1%] Building CXX object CMakeFiles/darknet.dir/darknet_cl/src/activation_kernels_cl.cpp.o
[  5%] Building CXX object CMakeFiles/darknet.dir/darknet_cl/src/activations.cpp.o
[  4%] Building CXX object CMakeFiles/darknet.dir/darknet_cl/src/avgpool_layer.cpp.o
[  2%] Building CXX object CMakeFiles/darknet.dir/darknet_cl/src/batchnorm_layer.cpp.o
[  6%] Building CXX object CMakeFiles/darknet.dir/darknet_cl/src/avgpool_layer_kernels_cl.cpp.o
[  8%] Building CXX object CMakeFiles/darknet.dir/darknet_cl/src/blas.cpp.o
[  9%] Building CXX object CMakeFiles/darknet.dir/darknet_cl/src/activation_layer.cpp.o
[ 11%] Building CXX object CMakeFiles/darknet.dir/darknet_cl/src/blas_kernels_cl.cpp.o
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/activation_kernels_cl.cpp:3:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/ocl.h:4:
/usr/local/include/darknet.h:41:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/activations.cpp:1:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/activations.h:3:
/usr/local/include/darknet.h:41:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/avgpool_layer_kernels_cl.cpp:3:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/ocl.h:4:
/usr/local/include/darknet.h:41:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/batchnorm_layer.cpp:1:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/activation_layer.cpp:1:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/activation_layer.h:4:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/activations.h:3:
/usr/local/include/darknet.h:41:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/convolutional_layer.h:4:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/ocl.h:4:
/usr/local/include/darknet.h:41:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/blas.cpp:1:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/blas.h:3:
/usr/local/include/darknet.h:41:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/blas_kernels_cl.cpp:3:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/ocl.h:4:
/usr/local/include/darknet.h:41:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/avgpool_layer.cpp:1:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/avgpool_layer.h:4:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/image.h:9:
In file included from /usr/home/user/Darknet-On-OpenCL/darknet_cl/src/box.h:3:
/usr/local/include/darknet.h:41:10: fatal error: 'cuda_runtime.h' file not found
#include <cuda_runtime.h>
         ^~~~~~~~~~~~~~~~
1 error generated.
1 error generated.
--- CMakeFiles/darknet.dir/darknet_cl/src/activations.cpp.o ---
*** [CMakeFiles/darknet.dir/darknet_cl/src/activations.cpp.o] Error code 1

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
--- CMakeFiles/darknet.dir/darknet_cl/src/activation_layer.cpp.o ---
*** [CMakeFiles/darknet.dir/darknet_cl/src/activation_layer.cpp.o] Error code 1

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
1 error generated.
--- CMakeFiles/darknet.dir/darknet_cl/src/avgpool_layer.cpp.o ---
*** [CMakeFiles/darknet.dir/darknet_cl/src/avgpool_layer.cpp.o] Error code 1

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
1 error generated.
--- CMakeFiles/darknet.dir/darknet_cl/src/avgpool_layer_kernels_cl.cpp.o ---
*** [CMakeFiles/darknet.dir/darknet_cl/src/avgpool_layer_kernels_cl.cpp.o] Error code 1

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
1 error generated.
--- CMakeFiles/darknet.dir/darknet_cl/src/blas_kernels_cl.cpp.o ---
*** [CMakeFiles/darknet.dir/darknet_cl/src/blas_kernels_cl.cpp.o] Error code 1

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
1 error generated.
--- CMakeFiles/darknet.dir/darknet_cl/src/batchnorm_layer.cpp.o ---
*** [CMakeFiles/darknet.dir/darknet_cl/src/batchnorm_layer.cpp.o] Error code 1

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
1 error generated.
--- CMakeFiles/darknet.dir/darknet_cl/src/activation_kernels_cl.cpp.o ---
*** [CMakeFiles/darknet.dir/darknet_cl/src/activation_kernels_cl.cpp.o] Error code 1

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
1 error generated.
--- CMakeFiles/darknet.dir/darknet_cl/src/blas.cpp.o ---
*** [CMakeFiles/darknet.dir/darknet_cl/src/blas.cpp.o] Error code 1

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
8 errors

make[2]: stopped in /usr/home/user/Darknet-On-OpenCL/build
--- CMakeFiles/darknet.dir/all ---
*** [CMakeFiles/darknet.dir/all] Error code 2

make[1]: stopped in /usr/home/user/Darknet-On-OpenCL/build
1 error

make[1]: stopped in /usr/home/user/Darknet-On-OpenCL/build
*** [all] Error code 2

make: stopped in /usr/home/user/Darknet-On-OpenCL/build
1 error

make: stopped in /usr/home/user/Darknet-On-OpenCL/build

Using AMD GPU on FreeBSD 13.1

Thanks.