Monday, February 12th 2024

AMD Develops ROCm-based Solution to Run Unmodified NVIDIA's CUDA Binaries on AMD Graphics

AMD has quietly funded an effort over the past two years to enable binary compatibility for NVIDIA CUDA applications on their ROCm stack. This allows CUDA software to run on AMD Radeon GPUs without adapting the source code. The project responsible is ZLUDA, which was initially developed to provide CUDA support on Intel graphics. The developer behind ZLUDA, Andrzej Janik, was contracted by AMD in 2022 to adapt his project for use on Radeon GPUs with HIP/ROCm. He spent two years bringing functional CUDA support to AMD's platform, allowing many real-world CUDA workloads to run without modification. AMD decided not to productize this effort for unknown reasons but did open-source it once funding ended per their agreement. Over at Phoronix, there were several benchmarks testing AMD's ZLUDA implementation over a wide variety of benchmarks.

Benchmarks found that proprietary CUDA renderers and software worked on Radeon GPUs out-of-the-box with the drop-in ZLUDA library replacements. CUDA-optimized Blender 4.0 rendering now runs faster on AMD Radeon GPUs than the native ROCm/HIP port, reducing render times by around 10-20%, depending on the scene. The implementation is surprisingly robust, considering it was a single-developer project. However, there are some limitations—OptiX and PTX assembly codes still need to be fully supported. Overall, though, testing showed very promising results. Over the generic OpenCL runtimes in Geekbench, CUDA-optimized binaries produce up to 75% better results. With the ZLUDA libraries handling API translation, unmodified CUDA binaries can now run directly on top of ROCm and Radeon GPUs. Strangely, the ZLUDA port targets AMD ROCm 5.7, not the newest 6.x versions. Only time will tell if AMD continues investing in this approach to simplify porting of CUDA software. However, the open-sourced project now enables anyone to contribute and help improve compatibility. For a complete review, check out Phoronix tests.
Sources: Phoronix, ZLUDA
Add your own comment

54 Comments on AMD Develops ROCm-based Solution to Run Unmodified NVIDIA's CUDA Binaries on AMD Graphics

#26
Jism
ThomasKNot gonna complain about the EU pushing for a more open-standard market. Look at what they did to apple, enforcing them to adopt USB-C, worldwide.
EU pushed apple to allow sideloading of apps (that not come through app-store) but also pushed apple to have app creators, use their own payment system rather then through apple store.

I mean it's a fantastic eco-system in regards of software - look at the malware that was resident for years in Google's appstore. Not a thing found through apple.
Posted on Reply
#27
ratirt
AusWolfThe same has been done on other GPUs - there's FSR. One can argue the minor differences in quality, but regardless of one's personal opinion, the technology is there, and it doesn't need no AI magic to run.
FSR is a different feature (it does the same though) from a different company. I'm talking about the NV proprietary DLSS or FG etc. which is tailored to contribute user only if you have specific hardware that can utilize the feature. FSR has always been hardware agnostic.
Posted on Reply
#28
theouto
This is quite a good stopgap solution while we wait for a proper implementation of AMD's Stream processors, which would easily happen if AMD would sent over some engineers to whatever app they want to help better support their GPUs. It would be good PR and it would show that AMD GPUs can actually be used for production, and that they can compete, the fact that a CUDA translation can get better performance than a native HIP implementation shows that there is much work to be done.
Denver@topic, I find it strange as hell that this gimmick runs faster than AMD's own HIP, it's the same as saying that the company doesn't know its own hardware to create optimized code, in other words, they're underutilizing its capabilities. Incompetence? Lack of investment? What's it lol
My guess? Lack of investment, probably just helped with two lines of code and disappeared, surely they can do a much better job than that if they further invested into implementations.
Posted on Reply
#29
Makaveli
NhonhoFrom now on, the GPU-Z app will have the CUDA and PhysX checkboxes checked for AMD graphics cards.

Why would those be checked off?

What does PhsyX have to do with CUDA?
Posted on Reply
#30
progste
MakaveliWhy would those be checked off?

What does PhsyX have to do with CUDA?
it uses cuda cores to calculate phisics, without a cuda card it would run on cpu with terrible performance and missing features. It was basically Nvidia's way of gatekeeping some game features back then.
Posted on Reply
#31
AusWolf
ratirtFSR is a different feature (it does the same though) from a different company. I'm talking about the NV proprietary DLSS or FG etc. which is tailored to contribute user only if you have specific hardware that can utilize the feature. FSR has always been hardware agnostic.
Sure, but my point is that if it can be done with a hardware agnostic feature, then there's no need for the NV proprietary one, is there?
Posted on Reply
#32
lexluthermiester
MakaveliWhy would those be checked off?

