4 ms·
This is also on upstream projects not to lock themselves into CUDA. Yes, it's great, but everyone suffers when there's only one supported API. Even more so when
by duaneb 10y ago
This is also on upstream projects not to lock themselves into CUDA. Yes, it's great, but everyone suffers when there's only one supported API. Even more so when it's closed and locked to a specific vendor, as CUDA is.
- joe_the_user 10y agoI'd love an alternative to CUDA. The problem is that as far as I can see, OpenCL is in no way that. Basically, OpenCL gives me the impression that the oceans of boiler plate required both make development hard and effectively locks you into a specific vendor also since the boiler-plate is going to be setting things up for one's specific vendor.
- pjmlp 10y agoOnly with OpenCL 2.x have they came around and started to support C++ for writing kernels, as well as, a standard bytecode for any other language to target. Which most vendors still don't support. Whereas CUDA supported C++ and Fortran from day 1, with the PTX support added a few versions later. Also the debugging tools, from the presentations I have seen, are much more developer friendly on CUDA. Of course developers rather use APIs that offer more modern experiences than ones still stuck in pure C, with a compiler at the driver level, forcing each programmer to writer the boilerplate to compile and link. Now it might already be too late for OpenCL in spite of the latest improvements.
- marmaduke 10y agoNope. I have some substantial simulation code written against OpenCL that runs on Intel OpenCL and NVIDIA without modifications, and rather performant on both of them. The only part of the code specific to vendor is the platform selection, which is one line of code. OpenCL falls down in terms of standard libraries such as cu{dnn,sparse,blas} but if you're writing everything from scratch it's fine.
- dagss 10y agoInteresting...so do you use the vector subset designed for CPUs or the wavefront subset designed for GPUs?
- marmaduke 10y agoI write code which maximizes coalesced memory access and plain old 32 bit floats.. nothing special. The respective drivers do a good job of mapping that onto the hardware given sufficient work group sizes.
- joe_the_user 10y agoI'm an independent developer in the process of choosing a GPGPU library. I can see simple, comprehensible 20-50 sample code for cuda that does most simple tasks. With OpenCL, I get references to version, boiler-plate, mode with nothing that boils down to simple code. If you have a simple sample, you should post it here or blog about it.
- duaneb 10y agoBoilerplate is one thing—this is what transpilers are for, among other solutions—but can OpenCL match CUDA on a performance level?
- marmaduke 10y agoCl is comparable to Cuda where the cuda code doesn't employ nvidia specific primitives.
- marmaduke 10y agoLook at Pyopencl; it makes it quite easy to prototype OpenCL apps in tens of lines of code. Later, it's straightforward to port to c or c++ if that's your thing, though I find having numpy et al handy even in production code
- visarga 10y agoCan anyone tell me what exactly is missing from OpenCL to be able to run the primitives of deep learning frameworks? Like, does it not have some kind of operation that is essential for matrix manipulation?
- pjmlp 10y agoUp to OpenCL 2.1 was support for C++ and Fortran, forcing everyone to either use C or generate C code from their compilers.
- cma 10y agoCan companies that don't have agreements/court rulings with Intel implement Xeon Phi ISAs?
- rbanffy 10y agoI think it's fair to assume any significant HPC solution will have to be recompiled to target its runtime environment. Squeezing out every GFLOPS of a part is normal when you get an expensive specialized computer. In that context, x86 compatibility is less of an issue than the quality of the compilers. As long as you are easier to program than a GPU, you are good.
- stonogo 10y agoI wish this were true, but it's not. Multi-million-dollar contracts have been scuttled because a given customer runs codes that they receive as binaries from a vendor, closed-source, and Company A bid Processor X, but the codes only run on Processor Y...
- rbanffy 10y agoThat's interesting. I'd assume a market so performance driven would compete such vendors out of existence.
- stonogo 10y agoThe market is performance-driven because it is task-driven. Performance as a requirement, in other words, is a byproduct of the mission. If your task requires software that someone else holds the keys to, you have no choice but to mold the rest of your environment to fit that software. Thankfully this sort of situation is becoming less common over time, but we're not all the way done yet.
- rbanffy 10y agoIt's a big relief to know my assumptions will, eventually, be true... :-)