mlcommons / inference_results_v0.5

This repository contains the results and code for the MLPerf™ Inference v0.5 benchmark.
https://mlcommons.org/en/inference-datacenter-05/
Apache License 2.0
55 stars 43 forks source link

Fatal error: cuda.h: No such file or directory #32

Open andyluo7 opened 4 years ago

andyluo7 commented 4 years ago

I am building the project with "make build" command. The following error occurred. Should I modify the Makefile or any environment parameter?

[ 20%] Building CXX object lwis/CMakeFiles/lwis.dir/src/lwis.cpp.o In file included from /home/aluo/inference_results_v0.5/closed/NVIDIA/code/harness/lwis/src/lwis.cpp:17:0: /home/aluo/inference_results_v0.5/closed/NVIDIA/code/harness/lwis/include/lwis.hpp:31:10: fatal error: cuda.h: No such file or directory

include

      ^~~~~~~~

compilation terminated. lwis/CMakeFiles/lwis.dir/build.make:62: recipe for target 'lwis/CMakeFiles/lwis.dir/src/lwis.cpp.o' failed make[4]: [lwis/CMakeFiles/lwis.dir/src/lwis.cpp.o] Error 1 make[4]: Leaving directory '/home/aluo/inference_results_v0.5/closed/NVIDIA/build/harness' CMakeFiles/Makefile2:122: recipe for target 'lwis/CMakeFiles/lwis.dir/all' failed make[3]: [lwis/CMakeFiles/lwis.dir/all] Error 2 make[3]: Leaving directory '/home/aluo/inference_results_v0.5/closed/NVIDIA/build/harness' Makefile:83: recipe for target 'all' failed make[2]: [all] Error 2 make[2]: Leaving directory '/home/aluo/inference_results_v0.5/closed/NVIDIA/build/harness' Makefile:280: recipe for target 'build_harness' failed make[1]: [build_harness] Error 2 make[1]: Leaving directory '/home/aluo/inference_results_v0.5/closed/NVIDIA' Makefile:228: recipe for target 'build' failed make: *** [build] Error 2

nvpohanh commented 4 years ago

@andyluo7 Did you run make build inside the container? If so, could you try nvidia-smi and ls /usr/local/cuda/include | grep cuda.h to see if nvidia-docker is running correctly? Thanks

andyluo7 commented 4 years ago

@nvpohanh , no, i did not run it in the container. I try to run the inference on AGX Xavier. Should I run it in container?

nvpohanh commented 4 years ago

Ah, sorry, didn't know that this was on Xavier. No, you don't need docker on Xavier.

Which JetPack did you install? We were using JetPack 4.3 DP.

andyluo7 commented 4 years ago

@nvpohanh, I used the latest Jetpack 4.4 DP. Is there any difference? There are multiple cuda.h files in the system. I wonder if I should change the Makefile to add the include path.

nvpohanh commented 4 years ago

Yes, maybe they changed the path. Could you add that to /usr/local/cuda/include/cuda.h?

andyluo7 commented 4 years ago

I have to hard coded #include </usr/local/cuda/include/cuda.h> in the .h and .c files in /inference_results_v0.5/closed/NVIDIA/code/harness/lwis to make it work.