News for hackers. Stuff that matters.
Re:Volta: Advanced Data Center GPU by arca_vorago on Wednesday May 10, 2017 @02:32PM (#14310447)
More great hardware being stuck behind proprietary CUDA when OpenCL is the thing they should be helping with. Once again proprietary lock in that will result in inflexibility and digital blow-back in the long run. Yes I understand OpenCL has some issues and CUDA tends to be a bit easier and less buggy, but that doesn't detract from the principles of my statement.
Re:Volta: Advanced Data Center GPU by nicwilson on Wednesday May 10, 2017 @10:01PM (#14313384)
I am the author of DCompute, a compiler/library/runtime framework for abstracting OpenCL/CUDA for D. You can write kernels already, although the API automation is still a work in progress. I'm hoping that this should level the field a bit, because let's face it, people use CUDA for two reasons: the OpenCL driver API sucks; and the utility libraries (cuDNN et al) for CUDA. Possibly driver quality as well.

By having an API thats not horrible to use, that advantage is gone. The utility libraries will be more of a challenge to undermine, but since it targets CUDA natively there is no disadvantage to users of nvidia's hardware, but there is no advantage to others, yet (see GLAS[1] for what is possible with relative ease). Using D as the kernel language will also bring significant advantages over C/C++, static reflection, sane templates and compile time code generation to name a few.

You can find it at https://github.com/libmir/dcompute.

If you have any question, please ask!

[1] https://github.com/libmir/mir-glas

Re:Volta: Advanced Data Center GPU by slizard on Thursday May 11, 2017 @10:35AM (#14316296)
^ This!

Please read this before moving on: https://twitter.com/jrprice89/status/667466444355993600

Also, NVIDIA's CUDA compilers are built on clang which does have OpenCL frontend, so all they would need to do is to put some resources into making that frontend work with their current nvcc toolchain.

Many request and want this, but instead they are trying hard to hold back OpenCL just because providing OpenCL 2.0 support (and extensions for their GPUs features) may help adoption of OpenCL which in turn may end up helping other folks and companies too.

Re:Volta: Advanced Data Center GPU by MichaelBurge on Wednesday May 10, 2017 @02:37PM (#14310487)
Nobody else is even bothering to compete, so standards don't really matter. Let them do their job: I'd rather have faster GPUs.
Re:Volta: Advanced Data Center GPU by tanderson92 on Wednesday May 10, 2017 @02:44PM (#14310553)
Standards matter if you care about software and hardware freedom.
Re:Volta: Advanced Data Center GPU by nightski on Wednesday May 10, 2017 @03:06PM (#14310733)
You really don't have freedom if there are no legitimate competitors.
Re:Volta: Advanced Data Center GPU by throw2016 on Wednesday May 10, 2017 @06:49PM (#14312445)
But accepting a monopoly standard guarantees loss of freedom and rules out any future prospect of legitimate competition.
Re:Volta: Advanced Data Center GPU by zurn on Thursday May 11, 2017 @10:12AM (#14316110)
Successful open systems tend to have standards that "just happened", not prescriptive standards. Like x86 PCs or Linux or most programming languages.

Cuda seems to be clearly winning over OpenCL in the real world so other vendors should just adopt it. AMD already has a CUDA compiler IIRC.

Re:Volta: Advanced Data Center GPU by slizard on Thursday May 11, 2017 @10:23AM (#14316208)
The point where you suggested that x86 PCs are "open systems" (listing it next to "Linux" of all things!) I realized that you don't get it. We are where we are with Intel ripping off the consumers and companies alike exactly because nobody realized that x86 is everything but open.

A similar mistake is about to happen, but luckily on the software side where losses can be cut quick and mistakes can be reversed easier -- though many will suffer when they have to reimplement their precious library from ground up because they did (or could) not take into account the fact that CUDA is as proprietary as it gets.

AMD has no CUDA compiler BTW. And CUDA is not a programming language FYI. ;)

Re:Volta: Advanced Data Center GPU by zurn on Thursday May 11, 2017 @10:40AM (#14316338)
I'm pretty sure I referred to open systems and CUDA in their commonly understood meanings. Here are some links that may help to clarify the concepts:

http://www.pcmag.com/encyclopedia/term/48478/open-system

http://www.anandtech.com/show/9792/amd-sc15-boltzmann-initia...

Aside: I have no position on whether is CUDA's Fortran and C++ dialects constitute their own languages, nor did I refer to CUDA as a programming language.

Re:Volta: Advanced Data Center GPU by slizard on Thursday May 11, 2017 @11:23AM (#14316690)
> http://www.pcmag.com/encyclopedia/term/48478/open-system

Sadly, that's a very problematic, borderline BS definition.

"A system that allows third parties to make products that plug into or interoperate with it. For example, the PC is an open system."

Intel allows some third parties to interoperate with their system (ref Intel vs NVIDIA etc.) and they pick and choose to their liking, kill some and promote others exactly because they control the open-ness of their systems.

> http://www.anandtech.com/show/9792/amd-sc15-boltzmann-initia...

HIP is still not a CUDA compiler. http://gpuopen.com/compute-product/hip-convert-cuda-to-porta...

> nor did I refer to CUDA as a programming language.

You did refer to "CUDA compiler". My comment was admittedly a nitpick as well as a serious point too. CUDA can be seen as a C++ language + extensions -- something you can compile --, but it's also more than that (stuff that you can't compile), e.g.: API, programming tools, etc. all strongly adapted for NVIDIA hardware.

Re:Volta: Advanced Data Center GPU by dr_zoidberg on Thursday May 11, 2017 @11:49AM (#14316951)
That article doesn't say AMD wanted to support CUDA, they wanted to give tools to migrate to HCC ("AMD's CUDA").
Re:Volta: Advanced Data Center GPU by slizard on Friday May 12, 2017 @07:08AM (#14322924)
That would be one way, but what's commendable is that they went further and HIP is actually also a common thin API on top of CUDA and their own platform. They could've just stopped at converting code, but they did not -- and that's something that might save them and give people enough incentive to support their products. You can keep your NVIDIA path that'll be compiled with the nvcc backend and target both platforms with the nearly the same code, especially on host (and often also device side).
Re:Volta: Advanced Data Center GPU by slizard on Thursday May 11, 2017 @10:26AM (#14316230)
I don't wish you the suffering vendor lock-in can cause after 10 years (hell, even less) of faithfully following the NVIDIA path, but... actually I do because that probably the best way to realize what's wrong with proprietary systems that pitch themselves as "de-facto" standards.
Re:Volta: Advanced Data Center GPU by paulsutter on Wednesday May 10, 2017 @06:23PM (#14312288)
Build your systems around GEMM/blas. Every vendor will give you a fast GEMM, and you'll be set for basically all the architectures that are coming out.
Re:Volta: Advanced Data Center GPU by arcanus on Wednesday May 10, 2017 @08:09PM (#14312881)
Except that not all problems in computation are GEMMs. CNNs in Machine learning certainly are, but many 'real' systems cannot be posted in such a manner.

In supercomputing this is the problem with using high performance linpack for benchmarks, which typically exceeds actual scientific codes by an order of magnitude in terms of floating point operations per second.

Re:Volta: Advanced Data Center GPU by paulsutter on Wednesday May 10, 2017 @08:12PM (#14312903)
Yes but to the extent you can, it's an easy win. I switched to a GEMMable method for a preprocessing step today based on the Volta and recent TPU news.

Hopefully Tensorflow XLA or other optimization frameworks could solve this problem in a more general way in the medium term:

http://www.kdnuggets.com/2017/04/deep-learning-virtual-machi...

Re:Volta: Advanced Data Center GPU by ahelwer on Wednesday May 10, 2017 @03:00PM (#14310688)
I thought NVIDIA GPUs support OpenCL? Or do they not do that anymore?
Re:Volta: Advanced Data Center GPU by eslaught on Wednesday May 10, 2017 @03:11PM (#14310776)
It's always been 10-20% slower than CUDA and frankly NVIDIA doesn't have an incentive to make it faster than that.

On the other hand, I believe Google is working on a CUDA compiler [1] so we may actually see meaningful improvement in the sense that it may become possible to run CUDA on other GPUs. (Edit: And Google actually has an incentive to achieve performance parity, so it might really happen.)

[1]: https://research.google.com/pubs/pub45226.html

Re:Volta: Advanced Data Center GPU by jlebar on Wednesday May 10, 2017 @06:23PM (#14312282)
> On the other hand, I believe Google is working on a CUDA compiler [1]

Hi, I'm one of the developers of the open-source CUDA compiler.

It's not actually a separate compiler, despite what that paper says. It's just plain, vanilla, open-source clang. Download or build the latest version of clang, give it a CUDA file, and away you go. That's all there is to it.

In terms of compiling CUDA on other GPUs, that's not something I've worked on, but judging from the commits going by to clang and LLVM, other people are quite interested in making this work.

Re:Volta: Advanced Data Center GPU by qb45 on Wednesday May 10, 2017 @03:28PM (#14310907)
Interesting, appears to have been merged upstream:

http://llvm.org/docs/CompileCudaWithLLVM.html

But it still targets NVIDIA GPUs and uses NVIDIA libraries so not that universal yet.

Re:Volta: Advanced Data Center GPU by mrb on Wednesday May 10, 2017 @03:50PM (#14311051)
"It's always been 10-20% slower than CUDA"

This is an untrue, yet often repeated statement. For example Hashcat migrated their CUDA code to OpenCL some time ago, with zero performance hits. What is true is that Nvidia's OpenCL stack is less mature than CUDA. But you can write OpenCL code that performs just as well as CUDA.

Re:Volta: Advanced Data Center GPU by nl on Wednesday May 10, 2017 @06:18PM (#14312254)
It has historically been slower for neural networks, especially considering the lack of a CuDNN equivalent.
Re:Volta: Advanced Data Center GPU by slizard on Thursday May 11, 2017 @10:29AM (#14316254)
Also the opposite can be true as well (>2x slower); e.g try to rely heavily on shuffle.
Re:Volta: Advanced Data Center GPU by chronic940 on Wednesday May 10, 2017 @04:11PM (#14311207)
What is Hashcat and why should we care?
Re:Volta: Advanced Data Center GPU by khedoros1 on Wednesday May 10, 2017 @04:29PM (#14311369)
A password cracking utility, and because it was put forth as at least one example of a real-world application purported to perform just as well under OpenCL as CUDA. If true, it provides evidence against the claim "[OpenCL]'s always been 10-20% slower than CUDA".
Re:Volta: Advanced Data Center GPU by PetahNZ on Wednesday May 10, 2017 @04:24PM (#14311316)
Because its a performance critical application that has made the switch so is a good comparison.
Re:Volta: Advanced Data Center GPU by DannyBee on Wednesday May 10, 2017 @04:04PM (#14311150)
As someone said, we already merged it upstream. :)

Nowadays our CUDA compiler is just clang

Re:Volta: Advanced Data Center GPU by agumonkey on Wednesday May 10, 2017 @05:48PM (#14312034)
10-20% slower seems an honest delta, I can't blame a company for working more on their desires/ideas if they provide a standardized non crippled solution.
Re:Volta: Advanced Data Center GPU by slizard on Thursday May 11, 2017 @10:27AM (#14316244)
> It's always been 10-20% slower than CUDA and frankly NVIDIA doesn't have an incentive to make it faster than that.

Incorrect. Our kernels (GROMACS molecular simulation package) are 2-3x slower implemented in OpenCL vs CUDA.

> On the other hand, I believe Google is working on a CUDA compiler

They were. It's upstream clang by now.

Re:Volta: Advanced Data Center GPU by hawski on Thursday May 11, 2017 @04:43AM (#14314656)
Can Vulkan fill that space?
Re:Volta: Advanced Data Center GPU by nicwilson on Thursday May 11, 2017 @05:42AM (#14314856)
Nvidia will have to support the SPIR-V Vulkan environment that is different to the OpenCL SPIR-V environment. But Vulkan is a graphics API not a compute API. Yes in theory you can write compute shaders but from my experience if you have a compute workload: use a compute API, they're much more suited for the job.

So, no.