Jump to content

AMD have released a tool which converts Nvidia's CUDA code to portable C++ code which works on both Nvidia and AMD cards!

goodtofufriday
1 minute ago, LAwLz said:

Isn't this really old? Here is a thread about it from over a year ago.

(Also a fun read sicne it involves a certain person refusing to give sources to his claims)

I remember that too. I think then it was being worked on. Here they've actually released it to the public.

CPU: Amd 7800X3D | GPU: AMD 7900XTX

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, AlwaysFSX said:

No, if a company fairly and legally becomes the only one in the market they're free to do as they wish within reason and will not be broken up.

 

Edit: typo, been up a while

The US could also force a company to split. See for example the case of Bell.

Link to comment
Share on other sites

Link to post
Share on other sites

Well at the end of the day it won't help that much. Despite their claims I think there's gonna be at least a bit of significant performance impact. AMD is probably banking on the fact that they're quite stronger on compute than similar Nvidia cards and probably just eat this performance and still come out on top or on par but ultimately, developers would actually have a significant advantage with the same card with OpenCL instead.

 

Just speculation though no need to call the engineering LTT team of one to post several PDF documents on how I am wrong okay?

-------

Current Rig

-------

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Helly said:

This is fully legal because AMD obtained a license quite a while ago. I think this is the first thing they've done with it.

 

Click! just over a year ago :). Or was that wrong and not an actual license?

 

 

 

3 hours ago, SpaceGhostC2C said:

That would not make sense, since your code is yours. Remember, this isn't translating anything Nvidia has created into something else. It only translates code you write in CUDA language into something else. It is impossible for it to be illegal. It would mean that if you had an idea for a program ans write it in C, then you can write a CUDA version, but if you write the CUDA version first, then it is illegal to write a C version of your own program. Even if Nvidia would include such thing somewhere in its license agreements, it would be void.

There are no legal issues with translating code form one syntax to another.

 

3 hours ago, ivan134 said:

Uhhhh, yes they do.

 

I would like to point out that there was (in that thread posted last year) NO PROOF that AMD acquired a CUDA license, or even needed one, As @SpaceGhostC2C says, you own your own code that you write - this is pretty much universal IP law (With an exception being some employment contracts will take ownership if created during working hours, etc).

 

NVIDIA does not own the code you write, even if that code is in CUDA. They can put it in a contract or TOS all they want - but that contract would be illegal and would be thrown out if challenged.

 

AMD doesn't need a CUDA license to make a code translator, because it's taking the code YOU OWN and translating it into C (whatever version of C is used - C++?) - Patrick claimed in that other thread that AMD got a license, but could never substantiate that claim or back it up with any facts or sources.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

There is a nice example of it btw:

So to keep it simple, if company X is running a program that requires cuda, and wants to go AMD, they can do that now because they can port over the program without any issues. At least if they have the binary code/source code (don't know if that's the same?)

 

Best thing is that if you have the program in c++ code, you can compile it for AMD or nvidia, doesn't matter, that's up to you.

If you want my attention, quote meh! D: or just stick an @samcool55 in your post :3

Spying on everyone to fight against terrorism is like shooting a mosquito with a cannon

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, AlwaysFSX said:

Isn't that illegal without AMD having a license?

Had they reverse engineered without insider knowledge, I'd assume this to be completely legal. 

 

Were this the case, and performance + stability are good, I'd have to start kicking myself a bit for getting a GTX 960. 

My eyes see the past…

My camera lens sees the present…

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Zodiark1593 said:

Had they reverse engineered without insider knowledge, I'd assume this to be completely legal. 

 

Were this the case, and performance + stability are good, I'd have to start kicking myself a bit for getting a GTX 960. 

Honestly you don't even need to reverse engineer anything to make this work. Any competent programmer could take their CUDA source code and port that code over to C++ or whatever. It's just time consuming and manpower intensive, which is why a lot don't bother.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

@dalekphalm and @SpaceGhostC2C, I;m no legal expert, but it still may not be that cut and dry.

 

Although it has been resolved for now, with CUDA being an API it could potentially fall under the same legal category as Oracle vs. Google in whether or not the API itself could be subject to copyright.  Granted the courts have, for now, ruled (with my personal opinion) that it cannot be copyrighted.

