Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Experimental CUDA support
Experimental CUDA support [message #61450] Fri, 14 February 2025 14:13 Go to next message
mirek is currently offline  mirek
Messages: 14255
Registered: November 2005
Ultimate Member
For now, only Windows/Visual C++.

See reference/Cuda
Re: Experimental CUDA support [message #61451 is a reply to message #61450] Fri, 14 February 2025 15:16 Go to previous messageGo to next message
Tom1
Messages: 1301
Registered: March 2007
Ultimate Contributor
Hi,

Very interesting development! Smile

Maybe I should get some NVIDIA hardware to test this.

I wonder if Intel oneAPI could be supported too in a similar way...? That would offer cross-platform compatibility for Windows, Linux (and gradually MacOS) for hardware from NVIDIA, AMD and Intel. Therefore, oneAPI looks like a good fit for u++, but of course I don't know the internals.

Best regards,

Tom
Re: Experimental CUDA support [message #61455 is a reply to message #61451] Fri, 14 February 2025 20:02 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14255
Registered: November 2005
Ultimate Member
Tom1 wrote on Fri, 14 February 2025 15:16
Hi,

Very interesting development! Smile

Maybe I should get some NVIDIA hardware to test this.

I wonder if Intel oneAPI could be supported too in a similar way...? That would offer cross-platform compatibility for Windows, Linux (and gradually MacOS) for hardware from NVIDIA, AMD and Intel. Therefore, oneAPI looks like a good fit for u++, but of course I don't know the internals.

Best regards,

Tom


Uhm, too soon to tell. Quick glance at oneAPI and the SYCL authors does not bring too much confidence.

Originally I tried with Vulkan / GLSL, but that is really unusable - I am not bothered with 500+ lines to run simple kernel, but GLSL is unusable language for anything complex. It is like C without pointers... Meanwhile, CUDA is for years full blown C++ with hardly any limitations. Impossible for oneAPI / SYCL to catch up with something incompatible IMO.

Amd HIP on the other hand - that one looks promising.

Right now I am a bit unhappy that CUDA requires Visual C++ compiler, but maybe a bit of effort I might be able to persuade it to use mingw-clang instead...
Re: Experimental CUDA support [message #61459 is a reply to message #61455] Sat, 15 February 2025 23:08 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 702
Registered: December 2005
Location: Budapest, Hungary
Contributor
I'm absolutely not an expert, but AFAIK nvidia-cuda-toolkit on Ubuntu can be used in Clang or G++ projects.
Re: Experimental CUDA support [message #61460 is a reply to message #61459] Sun, 16 February 2025 09:54 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 14255
Registered: November 2005
Ultimate Member
zsolt wrote on Sat, 15 February 2025 23:08
I'm absolutely not an expert, but AFAIK nvidia-cuda-toolkit on Ubuntu can be used in Clang or G++ projects.


In Linux yes. In Win32, no way - you need to use Visual C++. At least that is Nvidia's position. https://stackoverflow.com/questions/68726422/is-it-possible- to-integrate-nvcc-with-gcc-g-in-windows

Now nvcc seems to work by separating cuda code and host code, then compiles cuda code and creates a new c++ file which combines host code and compiled cuda code (as arrays like

unsigned long long fatbinData[]= {0x00100001ba55ed50ull ....
)

Then this file is compiled by host compiler. There are explicit checks in CUDA headers for MSC++ compiler (#ifdef MSC_VER). There might also be a problem with CUDA runtime library, but I doubt that...

I believe that if I take clang-cl and give that to nvcc, with some additional trucks like -D MSC_VER it should work. Do not have time right nor energy now to test right now...
Re: Experimental CUDA support [message #61462 is a reply to message #61460] Sun, 16 February 2025 14:41 Go to previous message
zsolt is currently offline  zsolt
Messages: 702
Registered: December 2005
Location: Budapest, Hungary
Contributor
Ah, I see.
Previous Topic: SSH package updated.
Next Topic: 2024.1a (rc)
Goto Forum:
  


Current Time: Tue Apr 29 09:42:25 CEST 2025

Total time taken to generate the page: 0.01093 seconds