Last week I wrote about OpenACC 2.0 being worked on for GCC
complete with NVIDIA GPU acceleration support. While it's quite exciting on the surface and great to see the open-source compilers supporting more parallel programming standards, underneath it's not necessarily a bright story. Here's an update.
After that story last week of Mentor Graphics working on the OpenACC 2.0 support for the GNU Compiler Collection in cooperation with NVIDIA and Oak Ridge National Labs, there was a Phoronix story of how NVIDIA and Mentor could harm GCC
. The information in that article was from a trusted source on compilers.
Nathan Sidwell of Code Sourcery (owned by Mentor Graphics and frequently working on GCC) issued a statement
last night on the matter of OpenACC in GCC:
There seems to have been some confusion about the OpenACC development that we're currently engaged in. I thought I'd write here to clarify some things.
As Thomas previously announced, we're working on an implementation of OpenACC 2.0 for x86-64/Linux host systems and PTX accelerator devices. OpenACC is specified at http://www.openacc-standard.org/. There are several proprietary implementations of OpenACC targeting a variety of accelerator devices. This is an opportunity to make OpenACC available in a free software compiler.
For this development the accelerated code will be PTX -- one has to start somewhere. PTX is an ISA for a virtual machine. Its specification is public and available at http://docs.nvidia.com/cuda/parallel-thread-execution/index.html. To get PTX code executed on a compute device (currently) requires use of Nvidia's driver library. That library is available for zero cost and its API is documented at http://docs.nvidia.com/cuda/cuda-driver-api/index.html. Although all those links contain the name 'cuda', don't be misled by that -- it's an accident of history.
Nothing in this project is preventing others from working on OpenACC support for different accelerator devices. Neither will anyone be forced to build OpenACC support -- as with OpenMP, there will be a configuration option allowing one to configure a compiler without it.
Targeting PTX, an ISA for use with a single manufacturer's devices, is not different from targeting the other single-manufacturer ISAs that GCC already supports. It is, of course, a steering committee decision as to whether a new backend is acceptable once it meets technical review.
GCC supports systems with proprietary runtimes. Historically GCC had to work with proprietary C libraries -- for instance, I started in GCC development using a sparc-solaris system. Now that Linux has become so prevalent, and its C library is glibc, there's the opportunity to build GCC with and for free software libraries. However, that in itself, hasn't caused any of the non-free host or target OS support to be removed. Nor should it, IMHO, prevent GCC from adding support for systems that have proprietary components (IIUC some CPUs rely on an opaque blob of microcode in order to function).
As many of you will know, CodeSourcery, which Mentor purchased a few years ago, has been contributing to GCC and other GNU projects for over 15 years. Several Sourcerers are maintainers of particular pieces of the GNU project (mainly toolchain components).
For those curious about what my confidential source had to say in response to this message, he wrote:
You're taking a piece of open source software and targeting a proprietary byte-code which also depends entirely on closed source software. This benefits nobody but NVIDIA. You may come across naive, but you and I both know ptxas and everything underneath is closed source.
Many proprietary and closed source solutions do have publicly available interfaces - This is no service to the community - it's simply the way NVIDIA has exposed their proprietary technology. AMD has pushed HSA and HSA IL as a standard and encouraged others to implement it. *That* is an example of something good and open - PTX is the exact opposite
It's not an accident - PTX targets and is limited to *NVIDIA* cuda capable devices.
Who are you kidding? You're getting paid to do this work by NVIDIA - If it was so great for the community someone would have volunteered a long time ago. PTX isn't an ISA - it's a byte-code.. Your statement above is slightly misleading. What's more is a libc runtime and the link time exception you refer to is all POSIX. (An open standard) Ironically the libc in solaris is now mostly open source.
You're trying to compare a minor runtime license exception with a fully encumbered target on top of a pseudo standard?
OpenACC started out as invite only
OpenACC has no representation from IBM, AMD, Intel or other significant HPC semiconductor companies
OpenACC is NVIDIA's show and their way to bypass waiting on OpenMP 4 to actually do what they want.
OpenACC is pay-to-play.
OpenACC validate testsuite is closed and private
What about OpenACC is really open? Their poorly documented attempt to define what the pragmas should do?
Here's the point - At which point should the community say no.
1) ptxas and nvidia runtimes are not freely redistributable
2) they are closed source
3) ptx only benefits nvidia
Should gcc just suck in every press release announcement? Who gave gcc community legal advice on this?
I expected the gcc community to maintain a certain threshold of ethics here. Give me 1 good reason why an open source compiler should allow itself to be sold to the most closed source backends anyway.
1) What's underneath PTX isn't publicly documented at all - it's closed
2) NVIDIA driver is all closed
3) NVIDIA's runtimes are closed
Just because Mentor graphics sold out - someone in the gcc community should have the guts to stand up and point out the problems with what's going on here..
Well, there's the views on OpenACC support in GCC from the two extremes. My own personal view is rather neutral in that it would be nice if this was a non-issue with an open-source NVIDIA driver at least supporting PTX if not other hardware, but that's not the case, and at least there's some commercial investment going into open-source compilers. When OpenACC patches come to GCC, I will happily benchmark them and I am a happy user of NVIDIA's binary drivers because they are simply the best right now for features, performance, and reliability. The open-source Linux GPU drivers from Intel, AMD, and NVIDIA are all behind their proprietary/Windows competition in key areas. For the binary driver out of AMD, Catalyst on Linux still has big problems like as shown in my AMD R9 290 review
. NVIDIA's Linux driver is closed-source, but it's simply the best right now for those who want features/performance/reliability and are willing to pardon it for not being open-source.