Remember even in that case, JVM and Dalvik compile to different bytecode.  The API consists of "expected behavior" and method signatures.  If the decision were overturned (deeming the CUDA API copyright-able) then any third party compiling CUDA specific source code may be guilty of infringement.  The important part here being (as it is an API) the language the developers used to write it, not the compiler or library implementation.

 

To bring it back to the Oracle v Google example: People writing android apps were not liable.  Google was for interpreting the code...


That's far fetched...but worth a moment to consider.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Yamoto42 said:

@dalekphalm and @SpaceGhostC2C, I;m no legal expert, but it still may not be that cut and dry.

 

Although it has been resolved for now, with CUDA being an API it could potentially fall under the same legal category as Oracle vs. Google in whether or not the API itself could be subject to copyright.  Granted the courts have, for now, ruled (with my personal opinion) that it cannot be copyrighted.

Remember even in that case, JVM and Dalvik compile to different bytecode.  The API consists of "expected behavior" and method signatures.  If the decision were overturned (deeming the CUDA API copyright-able) then any third party compiling CUDA specific source code may be guilty of infringement.  The important part here being (as it is an API) the language the developers used to write it, not the compiler or library implementation.

 

To bring it back to the Oracle v Google example: People writing android apps were not liable.  Google was for interpreting the code...


That's far fetched...but worth a moment to consider.

That would be very unlikely - but hey, if you can patent rounded edges (even temporarily), then anything is possible.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, AlwaysFSX said:

Isn't that illegal without AMD having a license?

no. Because AMD isnt the one running or modifying the code. The tool is used by people who already owns the license. All AMD allowed them to do, is to "quickly" rewrite the code they already wrote themselves.

 

unlike Nvidia who tried to make that X86 translator in hardware. And that is something else

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, dalekphalm said:

That would be very unlikely - but hey, if you can patent rounded edges (even temporarily), then anything is possible.

That's why I tried to use an abundance of probabilistic quantifiers, such as "if", "may", and "potentially".


In this case it would probably against Nvidia's best interest to pursue it, even if it had a relatively sound legal foundation.  

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Nicholatian said:

Can someone explain to me what all of the fuss is about? Why does CUDA matter so much when things like OpenCL exist?

For a few reasons:

1. Whether we want to believe it or not, CUDA seems to be a more efficient GPGPU Compute language, which leads into:

2. CUDA is pretty much the "go-to" Compute language, and finally

3. CUDA is exclusive to NVIDIA - and they have not given AMD licenses required to compute CUDA code on AMD hardware

 

So AMD has found a good work around: A code translator that takes raw CUDA source code, and converts that code into raw C++ source code, which can then be compiled into an OpenCL application/service/whatever.

 

AMD hardware doesn't touch or run the CUDA code at all. The AMD translator takes the raw cuda code and turns it into C++ code, which is then compiled and can run on AMD hardware. Since the author of the code is the legal rightful owner of said code, they do not need permission from NVIDIA (or anyone else) to translate their code into other languages.

For Sale: Meraki Bundle

 

iPhone Xr 128 GB Product Red - HP Spectre x360 13" (i5 - 8 GB RAM - 256 GB SSD) - HP ZBook 15v G5 15" (i7-8850H - 16 GB RAM - 512 GB SSD - NVIDIA Quadro P600)

 

Link to comment
Share on other sites

Link to post
Share on other sites

47 minutes ago, dalekphalm said:

They can put it in a contract or TOS all they want - but that contract would be illegal and would be thrown out if challenged

unless you live in South Korea where Terms of Service agreements for code developers are being backed by law :P 

I used to be quite active here.

Link to comment
Share on other sites

Link to post
Share on other sites

22 minutes ago, Yamoto42 said:

@dalekphalm and @SpaceGhostC2C, I;m no legal expert, but it still may not be that cut and dry.

 

Although it has been resolved for now, with CUDA being an API it could potentially fall under the same legal category as Oracle vs. Google in whether or not the API itself could be subject to copyright.  Granted the courts have, for now, ruled (with my personal opinion) that it cannot be copyrighted.

Remember even in that case, JVM and Dalvik compile to different bytecode.  The API consists of "expected behavior" and method signatures.  If the decision were overturned (deeming the CUDA API copyright-able) then any third party compiling CUDA specific source code may be guilty of infringement.  The important part here being (as it is an API) the language the developers used to write it, not the compiler or library implementation.

 

