Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost
by gspr on Monday June 14, 2021 @06:29AM
(#27501045)
I'll piggyback on your comment for a question: I only very recently started getting into the basic of GPGPU coding. I hate vendor lock in, so I started out with OpenCL. I had a good time, but I do understand that more and more of non-CUDA world (however small that may be) is moving away from OpenCL. What are they moving to? Where should one direct one's "compute learning energy" (if one already excludes CUDA or other proprietary solutions)?
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost
by fsloth on Monday June 14, 2021 @08:29AM
(#27501769)
Not OP, but: Unfortunately you need to pick a platform and target that. Which API you use depends on the platform. DirectX, OpenGL, Vulkan and Metal all have compute capability.
So, I think you need to abstract your code at the services level, and provide an implementations for each platform you need to support (the number may be 1 or more than 1).
I think you need to direct your "compute learning" energy at the algorithm level. Numerics and all that. The GPU API:s are just the obtuse implementation detail, but not the meat of the thing.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost
by raphlinus on Monday June 14, 2021 @09:05AM
(#27502039)
In addition to picking a platform, you also essentially need to pick a generation. Vulkan 1.0 for example is missing subgroups and has lots of other limitations. Vulkan 1.2 on a modern GPU with an updated driver is pretty darned powerful, with an explicit memory model, control over subgroup size, a form of pointers, and a range of scalar datatype sizes (f16 is especially useful for machine learning, commonly having 2x the throughput as f32). It is possible to have multiple versions and select at runtime, but it's an additional complexity that needs to be considered, and can constrain your architecture to accommodate the compatibility modes.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost
by zozbot234 on Monday June 14, 2021 @10:37AM
(#27503062)
> So, I think you need to abstract your code at the services level, and provide an implementations for each platform you need to support (the number may be 1 or more than 1).
There are some cross-platform capabilities via SPIRV-Cross. The LLVM folks are working on MLIR that might provide even better features wrt. a common abstraction layer going forward.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost
by gspr on Monday June 14, 2021 @09:39AM
(#27502381)
Thanks! That's a bit of a sad state of things :-(
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost
by 0-_-0 on Monday June 14, 2021 @06:20AM
(#27501000)
Do you know what the missing features are? I'm very interested, I'm rewriting code from ocl to vulkan.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost
by zozbot234 on Monday June 14, 2021 @06:29AM
(#27501041)
See https://news.ycombinator.com/item?id=27396634 for a basic intro, but IIRC the main differences involved are (1) support for general pointers in OpenCL, whereas data indirection in compute shaders involves varying levels of messiness, and (2) OpenCL introduces support for some mathematical functions, that is not in Vulkan Compute. (However, note that OpenCL 3.0 has also made many features optional, so the basic featureset may be more comparable as a result.)
The programming model is also quite different, so code will have to be rewritten.