What does PhsyX have to do with CUDA?
He was totally joking.
Posted on Reply
#33
ratirt
AusWolfSure, but my point is that if it can be done with a hardware agnostic feature, then there's no need for the NV proprietary one, is there?
I get your point but you have to understand that reality. NV has a proprietary solution and AMD doesn't and I come from there and build on it. You, on the other hand, say that NV should have made a free for all features, sure but that is not the reality. Instead the reality is, NV said that the set of features mentioned in our conversation is hardware related and cant work on other products of the same kind. The question is here, is that true they cant work with other products and are these features really hardware dependent? I dont state NV should make DLSS of FG free for everybody. They certainly could though but they choose not to.
Posted on Reply
#34
ilyon
Still no RTX™ and DLSS™, so who can barely cares about this non event ?
Posted on Reply
#35
AusWolf
ratirtI get your point but you have to understand that reality. NV has a proprietary solution and AMD doesn't and I come from there and build on it. You, on the other hand, say that NV should have made a free for all features, sure but that is not the reality. Instead the reality is, NV said that the set of features mentioned in our conversation is hardware related and cant work on other products of the same kind. The question is here, is that true they cant work with other products and are these features really hardware dependent? I dont state NV should make DLSS of FG free for everybody. They certainly could though but they choose not to.
So then your point is like saying that Microsoft Office only works on Windows, while my point is like saying that there are various different office solutions available for other OSes too.
Posted on Reply
#36
Nhonho
lexluthermiesterHe was totally joking.
No.

Since Radeon cards are now capable of running CUDA and PhysX code, the GPU-Z application must show the CUDA and PhysX checkboxes checked for AMD graphics cards as well.

If the GPU-Z application does not show these checkboxes marked for AMD cards, it will be showing wrong information.
Posted on Reply
#37
lexluthermiester
NhonhoNo.
Trust me, you're joking..
NhonhoSince Radeon cards are now capable of running CUDA and PhysX code
Not natively they don't.
Nhonhothe GPU-Z application must show the CUDA and PhysX checkboxes checked for AMD graphics cards as well.
They "must" do no such thing.
NhonhoIf the GPU-Z application does not show these checkboxes marked for AMD cards, it will be showing wrong information.
CUDA and PhysX are owned by NVidia, not AMD. Your understanding if the situation seems to be flawed.

So yes, you're joking..
Posted on Reply
#38
ratirt
AusWolfSo then your point is like saying that Microsoft Office only works on Windows, while my point is like saying that there are various different office solutions available for other OSes too.
that is not my point at all.
Posted on Reply
#39
jpvalverde85
The concept is good, but the backend required may be hard to do (missing stuff or parcial support for certain features) and the legal aspects are indeed prohibitive, this is like when Google developed Dalvik, the JIT Java VM that didnt use Java code for Android, then they replaced it with the Android Runtime that compiles the binaries before execution. Google got a big war against Oracle (when Oracle bought Sun) due to this, but got a pat on the back when they settled for no cost (other than legal).

It would be reasonable that AMD pours silently some money on this guy to maintain development of ZLUDA for "educational" purposes, but certainly they can't go full swing on it, is also reasonable that they want to push their own solution.
Posted on Reply
#40
AusWolf
ratirtthat is not my point at all.
Then I'm not sure what you mean.

My point stands: there's no need to push for any hardware-dependent feature when a hardware-agnostic competitor feature is available, minor differences in quality aside.
Posted on Reply
#41
ratirt
AusWolfMy point stands: there's no need to push for any hardware-dependent feature when a hardware-agnostic competitor feature is available, minor differences in quality aside.
That is beside the point actually. Since you attach to your logic abstraction and speculation not facts. You want NV to be hardware agnostic and you build on that saying AMD has features open. That is true and great.
But NV does not have open features for a reason and the most important question here is, are the features NV offer indeed hardware dependent or is it just advertising scheme to charge more for it? I'm sure NV could go the same route AMD did but they didn't. Do you see my point now? It would seem you are focusing on something here you would want not what it is. I'm not saying i dont support what you said.
Posted on Reply
#42
AusWolf
ratirtthe most important question here is, are the features NV offer indeed hardware dependent or is it just advertising scheme to charge more for it?
Regardless of the answer, I think any hardware-dependent feature is inferior to a competitor one that isn't, unless it's undeniably better (which is not the case with DLSS).
ratirtDo you see my point now?
I do. I just don't think that it's relevant from an end user point of view. Other than that, fair enough.
Posted on Reply
#43
ratirt
AusWolfRegardless of the answer, I think any hardware-dependent feature is inferior to a competitor one that isn't, unless it's undeniably better (which is not the case with DLSS).
Inferior in what way? DLSS shows better quality and less artifacts than FSR no doubt about it. That does not mean, DLSS has no flaws. FSR can be used by any card you throw at it. I think DLSS is better but inferior in a sense that it has limitation in usage and product it supports which makes FSR more desirable for the majority of users. If there is a thin line in difference in quality between the two, the hardware dependant features is going to be left behind which is very obvious to me. I hope it happens at some point. If you ask me why, in my opinion, paying for features offered in a product, not for the product itself is a fool's errand and in the long run it will fail even though at the beginning it showed potential.
AusWolfI do. I just don't think that it's relevant from an end user point of view. Other than that, fair enough.
Everything we discuss here is relevant for an end user. Especially the idea that if NV features advertised as hardware dependent are in fact not dependent. Which would mean these could be utilized by any card but instead are being blocked under the proclamation of hardware requirements not being met.
Posted on Reply
#44
AusWolf
ratirtInferior in what way? DLSS shows better quality and less artifacts than FSR no doubt about it. That does not mean, DLSS has no flaws. FSR can be used by any card you throw at it. I think DLSS is better but inferior in a sense that it has limitation in usage and product it supports which makes FSR more desirable for the majority of users. If there is a thin line in difference in quality between the two, the hardware dependant features is going to be left behind which is very obvious to me. I hope it happens at some point. If you ask me why, in my opinion, paying for features offered in a product, not for the product itself is a fool's errand and in the long run it will fail even though at the beginning it showed potential.
Exactly. :)