To bring it back to the Oracle v Google example: People writing android apps were not liable.  Google was for interpreting the code...


That's far fetched...but worth a moment to consider.

I really don't know enough either to guess where a judge could draw the line. But a translator is essentially a text replacement tool: it reads text from a (user-made) file, and creates another file with different text. I could create a text that generates a text file by replacing the word "subroutine" for the word "turnip". It would be useless, but possible. I don't think you can prohibit the tool on the basis of whether the resulting file after all he text replacements is usable or not (i.e., it can be compiled in another language).

The way I see it, if that was possible then you could in principle also prohibit winrar or similar from compressing files containing CUDA source code if you so wanted to, since that's also a tool that reads the original file and generates a different, usable file.

Could Tolkien's heirs sue you for making a tool that reads a file in Sindarin and creates a file in English? :P 

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, AlwaysFSX said:

Isn't that illegal without AMD having a license?

No, it's just converting text to different text.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

@SpaceGhostC2C Again, noting my admission that this is unlikely:


With an API being the signature AND behavior...

 

The infringing situation would be:

Developer writes code that calls function X to do action Y with result Z.

Developer runs code through tool chain to create executable program.

Executable program is run and outputs result Z.

 

Agian, although Andriod apps are written in Java, they compile to Dvalik, not Java bytecode.  It is about allowing a developer accomplish a specific task by using a specific phrase with specific inputs.  Note the three times I used the word "specific".

 

About WinRar, no.  It reads the signature, but does not induce the behavior in it's output.  The concept of parsing is a significant note here...especially since it's likely to be far more than just simple renaming.  winrar just sees a byte sequence, a parser acts.

 

Translating Sindarin? ...actually (assuming languages to be copyright-able) yes...but for different reasons.  In this case there is no analogous concept to the "behavior" of a program.  To quantify the behavior of programs you really have to go back to Church and Turing; think of a program as a computational machine, which is a concept human languages lack.

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Yamoto42 said:

 

About WinRar, no.  It reads the signature, but does not induce the behavior in it's output.  The concept of parsing is a significant note here...especially since it's likely to be far more than just simple renaming.  winrar just sees a byte sequence, a parser acts.

 

Translating Sindarin? ...actually (assuming languages to be copyright-able) yes...but for different reasons.  In this case there is no analogous concept to the "behavior" of a program.  To quantify the behavior of programs you really have to go back to Church and Turing; think of a program as a computational machine, which is a concept human languages lack.

But here is where I don't see it. A translator (not a compiler) creates text from text, not function. winrar creates a rar, the translation creates source code, the soruce code does nothing. There is the potential for behavior if you then compile it. That's why I compared it to languages: the behavior would be reading, but the program just creates the English (or C++) text.

