this post was submitted on 06 Aug 2024
169 points (98.8% liked)

Linux

5232 readers
145 users here now

A community for everything relating to the linux operating system

Also check out !linux_memes@programming.dev

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 1 year ago
MODERATORS
 

Back in February of this year you may recall the interesting news that was announced on Phoronix that AMD Quietly Funded A Drop-In CUDA Implementation Built On ROCm: It's Now Open-Source. That open-source ZLUDA code for AMD GPUs has been available since AMD quit funding the developer earlier this year. But now the code has been retracted. It's not from NVIDIA legal challenges but rather AMD reversing course on allowing it to be open-source.

As explained in that article earlier in the year, AMD had quietly funded the ZLUDA developer Andrzej Janik to bring his CUDA-compatible implementation to AMD GPUs and atop the ROCm software stack. ZLUDA start off originally as an open-source CUDA implementation for Intel graphics built atop the Level Zero (hence the ZLUDA name) software stack. While working on ZLUDA, he got it working out rather nicely and various CUDA applications running seamlessly on AMD GPUs as shown and benchmarked in my prior article. But then AMD decided to quit funding the project.

The agreement was reportedly that if/when the contract ended, the ZLUDA code could be open-sourced. That's what happened back in February. But now that code has been retracted from the official public GitHub repository. It's not from legal threats from NVIDIA as one might imagine given its working to support CUDA on non-NVIDIA hardware, but rather from AMD itself.

Janik also noted in his announcement that he had a NVIDIA GameWorks implementation working on AMD GPUs but sadly that code will now never be open-sourced.

Andrzej Janik notes he wants to "rebuild ZLUDA" moving forward and is working on project funding. What wasn't clear from his message whether this means a new ZLUDA focused on the original Intel GPU plans or a new clean sheet design for AMD GPUs. When I asked Janik about it, he's still exploring options.

It will be very interesting to see where ZLUDA goes from here but disappointing that the prior open-source code has been retracted. The GitHub repository is at vosen/ZLUDA while we are eager to see its future direction.

all 16 comments
sorted by: hot top controversial new old
[–] cschreib@programming.dev 21 points 3 months ago* (last edited 3 months ago) (1 children)

How I wish CUDA was an open standard. We use it at work, and the tooling is a constant pain. Being almost entirely controlled by NVIDIA, there's no alternative toolset, and that means little pressure to make it better. Clang being able to compile CUDA code is an encouraging first step, meaning we could possibly do without nvcc. Sadly the CMake support for it on Windows has not yet landed. And that still leaves the SDK and runtime entirely in NVIDIA's hands.

What irritates me the most about this SDK is the versioning and compatibility madness. Especially on Windows, where the SDK is very picky about the compiler/STL version, and hence won't allow us to turn on C++20 for CUDA code. I also could never get my head around the backward/forward compatibility between SDK and hardware (let alone drivers).

And the bloat. So many GBs of pre-compiled GPU code for seemingly all possible architectures in the runtime (including cudnn, cublas, etc). I'd be curious about the actual number, but we probably use 1% of this code, yet we have to ship the whole thing, all the time.

If CPU vendors were able to come up with standard architectures, why can't GPU vendors? So much wasted time, effort, energy, bandwidth, because of this.

How do you people manage this?

[–] Meruten@lemmy.dbzer0.com 13 points 3 months ago (3 children)

And this is why the CEO of your company should not be a family relation to the CEO of your main rival company.

[–] ScreaminOctopus@sh.itjust.works 5 points 3 months ago

I had no idea this was the case, in a sane legal system this should be an open and shut antitrust case.

[–] Jumuta@sh.itjust.works 2 points 3 months ago

omg how did I not know this, that's so wacky

[–] anzo@programming.dev 1 points 3 months ago (1 children)

What's the implication here? Because I was thinking that maybe AMD was afraid that Nvidia would put countermeasures to hinder the ZLUDA effort and then it made sense to make it closed source, as a non-exhaustive safety measure.

[–] Meruten@lemmy.dbzer0.com 11 points 3 months ago* (last edited 3 months ago)

It doesn't seem like AMD has any intention of continuing to develop this project. The reason it went open source in the first place is that AMD stopped funding this project. The dev and AMD had an agreement that he could open source the code once they stop working together. They stopped working together because AMD wanted out of a project that would benefit its products, and that was demonstrated to work well. The dev opened sourced the project as agreed. This was back in Feb this year.

Now AMD are trying to make the source code closed so no one can access it. They are not announcing a closed sourced version of this feature that they are developing themselves as far as I know. So this move is simply to remove code from the Internet that would allow their cards to work better in certain workloads when compared to their competitors. AMD should not have an incentive to do this. Nvidia has an incentive to get rid of this code, yes.

The implication is that AMD is doing this because they don't want to truly compete with Nvidia. And they don't want to compete with Nvidia because their CEO's don't really want to compete. This is not the first time AMD has simply chosen not to put pressure on Nvidia with AMD seemingly comfortable with their place.

[–] LarmyOfLone@lemm.ee 10 points 3 months ago (1 children)

Huh, I'm confused. I believe once they make it open source and grand a license to modify and distribute you can't "take it back". That version should be open source forever.

Did nobody fork the damn thing? :D

[–] firelizzard@programming.dev 5 points 3 months ago (1 children)

If I steal code and release it with an open source license, that license is not valid. The author released his work open source based on an email from AMD. AMD is now saying that email was not legally binding thus the author did not have the right to release it under and open source license thus that license was not legally valid. If you had forked it and continued to use it, AMD could take you to court and say that the license you are operating under is legally invalid.

[–] LarmyOfLone@lemm.ee 2 points 3 months ago* (last edited 3 months ago) (1 children)

Ah thanks for explaining, I somehow missed that. So technically AMD is in breach of contract with the author, but could still sue the author or user. Weird.

A bit of a side tangent, but there are many projects and code stuff where the company no longer plans to use it commercially and that might as well be open sourced. Most of all computer games. There are many older computer games where they could release the source code for people to play with and do modifications and improvements. The overall copyright could still be with the company.

[–] firelizzard@programming.dev 1 points 3 months ago

It’s not clear to me that AMD is in breach of contract, though I admit I haven’t looked into it in detail. But regardless, the contract is irrelevant to the open source thing unless that was in the terms of the contract.

[–] mindbleach@sh.itjust.works 8 points 3 months ago

This is, in purely technical terms, some bullshit.

[–] AVincentInSpace@pawb.social 7 points 3 months ago* (last edited 3 months ago)

The moral of the story is never pledge loyalty to a company. They will turn against you the instant you are no longer useful.

[–] koalaSunrise@programming.dev 6 points 3 months ago

I am disappoint.

[–] seaQueue@lemmy.world 5 points 3 months ago

If anyone's got a copy of the repo as of its final state before the rollback hit me up, I'd like to have a copy of the code

[–] possiblylinux127@lemmy.zip 1 points 3 months ago

They probably want you to use opencl