Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2017 17:35:19 -0700
From:      Artem Belevich <art@freebsd.org>
To:        =?UTF-8?B?T3RhY8OtbGlv?= <otacilio.neto@bsd.com.br>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Fwd: CUDA and FreeBSD
Message-ID:  <CAFqOu6hjXncAxf5s5t34G8WiWizDjz6qx2qGPdvPUSmNhwsJQA@mail.gmail.com>
In-Reply-To: <CAFqOu6hFnYMwXu3EqMmqpPS-Qkz=fKJmvT=01okQSip4zAuzyQ@mail.gmail.com>
References:  <65001830-5520-cd20-fd71-130d28c7aadf@bsd.com.br> <CAFqOu6hFnYMwXu3EqMmqpPS-Qkz=fKJmvT=01okQSip4zAuzyQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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=C3=ADlio <otacilio.neto@bsd.com.br> wr=
ote:

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFqOu6hjXncAxf5s5t34G8WiWizDjz6qx2qGPdvPUSmNhwsJQA>