One can argue that DLSS is better, but it's not so much better that paying extra for it would be a viable option, imo.

The other thing is that all upscaling is basically a crutch to help out with performance issues, unless you're targeting 4K + Ultra graphics. It's shouldn't be advertised as something extra to pay for.
ratirtEverything we discuss here is relevant for an end user. Especially the idea that if NV features advertised as hardware dependent are in fact not dependent. Which would mean these could be utilized by any card but instead are being blocked under the proclamation of hardware requirements not being met.
What I mean is that whether Nvidia artificially locked DLSS to RTX GPUs, or you really need Tensor cores to run it doesn't change the fact that you need an RTX card for DLSS, but you don't need a Radeon for FSR.

I very much agree with your notion that one should pay for performance, and not for features that we never even asked for in the first place.

On topic: CUDA is possibly a different cattle of fish, as some people use it for work, so paying for it kind of makes sense. I, on the other hand, don't work on my GPU, so I couldn't care less.
Posted on Reply
#45
ratirt
AusWolfOn topic: CUDA is possibly a different cattle of fish, as some people use it for work, so paying for it kind of makes sense. I, on the other hand, don't work on my GPU, so I couldn't care less.
Yes you paid for it for work and yet you did not have to since CUDA can work on any graphics there is without the CUDA itself. It does not matter if it is for work or your own entertainment. I'm sure NV charged more for people who used CUDA for work and for gaming (if that would have been a thing) either way. They should not have because it can work on any card. That is my problem. It is like inventing a problem and and give a solution to it. You need CUDA for this and we give you CUDA. Then it turns out you dont need CUDA to run these apps with CUDA. Sole idea of what has been put on a plate with the CUDA thing is athrocious in my opinion. I would have felt screwed. That is why when I see advertisement like the one with RTX cards FG only on this DLSS3 only on that other feature only on this, is a worning for me not to go that way because it is made for only one puprose. Get money from someone for a feature that not necessarily is the way to go and could work on anything.
Posted on Reply
#46
lexluthermiester
ratirtYes you paid for it for work and yet you did not have to since CUDA can work on any graphics there is without the CUDA itself.
No. CUDA is a NVidia feature ONLY. No one who has paid for a non-Nvidia card has paid for CUDA. Full stop.
Posted on Reply
#47
AusWolf
ratirtYes you paid for it for work and yet you did not have to since CUDA can work on any graphics there is without the CUDA itself. It does not matter if it is for work or your own entertainment. I'm sure NV charged more for people who used CUDA for work and for gaming (if that would have been a thing) either way. They should not have because it can work on any card. That is my problem. It is like inventing a problem and and give a solution to it. You need CUDA for this and we give you CUDA. Then it turns out you dont need CUDA to run these apps with CUDA. Sole idea of what has been put on a plate with the CUDA thing is athrocious in my opinion. I would have felt screwed. That is why when I see advertisement like the one with RTX cards FG only on this DLSS3 only on that other feature only on this, is a worning for me not to go that way because it is made for only one puprose. Get money from someone for a feature that not necessarily is the way to go and could work on anything.
I couldn't agree more. Unfortunately, it's a very Nvidia thing these days. That's why I'm not buying any of their cards as long as this practice continues.
Posted on Reply
#48
lexluthermiester
AusWolfUnfortunately, it's a very Nvidia thing these days.
Wait, what? It's never not been an NVidia thing. Exclusively.
Posted on Reply
#49
AusWolf
lexluthermiesterWait, what? It's never not been an NVidia thing. Exclusively.
True, although most, if not all Nvidia features have been hardware-agnostic so far, with the exception of PhysX. It's only with the RTX moniker that they sped up the steep downhill roll on "buy our stuff or else" lane.
Posted on Reply
#50
lexluthermiester
AusWolfTrue, although most, if not all Nvidia features have been hardware-agnostic so far, with the exception of PhysX. It's only with the RTX moniker that they sped up the steep downhill roll on "buy our stuff or else" lane.
Um, no. CUDA and PhysX are NVidia exclusive features. CUDA always has been. PhysX has been since the NVidia buyout. No non-NVidia GPU can natively run CUDA or PhysX. Full stop.
Posted on Reply
Add your own comment
May 21st, 2024 13:47 EDT change timezone

New Forum Posts

Popular Reviews

Controversial News Posts