Hacker News new | ask | show | jobs
by usmeteora 3354 days ago
not to mention SPIR-V integrates OpenGL with Vulkan and and for OpenCL, moving towards a broader range of language support outside of mere wrappers including but not limited to even Javascript.

Since SPIR-V allows you to effectively define your own Shader APIs, and OpenCL has more and more bindings with other platforms, including ones that support the web like Go, Javascript and a new support layer for WebGL, it is absolutely a game (no pun intended) for Nvidia to lose in the longrun.

When has a monopoly never not been caught frantically trying to buy out knockoff companies that spawned from teams developing on opensrouce alternatives in innovative places after they became comfortable and confident with being a closed source monopoly?

On top of this, graphics programmers, the games industry and advanced web support, especially now that AWS and I think google cloud integrate server hosting with GPUs (and companies like Blazing DB for easier integration) will only exponeniate the rate of advantage opensource has since this is a race with some of the best programmers in the world, with a ton of money behind it.

I am curious what NVIDIAS end game is here. Already they were trailing behind the after party with their releases post AMD Ryzen, and I havn't heard anything at all exciting on NVIDIAs part to counter since the Vulkan release and SPIR-V integration announcements, which are some of the most promising I've seen yet, and expansive for programmers who have otherwise avoided this platform due to the extremely indepth learning curve and requirements to be somewhat experienced C/C++ programmers.

It took me 8months to be able to write a good kernel and some good host code with opencl because I did the entire integration in C and C++ and I've been developing with it since 1.2, but with more languages a broader range of support applications, perspectives and contributions will go to the opensource dev.

So far, outside of currently dominating the industry and embedding some long term runway with large contracts and having a head on red tape involved with larger corporations they have contracts for hardware and support embedded with, I don't see what advantages NVIDIA is getting the industry excited about in the long run.

When it comes to savvy programmers in Silicon Valley, a friend of mine who works as a PhD programmer in Deep Learning with Google Scientists did an unofficial ad hoc poll on her twitter, asking people why so much opencl hate and so much CUDA in the valley? There were lots of responses from lots of people, but I only saw on repeated reason over and over again, the initial learning curve is lower with CUDA and its more convenient. There were no specs of performance advantages in discussion.

In the functionalities I apply OpenCL to, CUDA doesn't even offer the same functionality, and in many ways processes algorithms by simply parsing out algorithms CPUs utilized, but OpenCL never assumed this as an optimal path, and reconsiders the entire structure of the algorithm and data its working with, often times reorganizing formats for processing entirely different from CPUs that NVIDIA incorporates as a default.

It's more work to learn than CUDA, but the advantages are worth it in my experience so far.

As a last consideration, When it comes to NVIDIA trying to make their products compatible with OpenCL and OpenGL, I predict that promise of that to be delayed at best, as it took NVIDIA 5 years to make their hardware std OpenCl 1.2 compatible. Vulkan is extremely large in terms of the source code, and SPIR-V is nontrivial, OpenCL is standard 2.0 now, so if getting OpenCL 1.2 was hard for them to integrate in under 5 years, we can expect a lot longer given the new releases.

The learning curve is now going away with the recent releases, so whats the next step with NVIDIA? Good question. The only advantage they seem to have is that they have an advantage right now, but that becomes circular and perhaps backwards going forward.

This strangely reminds me of Microsoft getting ubuntu to run in a Windows partition checksum for checksum, to offer cross compatibility with other operating systems as an advantage to stay competitive in the demographic that produces the most advancement within their own industry.

2 comments

OpenCL is being hampered by past perceptions. I think it's absurdly underrated. The newer OpenCL is as easy to get into (with eg. the Intel SDK), conceptually easier (compiler is in memory, one way to do things instead of two APIs) and opens a broad range of hardware.
> In the functionalities I apply OpenCL to, CUDA doesn't even offer the same functionality, and in many ways processes algorithms by simply parsing out algorithms CPUs utilized, but OpenCL never assumed this as an optimal path, and reconsiders the entire structure of the algorithm and data its working with, often times reorganizing formats for processing entirely different from CPUs that NVIDIA incorporates as a default.

Can you explain what you mean? Reads like gibberish.

Sure sorry for the delay. With Sparse Matrices, CUDA utilizes the same compressed CSR txt format, and compression form on its chip, that CPUs do. They use the same compression format, but NVIDIA takes some of the parsed squares and just parallelizes the computation on GPUs and saves the zero values in memory to throw in at the end of the computation, which is still a fine way to do the computation, and utilizing GPU performance over CPU performance, but it never redesigned the CSR compression intake format.

OpenCL does something similiar with the null values, but redesigns the entire compression format reading in matrix data and the entire computation of accessing the tiles of data differently based on the format they have for parsing and accessing the data.

I am trying to find a good explanation online, but I can only find what I have in the OpenCL 1.2 Book Chapter 22 on SPMV, where they visualize and explain CUDAs format, and then OpenCLs format, and provide performance comparisons between the two methods using the standard 22 matrix sets provided by the University of Florida.

OpenCLs performance was better on every metric, the smallest increase in performance cutting computation time by one half, the rest were closer to a third. They ran their own CUDA testing, but also provide the whitepaper results from CUDAs testing, and use NVIDIAs reported results as their official comparison.

For an influx of repetitive real time data reading in millions of data points every few seconds, this kind of advantage is not of a negligible significance.

It took a long time to work with but of course now I can reap the benefits every few seconds on large datasets forever so I found it worth diving into the performance specs on this case.

While I cant find an online visual of the designs for CUDA vs OpenCL explained in CH22, the source code for the std SPMV I speak of here is on one of the authors github: "bgaster" is the username. You should be able to download the code working cross platform and read in matrices of your choice, and compare performance on your own if you have datasets you want to look at.

The OpenCL book I highly recommend. It explains how to use opencl and provides comprehensive examples, walking through concepts with code for 22 chapters. The source code for that book is there with the rest of bgasters stuff. It's definitely not a trivial language to take on. The learning curve is steep. However, I learned GPUs through OpenCL, so I don't know if it would be easier coming from CUDA, biases about what to expect because the learner is already reaping the benefits of CUDA aside.

I took time initially to read through the entire 1.2 openCL API over a couple of weeks. It's one of the most comprehensive and detailed API's I've ever read and I find myself dissapointed with documentation of other groups in comparison. Once you are familiar with the scope of functionality available to you, I typically keep the PDF API open and search F for concepts and find whats available to me as I code through things. The most recent API is just as good and can be found here:https://www.khronos.org/registry/OpenCL/specs/opencl-2.2.pdf

Also, one of the authors of OpenCL works fulltime at Apple now, and opencl comes installed and simply working on any OSX operating system. So if you happen to have a mac, it should be relatively easy to download some working source code and try out.

I have OSX, and was also able to download an SDK for my NVIDIA graphics card on an asus zenbook running fedora 24, and got it up and running just fine in an hour or so, for total install and testing.