Reply
 
Thread Tools Display Modes
  #1  
Old 02-12-2020, 06:45 PM
MaverocK is offline
Guest
 
Join Date: Dec 2013
Posts: 211

CUDA and CUDA compiler (proprietary vs open-source)


I came across interesting information in a professor's lecture slides. Some information on them got me confused:

1.) In one of his slides, it says: "CUDA has an open-sourced CUDA compiler": https://i.imgur.com/m8UW0lO.png
2.) In one of the next slides, it says: "CUDA is Nvidia's proprietary technology that targets Nvidia devices only": https://i.imgur.com/z7ipon2.png

AFAIK, if something is open source, it cannot be proprietary as only the original owner(s) of the software are legally allowed to inspect and modify the source code.

So, the way that I understand it is that the technology CUDA itself is proprietary but the compiler is open source. How does this work? I don't understand exactly how the technology can be proprietary while the compiler can be open source. Isn't that self-contradictory?

Last edited by MaverocK; 02-12-2020 at 06:45 PM.
  #2  
Old 02-12-2020, 10:38 PM
Heracles's Avatar
Heracles is offline
Member
 
Join Date: Jul 2009
Location: Southern Québec, Canada
Posts: 1,696
In my ordinary Lenovo desktop PC, the Intel Core i5 microprocessor is Intel's proprietary technology. However, the hardware interfaces, the processor's instruction set and timing are documented by Intel, so that people can actually use the chip to build computers and operating systems. The same goes for other components of the PC: memory, disk controllers, video chips, etc. So it's possible to design an open-source compiler, such as gcc, to compile programs for the Core i5, and to create an open-source kernel, such as Linux, to run on this microprocessor, and build an entire open-source operating system around this kernel.

This doesn't mean that the microcode running inside the Core i5 is publicly documented: it isn't. We only found out a couple of years ago that there was a version of MINIX running inside the processor, fer cryin' out loud.

For CUDA, nVidia has intellectual property (patents) that it can use to legally prevent any other manufacturer from making hardware that behaves exactly like a CUDA chip; so CUDA itself is proprietary. The plans for the CUDA hardware are not made public. However, like Intel, nVidia wants people to use its amazing chips, so it publishes documentation and libraries that programmers can use to target CUDA, and has also chosen to contribute some source code to the LLVM compiler project so that people can more easily write programs that target the CUDA hardware. So there is an open-source compiler for CUDA, but CUDA itself remains the property of nVidia.

Last edited by Heracles; 02-12-2020 at 10:41 PM.
  #3  
Old 02-12-2020, 10:41 PM
si_blakely is offline
Guest
 
Join Date: Jul 2002
Location: not UK anymore
Posts: 4,996
Quote:
Originally Posted by MaverocK View Post
So, the way that I understand it is that the technology CUDA itself is proprietary but the compiler is open source. How does this work? I don't understand exactly how the technology can be proprietary while the compiler can be open source. Isn't that self-contradictory?
This is the correct understanding.

CUDA defines a public interface (or instruction set) that the compiler targets - the implementation in hardware is still proprietary, but as long as the compiler targets that public interface, it can be as open-source as it likes.

In another space, Intel's implementation of the x86 instruction set is proprietary. But gcc is open source - it just uses the public instruction set documentation and some hard-won knowledge about what actually works to compile code.
__________________
Simon
  #4  
Old 02-13-2020, 10:50 PM
MaverocK is offline
Guest
 
Join Date: Dec 2013
Posts: 211
Thank you very much for the answers. I just learnt that CUDA is compiled in two steps: first CUDA code to PTX, then PTX to ptxas. The first is open sourced process, and the second is closed because it is targeted at specific hardware. This second compiler is part of the GPU driver.
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:07 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.

Send questions for Cecil Adams to: cecil@straightdope.com

Send comments about this website to: webmaster@straightdope.com

Terms of Use / Privacy Policy

Advertise on the Straight Dope!
(Your direct line to thousands of the smartest, hippest people on the planet, plus a few total dipsticks.)

Copyright © 2019 STM Reader, LLC.

 
Copyright © 2017