All the translator software does is to automate something that you can legally do by hand: as a developer you can open your own (could be someone else's, as long as you have the right to read it) CUDA source code, open another text file, and type code doing the same in a different language. A code that automatically does the syntax substitutions you would manually do still isn't a compiler, and doesn't create executable files from the CUDA source code.

Link to comment
Share on other sites

Link to post
Share on other sites

DISCLAIMER FOR PEOPLE JUST READING THIS POST:  PURELY HYPOTHETICAL SITUATION.

13 minutes ago, SpaceGhostC2C said:

A translator (not a compiler)

That distinction doesn't exist.  A compiler IS a translator...or more specifically (in a typical implementation) multiple translators chained together.  Side note:  compiler design is a pretty fun topic...
 

This becomes a problem of token recognition:  Does a party X have permission to mechanically identify and take a defined action on token Y that leads to result Z.

 

WinRAR makes no effort to identify Y or produce result Z.
A programmer manually re-writing code works towards result Z independently of token Y.

 

But an AUTOMATED translation process depends on token Y and is not only aware of, but actively attempts to [upon detecting Y] lead to result Z...a translator isn't any good if it's output doesn't give the same result.

 

An THAT is the relation to Oracle v Google, can someone own "say Y to do Z".

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Yamoto42 said:

 

That distinction doesn't exist.  A compiler IS a translator...or more specifically (in a typical implementation) multiple translators chained together.  Side note:  compiler design is a pretty fun topic...

I still don't see it. Before we were discussing function, and to me the difference between translating (still source code) and compiling (executable output) is a functional one. A compiler produces output with a different functionality than the source code, while a translation keeps the same functionality.

 

Quote

This becomes a problem of token recognition:  Does a party X have permission to mechanically identify and take a defined action on token Y that leads to result Z.
 
WinRAR makes no effort to identify Y or produce result Z.
A programmer manually re-writing code works towards result Z independently of token Y.
 
But an AUTOMATED translation process depends on token Y and is not only aware of, but actively attempts to [upon detecting Y] lead to result Z...a translator isn't any good if it's output doesn't give the same result.

 

Again, you may be right, but I have problem seeing that: since source code can be saved in a text file, there is a one-to-one mapping between certain bits (as winrar reads) and the lines of code being translated (then you would keep even arbitrary spaces and line breaks). I see the human programmer re-writing the code "independently", but that's just one possible case: the programmer could also mechanically read lines from one file and write corresponding lines in another file.

Imagine the following situation: I start a translation service, telling people they can send me their CUDA code and I'll provide C++ versions. Would it be legal? Would that depend on whether I'm doing it manually or i have automated the process somehow? How much of the process can I automate?

 

And to be clear, I'm not saying you are wrong, because I don't really know what would happen in court, and I take your point that it could end up being grayer than I thought. I just can't think of a law that would lead to it being illegal and that i would agree to at the same time :P 

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, AlwaysFSX said:

Isn't that illegal without AMD having a license?

I doubt AMD would have knowingly done this illegally. That would be both financial and PR suicide for them, they can't be that stupid.

Project White Lightning (My ITX Gaming PC): Core i5-4690K | CRYORIG H5 Ultimate | ASUS Maximus VII Impact | HyperX Savage 2x8GB DDR3 | Samsung 850 EVO 250GB | WD Black 1TB | Sapphire RX 480 8GB NITRO+ OC | Phanteks Enthoo EVOLV ITX | Corsair AX760 | LG 29UM67 | CM Storm Quickfire Ultimate | Logitech G502 Proteus Spectrum | HyperX Cloud II | Logitech Z333

Benchmark Results: 3DMark Firestrike: 10,528 | SteamVR VR Ready (avg. quality 7.1) | VRMark 7,004 (VR Ready)

 

Other systems I've built:

Core i3-6100 | CM Hyper 212 EVO | MSI H110M ECO | Corsair Vengeance LPX 1x8GB DDR4  | ADATA SP550 120GB | Seagate 500GB | EVGA ACX 2.0 GTX 1050 Ti | Fractal Design Core 1500 | Corsair CX450M

Core i5-4590 | Intel Stock Cooler | Gigabyte GA-H97N-WIFI | HyperX Savage 2x4GB DDR3 | Seagate 500GB | Intel Integrated HD Graphics | Fractal Design Arc Mini R2 | be quiet! Pure Power L8 350W

 

I am not a professional. I am not an expert. I am just a smartass. Don't try and blame me if you break something when acting upon my advice.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

...why are you still reading this?

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, Joe_MacDougall said:

They would force NVIDIA to split into two companies which would probably hurt them a lot more. At least in the UK that would happen because of Competition laws.

No it wouldn't. Intel would just buy up Radeon in the fallout.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

40 minutes ago, ThinkWithPortals said:

I doubt AMD would have knowingly done this illegally. That would be both financial and PR suicide for them, they can't be that stupid.

Barcelona and Mullins say hi.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, patrickjp93 said:

No it wouldn't. Intel would just buy up Radeon in the fallout.

True. I mean they are putting Radeon tech in new Intel CPUs apparently.

I had an account called Joegeddon active since April 20th 2015

Desktop

AMD Ryzen 5 2600 | XFX RADEON RX580 8GB XXX | 16GB 3000MHz DDR4 | Thermaltake Versa H22 | Corsair RM550x PSU | MSI AM4 B450M-A PRO Motherboard

1TB 7200RPM HDD | 500GB 7200RPM HDD | 500GB M.2 WD BLUE SSD

 

Laptop - Asus UX303UA

Intel i7 6500U | Intel 530 Graphics | 12GB 1600MHz DDR3 | 256GB SATA 3 SSD

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×