The cmake files I'm referring to are clang's. I don't have a separate project using cmake. I do not think that changing clang to work around an issue in cmake files of one project is something we want to do. It sounds like you need to change your build system and tell clang the correct path. The fact that you want to add /usr/cuda/lib in this case suggests that /usr is the wrong path and /usr/lib/cuda is the correct one. In the end only one of those paths will be in effect and that's the path that should be specified via -cuda-path. It's odd apparently because nvidia-cuda-toolkit is odd. Treating -cuda-path=/usr as a special case was just a way to get there. My real goal is to get clang and openmp working out of the box on Ubuntu. It appears that what you're trying to do is to add "/usr/lib/cuda" on Ubuntu and Debian when -cuda-path=/usr is specified. Even if it installed it all to /usr/lib/cuda, FindCUDA.cmake would probably still see /usr/bin/nvcc and assume /usr is the CUDA install root. It seems that nvidia-cuda-toolkit still isn't installing a complete CUDA install in one location. I guess that just adding the check for isUbuntu() should make clang work on Ubuntu 18.04+. Is it fair then to say that /usr/lib/cuda isn't the root either? usr/lib/cuda/bin/nvcc doesn't exist, so that's probably why FindCUDA.cmake finds /usr/bin/nvcc (also installed by nvidia-cuda-toolkit). cuda-path=/usr was never supposed to work - /usr is *not* the root of the CUDA SDK. To be clear, I'm trying to address the use case where cmake/clang finds the cuda installation automatically. With that fix in place -cuda-path=/usr/lib/cuda should work. That change seems to be in Ubuntu bionic (18.04) Īpt confirms that's what I have: nvidia-cuda-toolkit 9.1.85-3ubuntu1 IIUIC, Debian has added a shim that pretends to be a monolithic CUDA install: usr/local/cuda-11.2/targets/x86_64-linux/include/cupti.I'm not sure that's something that needs to be fixed in clang. Rules.pfm4_pe:42: recipe for target 'libpfm4/lib/libpfm.a' failed Makefile.inc:67: recipe for target 'libpapi.so.6.0.0.1' failed g -Wextra -Wall -DCUPTI_PROFILER=-1 -I/opt/cuda/include -I/opt/cuda/extras/CUPTI/include -g -DPAPI_CUDA_MAIN="" -DPAPI_CUDA_RUNTIME="" -DPAPI_CUDA_CUPTI="" -DPAPI_CUDA_PERFWORKS="" -DOSLOCK="linux-lock.h" -DOSCONTEXT="linux-context.h" -O2 x86_cpuid_info.c papi_libpfm4_events.c papi.c papi_internal.c high-level/papi_hl.c extras.c sw_multiplex.c papi_fwrappers.c papi_fwrappers_.c papi_fwrappers_.c upper_PAPI_FWRAPPERS.c threads.c cpus.c linux-memory.c linux-timer.c linux-common.c papi_preset.c papi_vector.c papi_memory.c components/perf_event/perf_event.c components/perf_event/pe_libpfm4_events.c components/perf_event_uncore/perf_event_uncore.c components/cuda/linux-cuda.c -o libpapi.so.6.0.0.1 -Bdynamic -Llibpfm4/lib -lpfm -ldl -gĬomponents/cuda/linux-cuda.c:33:10: fatal error: cupti.h: No such file or directory Gcc -fPIC -DPIC -shared -Wl,-soname -Wl,libpapi.so.6.0 -Xlinker "-rpath" -Xlinker "/usr/local/lib" -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE="libpfm4/include/perfmon/perf_event.h" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. Rm -f libpapi.so.6.0.0.1 libpapi.so libpapi.so.6.0 Gcc -E -DFORTRANCAPS papi_fwrappers.c > upper_PAPI_FWRAPPERS.c Gcc -E -DFORTRANDOUBLEUNDERSCORE papi_fwrappers.c > papi_fwrappers_.c Gcc -E -DFORTRANUNDERSCORE papi_fwrappers.c > papi_fwrappers_.c Sh papi_events_table.sh papi_events.csv > papi_events_table.h Ii nvidia-cuda-toolkit 9.1.85-3ubuntu1 amd64 NVIDIA CUDA development toolkit Assuming it is part of cupti but nvidia web site says it is packaged with cuda toolkit which I already dpkg -l | grep cuda | grep -i toolkit
0 Comments
Leave a Reply. |