News for hackers. Stuff that matters.
Re:OpenCL on Metal – what if clvk works? by aufhebung on Saturday April 02, 2022 @01:36AM (#30886058)
Now all we need is a way to run CUDA code on OpenCL
Re:OpenCL on Metal – what if clvk works? by pjmlp on Saturday April 02, 2022 @02:45AM (#30886304)
Good luck with all the languages supported by CUDA.
Re:OpenCL on Metal – what if clvk works? by my123 on Saturday April 02, 2022 @07:50AM (#30887506)
On some OpenCL implementations (as in, the ones supporting the SPIR-V OpenCL profile instead of just OpenCL C), this is possible.

Intel has a cleaned up variant of OpenCL for the purpose of running SPIR-V binaries called oneAPI L0, and Zluda can run on top of it. https://github.com/vosen/ZLUDA

AMD used to support SPIR in their driver, but they removed support for that in 2018. As such, you won’t get anything useful out of that one on AMD GPUs.

Re:OpenCL on Metal – what if clvk works? by pjmlp on Saturday April 02, 2022 @08:07AM (#30887606)
One reason why OpenCL 3.0 is basically OpenCL 1.2 rebranded, is because no one cared about SPIR profile.

OneAPI is focused on SYSCL, which is targeted at C++ and backend agnostic, it does nothing for Fortran, .NET, Java, Haskell, Rust, or any other language targeting PTX.

CUDA won thanks to embracing GPU polyglot programming and best in quality development tooling.

It is more a failure of the competition to uplevel their game than NVidia's own efforts.

Re:OpenCL on Metal – what if clvk works? by my123 on Saturday April 02, 2022 @10:13AM (#30888431)
> OneAPI is focused on [SYCL], which is targeted at C++ and backend agnostic, it does nothing for Fortran

oneAPI L0 supports SPIR-V's OpenCL profile, which is a language agnostic IR.

oneAPI Fortran offload to GPUs is supported with the OpenMP programming model. (https://www.intel.com/content/www/us/en/developer/tools/onea...)

SYCL is one of the programming models supported with oneAPI, OpenMP is also a first-class programming model. You can mix both OpenMP and oneAPI code in the same program too. (https://www.intel.com/content/www/us/en/develop/documentatio...)

The clearly defined oneAPI L0/OpenCL w/ SPIR-V API boundary also allows for custom programming models w/ 3rd-party compilers.

Re:OpenCL on Metal – what if clvk works? by pjmlp on Saturday April 02, 2022 @10:47AM (#30888666)
Yeah, all of that goes beyond the OpenCL standard as defined by Khronos, specially since OpenCL 3.0 dropped SPIR-V, and OpenMP was never part of OpenCL.
Re:OpenCL on Metal – what if clvk works? by my123 on Saturday April 02, 2022 @11:03AM (#30888754)
> specially since OpenCL 3.0 dropped SPIR-

It's not dropped, it's optional. An OpenCL 3.0 impl with SPIR-V support would be able to run such binaries on top - but Intel are the ones who care.

Re:OpenCL on Metal – what if clvk works? by pjmlp on Saturday April 02, 2022 @12:17PM (#30889314)
An euphemism for dropped.