CUDA

Code:
% pwd
/usr/home/grahamperrin/dev/gpufetch
% echo $0
/bin/tcsh
% ./build.sh
-- The CXX compiler identification is Clang 13.0.0
-- 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
-- Looking for a CUDA compiler
-- Looking for a CUDA compiler - NOTFOUND
-- Found PCIUTILS: /usr/local/lib/libpci.so 
-- ----------------------
-- gpufetch build report:
-- CUDA backend: OFF
-- Intel backend: ON
-- ----------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/grahamperrin/dev/gpufetch/build
[ 25%] Building CXX object CMakeFiles/intel_backend.dir/src/intel/udev.cpp.o
[ 25%] Building CXX object CMakeFiles/intel_backend.dir/src/intel/intel.cpp.o
[ 25%] Building CXX object CMakeFiles/intel_backend.dir/src/intel/uarch.cpp.o
[ 25%] Building CXX object CMakeFiles/intel_backend.dir/src/intel/pci.cpp.o
[ 31%] Building CXX object CMakeFiles/intel_backend.dir/src/intel/cpuid.cpp.o
[ 37%] Linking CXX static library libintel_backend.a
[ 37%] Built target intel_backend
[ 56%] Building CXX object CMakeFiles/gpufetch.dir/src/common/gpu.cpp.o
[ 56%] Building CXX object CMakeFiles/gpufetch.dir/src/common/main.cpp.o
[ 56%] Building CXX object CMakeFiles/gpufetch.dir/src/common/args.cpp.o
[ 62%] Building CXX object CMakeFiles/gpufetch.dir/src/common/pci.cpp.o
[ 68%] Building CXX object CMakeFiles/gpufetch.dir/src/common/sort.cpp.o
[ 75%] Building CXX object CMakeFiles/gpufetch.dir/src/common/global.cpp.o
[ 81%] Building CXX object CMakeFiles/gpufetch.dir/src/common/printer.cpp.o
[ 87%] Building CXX object CMakeFiles/gpufetch.dir/src/common/master.cpp.o
[ 93%] Building CXX object CMakeFiles/gpufetch.dir/src/common/uarch.cpp.o
[100%] Linking CXX executable gpufetch
[100%] Built target gpufetch
% ./gpufetch
[ERROR]: No GPU was detected! Available GPUs are:
- GPU 0: AMD 1002:6841
Please, make sure that the appropiate backend is enabled:
- CUDA backend:  OFF
- Intel backend: ON
Visit https://github.com/Dr-Noob/gpufetch#2-backends for more information
% pkg provides /cuda/bin/nvcc
% pkg provides bin/nvcc
Name    : kokkos-3.5.00
Desc    : C++ performance portability programming ecosystem
Repo    : FreeBSD
Filename: usr/local/bin/nvcc_wrapper
% which nvcc
nvcc: Command not found.
%

From <https://github.com/Dr-Noob/gpufetch#21-cuda-backend-is-not-enabled-why> (for example):

cmake -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_COMPILER_TOOLKIT_ROOT=/usr/local/cuda/ ..

– is this, or something like it, possible with FreeBSD?


 
MichaelL Oko inf3rno OSExplorer

CUDA framework support under <https://wiki.freebsd.org/2021FoundationCFI#Graphics> originally added by jrm@


From FreeBSD In Scientific Computing FreeBSD Journal ME July/August 2018:

… In order for FreeBSD to become a competitive platform in HPC, it would also need to more easily support a few other subsystems that currently only work well on Linux, such as nVidia's CUDA GPU platform (although the open standard OpenCL is beginning to gain traction) and …
 
It's like people think that feature is magically going to happen if they ask about it all the time.

People who tinkered with PoC by themselves clearly wrote what kind of effort is needed to get the feature. That effort is not going to get organized on an user support forum.

The target audience needs to fund the development or push NVidia for support.
 
That audience should package a sufficiently popular GPU computing app first, like Tensorflow. We need to organize our efforts around a few clear targets, this is going nowhere otherwise. (Same goes for Intel and AMD stuff.)

People who tinkered with PoC by themselves clearly wrote what kind of effort is needed to get the feature.
PoC was eventually replaced by the proper driver code: https://forums.developer.nvidia.com/t/cuda-and-nv-un-register-os-un-lock-user-pages/174678. Of course, we still need a workaround for userspace libs. For now.

That doesn't get us full CUDA support, but we can run OpenCL apps at least (with x11/nvidia-driver, x11/linux-nvidia-libs and the nv-sglrun script from emulators/libc6-shim). And NVENC if you bother to compile it.
 
Thanks,

… ask about it all the time. …

Maybe some misunderstanding.

I can't speak for the other people who wrote in previous topics, but as far as I can tell I mentioned CUDA just once in the past, and that was:
  • not me asking about it
– that one occasion was me quoting someone else.

The previous topic <https://forums.freebsd.org/threads/49653/> with an identical title (CUDA) is not a good point of reference because additional discussion there will probably disappear.



For anyone with a technical interest: I stumbled across the CUDA backend context following a fix to a utility for it to compile on FreeBSD.


Then, found the CUDA framework support idea, which had been added by jrm@ (Joseph Mingrone, Project Coordinator, FreeBSD Foundation). The listing was one of the few that lacked a point of reference, so yesterday <https://wiki.freebsd.org/action/info/2021FoundationCFI?action=diff&rev2=41&rev1=40> I added the link to this (necessarily new) topic.

It's unfortunate that topics must be duplicated/split, but that's not my decision.

Incidentally, I don't see Joseph Mingrone asking about CUDA all the time; I see no mention of CUDA in Call for Foundation-supported Project Ideas, the topic that preceded the page in the wiki.

(Do people sometimes ask him about CUDA framework support? I have no idea.)

HTH
 
Back
Top