3 ms·
AMD's ROCm 4.0 now supports cooperative groups, which is probably one of the last major holdouts for CUDA compatibility. There's still the 64-wavefront (for AM
by dragontamer 5y ago
AMD's ROCm 4.0 now supports cooperative groups, which is probably one of the last major holdouts for CUDA compatibility.
There's still the 64-wavefront (for AMD CDNA cards) instead of 32-wavefronts (for CUDA). But AMD even has 4x4 half-float matrix multiplication instructions in ROCm (for MI100, the only card that supports the matrix-multiplication / tensor instructions)
---------
I think CUDA vs OpenCL is over. ROCm from AMD has its restrictions, but... it really is easier to program than OpenCL. Its a superior model: having a single language that supports both CPU and GPU code is just easier than switching between C++ and OpenCL (where data-structures can't be shared as easily).
-----------
The main issue with AMD is that they're cutting support for their older cards. The cheapest card you can get that supports ROCm is Vega56 now... otherwise you're basically expected to go for the expensive MI-line (MI50, MI100).
- zozbot234 5y agoThe new contest is not CUDA vs. OpenCL but CUDA vs. Vulkan Compute. As support for Vulkan in hardware becomes more widespread, it makes more and more sense to just standardize on it for all workloads. The programming model is quite different between the two (kernels vs. shaders) and OpenCL 2.x has quite a few features that are not in Vulkan, but the latest version of OpenCL has downgraded many of these to extensions.
- dragontamer 5y agoCUDA programmers choose CUDA because when you make a struct FooBar{}; in CUDA, it works on both CPU-side and GPU-side. Vulkan / OpenCL / etc. etc. don't have any data-structure sharing like that with the host code. Its a point of contention that makes anything more complicated than a 3-dimensional array hard to share. Yeah, Vulkan / OpenCL have all sorts of pointer-sharing arrangements (Shared Virtual Memory) or whatnot. But its difficult to use in practice, because they keep the concepts of "GPU" code separate from "CPU" code. --------- When you look at these things: such as Triton, you see that people want to unify the CPU-and-GPU code into a single code base. Look and read these Triton examples: they're just Python code, inside of the rest of CPU-Python code. I think people are realizing that high-level code can flow between the two execution units (CPU or GPU) without changing the high level language. The compiler works hard to generate code for both systems, but its better for the compiler to work rather than the programmer to work on integration.
- enos_feedler 5y agoIs it practical for code to flow between these two execution units? In my understanding, the architecture of a GPU and CPU are so fundamentally different that it doesn’t reallly make sense. You do want to have a single data structure representation however.
- dragontamer 5y ago> In my understanding, the architecture of a GPU and CPU are so fundamentally different that it doesn’t reallly make sense. Yes and no. You find surprising bits of code that can be shared. Read through a high-performance GPU project like "GPU perft" (https://github.com/ankan-ban/perft_gpu/blob/master/chess.h https://github.com/ankan-ban/perft_gpu/blob/master/chess.h). The "perft" problem is the problem of counting the number of board positions reachable in X moves. (Perft(15) is "how many board positions exist within 15 moves from the start of chess?". Perft(1) is 20, and Perft(2) is 400, then 3+ gets a bit complicated!). You can see that the fundamentals of bitboard manipulation (using the 64-bit number to represent the 64-squares of a chessboard) remain the same whether or not you're on a CPU or GPU. In this case, you want the code to be shared between the two sides. Why write the code twice? Both CPUs and GPUs are very good at 64-bit integer manipulation. ------------ The actual search (how to branch off, coalesce results, coordinate threads) is extremely different between CPU and GPU. So of course, you want that code to be written in a CPU-specific, or GPU-specific manner. But the question of "where can this Bishop move??" (the sliding piece attack subroutine) is identical on CPU or GPU.
- enos_feedler 5y agoSounds similar to business logic shared between and client and server web app. Thanks I just wonder if this alone is enough to make a unified programming environment the preferred way. On the web we had Meteor.js which tried this approach to unify client and server with javascript. The shared code was of similar types. Meteor never became the preferred way to write web apps. Im wondering if the same is true for GPU + CPU programming.
- pjmlp 5y agoGiven the state of Vulkan tooling the contest is already won, NVidia doesn't need to worry about anything.
- meragrin_ 5y ago> The main issue with AMD is that they're cutting support for their older cards. No, their main issue is not properly supporting ROCm in general. No Windows support at all? It still feels like they don't know whether they want to continue investing in ROCm long term.
- dragontamer 5y agoI'd assume that they're gonna support ROCm as long as the Frontier deployment at Oak Ridge National Labs is up. ORNLs isn't exactly a customer you want to piss off.
- N1H1L 5y agoYes. I am hopeful Frontier will shake things up.
- einpoklum 5y ago> ROCm from AMD has its restrictions, but... it really is easier to program than OpenCL That really not the point. OpenCL is a standard that - at least in principle - is supposed to be supported on multiple platforms by multiple vendors. ROCm is AMD-only, and even that is questionable since it didn't exist 6 or 7 years ago, and who knows - they might drop it like they changed their earlier focus. Also, CUDA has a much richer ecosystem than AMD ROCm (I'm sad to say; as I'm not a fan of NVIDIA).
- my123 5y agoReminder that ROCm is still not supported on RDNA and RDNA2.
- dragontamer 5y ago> OpenCL is a standard that - at least in principle - is supposed to be supported on multiple platforms by multiple vendors. As was C++AMP (which was actually pretty good IMO as a language). Just because its a standard doesn't mean its going to be used. OpenCL 2.0 was very poorly implemented: almost no one used any of its advanced features. To the point that OpenCL 3.0 is resetting from OpenCL 1.2. Only Intel really supported OpenCL 2.1 or OpenCL 2.2. The entire OpenCL 2.x branch for years was squandered with tepid responses from NVidia and AMD (yes, AMD had better OpenCL 2.0 support. But it's debugger didn't work, all of the code was tested on OpenCL 1.2 only. No one cared) I dare say that OpenCL 2.x was about as "standardized" and respected as C++ AMP. Just because its an open standard doesn't mean that its actually useful. Any serious OpenCL programmer stuck with OpenCL 1.2, including both AMD and NVidia OpenCL programmers.
- einpoklum 5y agoPretty much agree; and I'll add NVIDIA has also made it a point not to support profiling (and probably debugging) OpenCL... to this day. Still, that doesn't contradict what I said in my earlier post. There was also OpenCL C++, which I really wanted to see implemented by GPU vendors, especially NVIDIA, and that didn't happen either. As for C++AMP - did that ever work on NVIDIA hardware?
- Athas 5y ago> ROCm from AMD has its restrictions, but... it really is easier to program than OpenCL. Its a superior model: having a single language that supports both CPU and GPU code is just easier than switching between C++ and OpenCL (where data-structures can't be shared as easily). ROCm isn't a programming language or programming model - it's a collection of tools and libraries. Which language are you specifically referencing here? HIP?
- dragontamer 5y agoYeah, HIP specifically. That's the part of ROCm that is aiming to give a CUDA-like environment.
- N1H1L 5y agoTwo reasons also. Some of the fastest research supercomputers in the US have been nVIDIA based. Sitting at a national lab, it's laughable how much more support there is from nVIDIA. Getting a DGX box is easy - there is nothing comparable from AMD's side. And the less said about Intel it's better. Smart, motivated people I know have left Argonne recently because of the Aurora shitshow.
- anon_tor_12345 5y agoE.g. Pavan lol
- N1H1L 5y agoBalaji is legit. He is an ex Panda student and those guys know their stuff
- bradneuberg 5y agoCan you comment more on what’s going on at Argonne related to Aurora?
- N1H1L 5y agoAurora was supposed to be up and running in early 2018. It seems like that it won't be functional even in 2021. This is by the way, such an years long delay has never happened when it comes to US Leadership Computing Facilities. Intel, last I heard has written off close to 300 million dollars on Aurora.
- dragontamer 5y agoDo you know if there's any post-mortems about what went wrong there? I mean, I have the gist. Intel bet big on Xeon Phi, but that didn't seem to offer enough performance. Intel then switched over to this GPU-strategy (see Intel Xe), but that required them to rework virtually everything from scratch. No one said anything in my previous paragraph. But its blatantly obvious: the Xeon Phi was being advertised very strongly by Intel up to the point that Aurora's design was reworked. Suddenly, Xeon Phi was cut, and Intel started talking about Xe (including OneAPI, and all sorts of stuff the HPC market cares about). I'm confident enough at reading between the lines that I'm willing to assume this in the absence of hard facts :-) I'm kind of curious on the play by play, if at all possible. What test showed up that made Argonne National Laboratory decide that the Xeon Phi model wasn't going to work? Was it possible to come to this conclusion any sooner? I realize this sort of stuff is rarely published, but I guess that's what makes me interested in those juicy details.