NVIDIA / nvbench

CUDA Kernel Benchmarking Library
Apache License 2.0
474 stars 63 forks source link

Cmake Cannot Locate `git_revision.cuh` file in `nvbench/details` #144

Closed nv-rliu closed 10 months ago

nv-rliu commented 10 months ago

I'm trying to build nvbench by following the instructions in the README file.

After running cmake -DNVBench_ENABLE_EXAMPLES=ON -DCMAKE_CUDA_ARCHITECTURES=70 .. && make, I get this following error:

[ 30%] Building CXX object nvbench/CMakeFiles/nvbench.dir/named_values.cxx.o
[ 32%] Building CUDA object nvbench/CMakeFiles/nvbench.dir/option_parser.cu.o
In file included from /root/nvbench/nvbench/option_parser.cu:24:
/root/nvbench/nvbench/git_revision.cuh:21:10: fatal error: nvbench/detail/git_revision.cuh: No such file or directory
   21 | #include <nvbench/detail/git_revision.cuh>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [nvbench/CMakeFiles/nvbench.dir/build.make:265: nvbench/CMakeFiles/nvbench.dir/option_parser.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:245: nvbench/CMakeFiles/nvbench.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

When I run find . -name git_revision.cuh I see that the only file with that name is inside nvbench/nvbench/git_revision.cuh. Why is there no git_revision.cuh file inside nvbench/details/?

robertmaynard commented 10 months ago

Why is there no git_revision.cuh file inside nvbench/details/?

The git_revision.cuh should be generated at build time and placed in <build_dir>/nvbench/details/. The current issue is that in parallel builds the step that generates teh git_revision.cuh is not happening before consumers are built.

nv-rliu commented 10 months ago

For now, I'm able to successfully build using commit 39b2770b62ce1f4e0ebeb9af60d7c6de624633a5 Hope this helps anyone else who encounters this issue.