AMD ROCm Solution Enables Native Execution of NVIDIA CUDA Binaries on Radeon GPUs
Click here to post a comment for AMD ROCm Solution Enables Native Execution of NVIDIA CUDA Binaries on Radeon GPUs on our message forum
Gomez Addams
This is really, really cool! It could open up HUGE doors if it is pursued farther. It will be interesting to see how AMD's MI300X compares with Nvidia's Hopper chips on the same code. It could also allow developers to utilize AMD's cards if it really works well.
One thing that makes no sense to me is this statement, "Using the ZLUDA library, developers can effectively bypass CUDA." Developers still have to generate CUDA binaries (see the first sentence above) so CUDA is not being bypassed at all since the SDK is required for that. If anything, CUDA is being embraced even further and I think that is very good thing.
AuerX
if you can't beat them, join them
Crazy Joe
The CUDA compiler basically compiles to an intermediate output format called PTX. This format is then converted to an assembly format called SASS. It is this SASS that the CUDA driver on the GPU converts in the actual microcode that the GPU can execute natively. I assume that ZLUDA takes the SASS and/or the PTX code from the CUDA executable and passes it through a front end pretending to be the CUDA driver that does the translation into the AMD native microcode that can be executed on AMD GPUs. The performance loss shown against some of the OpenCL benchmarks probably comes from those PTX/SASS instructions that don't have a matching microcode instruction in AMD's microcode and thus have to be emulated with small subroutines that require more instructions to perform the same operation.
AMD had already embraced CUDA in a sense when they defined HIP, since HIP source code looked like CUDA source code with the prefix cuda replaced with the hip prefix, so that their CUDA to HIP converter could simply translate from CUDA to HIP for those functions that HIP supported, making the conversion process simple and even allowing AMD to compile HIP code for NVIDIA GPUs (by simply doing the inverse translation and feeding the result of that to the NVCC compiler from NVIDIA.
Of course not having to convert source code, but to do this at the driver level makes life a lot easier for programmers, since now you can just maintain a single code base (where with HIP you'd have to convince CUDA programmers to use HIP instead of CUDA or maintain CUDA and HIP code bases) and let the low level driver take care of the heavy lifting.
There will of course always be parts of CUDA that will be hard to convert by a tool like ZLUDA, especially the hardware level control stuff that is specific for NVIDIA GPUs that has no equivalent on AMDs GPUs, but for most applications that use CUDA simply to implement high performance parallel algorithms without this deep and specific hardware control, this should work without issues (albeit with some performance differences)
Crazy Joe
It seems that AMD has actually abandoned the project. Which means that development of this tool might not be ongoing from this point onward..
Gomez Addams
Yogi
Mufflore
anticupidon
This has potential.
As before mentioned, some people will be willing to develop further and avoid Nvidia.
Those who are doing heavy computational biology, need a cheaper platform to work on their projects.
Some universities have their HPC clusters running R with R Studio leveraging CUDA for heavyweight tasks.
Nothing stops some students work on a alternative way to create a potential game changer for bioinformatics or the like.
Venix
Funny thing is often open source beat solutions come from a "random"guy that has no real skin in the game that just decided he want to try for the hell of it ... But man Nvidia locking down cuda really paid dividends for em ....
Ps: I am against locking such things but companies are companies I guess ... When they are ahead they lock things down when they try to catch up they make things open source trying to incentivise people to use their tool .
Gomez Addams
Crazy Joe
Dribble