Fwd: CUDA and FreeBSD

Artem Belevich art at freebsd.org
Mon Oct 9 00:35:22 UTC 2017


Your question is rather vague. Could you elaborate on what exactly you have
in mind?

Last time I checked, linux CUDA programs did run under linuxulator. It's
been a while, though.

Getting native CUDA binaries to compiler/run on FreeBSD is somewhat more
complicated.
CUDA SDK does not support freebsd, so you can't use nvcc to compile any
CUDA binaries on FreeBSD.
Recent Clang (~5.0 or newer) is capable of compiling CUDA programs, so
getting it to compile CUDA source to an object file on FreeBSD should not
be particularly hard. However, you would not be able to link anything that
relies on standard CUDA features (e.g. using foo<<<..>>>() syntax to launch
a kernel or using many cudaXXXX() calls) as they depend on libcudart and
NVidia does not provide it for FreeBSD. You would need to write your own
replacement for the CUDA runtime which would use raw driver API under the
hood. It's somewhat complicated by the fact that the API provided by
libcudart for compiler use is largely undocumented.

You also can't use cuBLAS, cuFFT, cuDNN, etc, because NVidia does not
provide those for FreeBSD, either. :-( That rules FreeBSD out for things
like GPU support in Tensorflow.

--Artem

On Wed, Oct 4, 2017 at 5:41 AM, Otacílio <otacilio.neto at bsd.com.br> wrote:

> What are the issues that prevent programs using CUDA from running on
> FreeBSD?
>
> []'s
>
> -Otacilio
>
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>


More information about the freebsd-hackers mailing list