Add cudainfo program to test CUDA in sandbox

The cudainfo program is executed inside the build sandbox so we can see
if it works properly. It uses the autoAddDriverRunpath hook to inject in
the runpath the location of the library directory for CUDA libraries.
This commit is contained in:
2025-07-22 15:24:55 +02:00
parent 378716c0fa
commit f4563008b1
5 changed files with 649 additions and 1 deletions

12
pkgs/cudainfo/Makefile Normal file
View File

@@ -0,0 +1,12 @@
HOSTCXX ?= g++
NVCC := nvcc -ccbin $(HOSTCXX)
CXXFLAGS := -m64
# Target rules
all: cudainfo
cudainfo: cudainfo.cpp
$(NVCC) $(CXXFLAGS) -o $@ $<
clean:
rm -f cudainfo cudainfo.o