Please, consider implementing nv_register_user_pages/nv_unregister_user_pages/os_lock_user_pages/os_unlock_user_pages in the FreeBSD driver. Those functions are apparently being called on CUDA initialization and that’s the bit that prevents CUDA from working on FreeBSD. Well, at least as far as non-UVM parts are concerned. Although FreeBSD is not going to be a major GPU computing platform in the foreseeable future, quite a few regular consumer apps depend on this capability now (OBS Studio through NVENC, Blender, Darktable and so on).
I actually tested CUDA with a patched driver (just copied the relevant Linux bits with linuxkpi help) and my nv-sglrun script, but I feel that this driver patch is too much of a hack to inflict on end users.
Well, it doesn’t seem like it’d be a major issue to implement just those calls and I’ll add my support as well :)
I am very thankful of NVIDIA to have implemented Vulkan in the FreeBSD (beta) driver and I really hope we don’t seem ungrateful or anything by asking for even more. Since it’s just these few calls to have the CUDA init working through a hack (and not needing CUDA actually supported and thus tested on FreeBSD) I’d say it’s reasonable to ask if this could become a future possibility.
NVidia RTX 2080 has been great support and compatibility with my FreeBSD setup.
One thing I’m still lacking though is OpenCL, which is requisite for a number of applications that are important for me. Namely 3d modeling (Blender) and 3d printing (slicer programs). At this point, I would even contribute to a GoFundMe, lol, just to get this support added.
I get the feeling that alot of people who do data science on FreeBSD would also very much enjoy this. I know it might not be high up on the priority list for NVidia, simply because the BSD userbase is probably pretty low, but it would be pretty amazing if yall would be kind enough to unlock this for us.