OpenCL backend for LLVM

O. Hartmann ohartman at
Mon Mar 12 15:31:54 UTC 2012

On 03/12/12 14:34, Eduardo Morras wrote:
> At 19:16 09/03/2012, Adrian Chadd wrote:
>> On 9 March 2012 09:31, O. Hartmann <ohartman at>
>> wrote:
>> > Well, having to pick up existing ideas and incarntions of those for
>> > Linux is always a pain in the ass, but necessary at the moment. The
>> > "experts" neglected long time the need for keeping FBSD on par with KMS
>> > stuff or all the other development done in that area. Hope "we"
>> > (FreeBSD) will get such a thing on a high performance base soon in
>> > FreeBSD. Or things change again and there is a real
>> platform-independent
>> > standard, not necessaryly bound to Linux (which is not very realistic).
>> When you say experts, you really mean "users who can code." Companies
>> wrote those funny graphics memory API things for Linux. They didn't
>> have a market for BSD.
>> If you want a market for BSD you have to create it. :)
> Yes, it's "snake-selfbite-tail" circle, no market no development, no
> development no market. I know i'm part of the problem because i should
> had showed some development and examples of cuda apps on freebsd and
> made it more visible as hpc platfrom.

This "circle" is typical and follows something well known I want to name
here. And by the way, it is "stupid".

FreeBSD has its roots based on BSD and BSD is born in an academic
environment. Money/funding yes, but "no market". "Market" is a term of
those which are incapable of managing the future - my personal opinion
and this opinion does not imply that I'm reject capitalism (and this
doesn't also imply I'm a socialst or communist!). I follow some thoughts
of Hegel and Kant.

Look at the Linux development the first days: done also by volunteers
WITHOUT MARKET. A bit digging in the history, a bit looking who
developed when a piece and even the blind will reveal that something has
dramatically changed for FreeBSD. There is a lot of engineering today -
but less scientific development. I'm still amazed by the power, elan and
spirit Mathew Dillon is pushing his project even with a new filesystem
while freeBSD incorporates and engineers an already existing filesystem.
This is my try to explain what I mean, no complain about ZFS. I'm not a
native English speaker.

>> I've met some developers at nvidia. They all think the GPU offload
>> stuff is _in_ the FreeBSD nvidia driver. So someone needs to figure
>> out what's (still) missing from at least running workloads on FreeBSD.
> Sorry, i don't understand what you want to say here. Exactly, what do
> they need? development/alpha/beta/final testers? I can port cuda
> examples from linux to freebsd or develop new ones, but currently
> there's no SDK for freebsd, only the cuda runtime.
> Don't know what's the current status of the freebsd nvidia driver on
> cuda/opencl, before i used the recipe from here
> to run cuda apps on freebsd, it worked for 32bits app but the approach
> posted on second comment by Jacob Frelinger never worked for me.

The receipt is outdated and it needs Linux stuff to work. And by the
way, it didn't work for me ever, since the Linuxulator gets very fast
ways out of sync of the development on Linux/CUDA.

I started off a thread once because I felt enthusiastic about having the
opportunity with LLVM and the native 64bit nVidia drivers, which are,
definitely, the fundamental thing one need to run CUDA, or better, OpenCL.
then, a year ago, ther was a light/star at the horizon regarding HMPP.
But it seems this was a bright supernova.

CUDA is too narrow minded and nailed down to one architecture. We
started over with OpenCL and feel really happy with our scientific
stuff. But there are issues not dealt with properly when it comes to
OpenCL kernels. They can not be "compiled" and being made binary without
shooting the platform independend concept and this is for many companies
a problem - but in most cases not for scientists.

So far, FreeBSD does have the support of a native driver by nVidia. But
there are no compatible FreeBSD VUDA libraries, there is no working
"compiler" (nvcc does only run on Linux and expects still in conjunction
with the CUDA SDK 4.1 a gcc < 4.6) and LLVM is far away from having a
suitable PTX backend - a "sine conditio qua non" as I was said once.

Some guy from Universität Saarbrücken proposed in his final thesis soem
stuff, but it hasn't been picked up by BSD people. Linux folks did
already. Well, there is also NO MARKET for the Linux people, but they
obviously feel better with it ... I do not know. To stand my ground and
make statements, I need to dig deeper into history and analyse the
development over the past 15 years of FreeBSD.

I have the strange feeling that since X11 get out of hand being a "open
platform graphical solution", ruled by "Linux" nailed heads, the spirit
of platform independency got a serious crack.

When I was responsible for the IT in my former department, we ordered a
lot of mathematical stuff from NAG. Well, I got everything I could dream
about for FreeBSD, C/C++ and Fortran compilers and a lot of mathematical
libraries. Look at the offerings today and try to go back in time (for
those which might much younger than myself and couln't have the
experience in this development by time-continuum constraints in this
realm of the universe).

>> Same deal goes for workload issues that people have. Keep posting
>> scheduler traces, keep doing the investigations and don't be afraid to
>> think up solutions.
> I'm going to try again, not only cuda but opencl too on a freebsd 8.2
> with production data and last nvidia drivers to get (if works) real
> numbers.

If you have success, let me know. I tried on FreeBSD 9.0 and failed. And
for our modelling software, we desperately need 64bit. The mix in having
64bit (pseudo) architecture on FreeBSD and then a portion of the
software driven by 32bit Linuxulator drives me nuts.
One of the most disturbing facts is, that cross compiling is hard and
nearly impossible. The Linuxulator is not supposed to replace Linux, it
is a convenient way to fill gaps. But using OpenCL/CUDA is not a "gap",
it is a whole realm on modern platforms and we (FreeBSD users) start
getting dried out. And as far as I understand, the use of HPC is now
bound to GPGPU capable operating systems and this seems to be an issue
of how good the OS is on par with several new concepts like KMS. I might
be wrong, mea culpa, if it is the case.

On the other hand, if the conclusion of some of the readers would be
"then leave FreeBSD and go to Linux", they might be shut up, please.
This would be MARKET(?) - 1. And do this n times, as it happend in the
past, then you end up with NULL at the end.

>> The rest of us are mostly just users who hack on this stuff for fun. :-)
> Keep doing this great hacking and having fun :)

My capabilities are bound to different things at the moment, but it
would be nice to start doing hacking into LLVM/OpenCL stuff just for
fun. Even if there is no MARKET. Science has no market, otherwise Galois
wouldn't came up with his theory in numbers, like Krull, Abels and
other, having built the fundaments of the simple application
cryptography out of the number's theorie. Those who can think in the
categories of a sales man, they should do so. I appreciate their doing,
they make "money". But they do not invent.
>> Adrian
>> (Who is hacking on this stuff (FreeBSD) for fun.)

Sorry if I have pissed off anybody, but I feel frustrated about the
short view of myself and other guys ...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url :

More information about the freebsd-performance mailing list