Re:HIP: Convert CUDA to Portable C++ Code
by slizard on Tuesday December 13, 2016 @09:07PM
(#13173232)
> But it's interesting to consider why HIP doesn't support compiling to OpenCL.
It's not HIP that will support compiling _to_ OpenCL, but rather the compiler toolchain will have an OpenCL compiler that will compile down to ISA [1], promised to be released for the ROCm stack in the coming weeks [2].
[1] https://www.phoronix.com/forums/forum/linux-graphics-x-org-d... [2] https://github.com/RadeonOpenCompute/ROCm/issues/30
Re:HIP: Convert CUDA to Portable C++ Code
by pjmlp on Wednesday December 14, 2016 @04:45AM
(#13174867)
> so I really wonder how the decision was made to base OpenCL on C99.
The OpenGL group has always been hostile to anything other than C, it was required to see them being beaten by CUDA, C++AMP, DX, Metal to finally acknowledge C++ in OpenCL and Vulkan API definitions.
Also, I feel that proprietary shouldn't be used as a synonym to targeted at specific hardware, because being truly independent of the hardware might just be too much to ask for.
But it's interesting to consider why HIP doesn't support compiling to OpenCL. They don't seem to address this in the FAQs, but I think the reason might be that in addition to all the other problems, OpenCL is terrible as an intermediate language for compiling C++ to OpenCL. If it wasn't, then I don't know a good reason for why something like HIP wouldn't support it out of the box. I mean, compiling C++ to C basically requires a full-blown C++ compiler, which is a huge investment of resources, so I really wonder how the decision was made to base OpenCL on C99. Because of all this, I'm not sure how to understand HIP in relation to the rest of the ecosystem.