Ask HN: Resources for general purpose GPU development on Apple's M* chips?
1–10 of 86 posts
Re: Ask HN: Resources for general purpose GPU development on Apple's M* chips?
#2There is Metal development. You want to learn Apple M-series gpu and gpgpu development? Learn Metal!
Re: Ask HN: Resources for general purpose GPU development on Apple's M* chips?
#3Re: Ask HN: Resources for general purpose GPU development on Apple's M* chips?
#4Re: Ask HN: Resources for general purpose GPU development on Apple's M* chips?
#5Re: Ask HN: Resources for general purpose GPU development on Apple's M* chips?
#6Re: Ask HN: Resources for general purpose GPU development on Apple's M* chips?
#7[1] https://github.com/AsahiLinux/gpu
[2] https://github.com/dougallj/applegpu
[3] https://github.com/antgroup-skyward/ANETools/tree/main/ANEDi...
[4] https://github.com/hollance/neural-engine
You can use a high level APIs like MLX, Metal or CoreML to compute other things on the GPU and NPU.
Shadama [5] is an example programming language that translates (with Ometa) matrix calculations into WebGPU or WebGL APIs (I forget which). You can do exactly the same with the MLX, Metal or CoreML APIs and only pay around 3% overhead going through the translation stages.
[5] https://github.com/yoshikiohshima/Shadama
I estimate it will cost around $22K at my hourly rate to completely reverse engineer the latest A16 and M4 CPU (ARMV9), GPU and NPU instruction sets. I think I am halfway on the reverse engineering, the debugging part is the hardest problem. You would however not be able to sell software with it on the APP Store as Apple forbids undocumented API's or bare metal instructions.
Re: Ask HN: Resources for general purpose GPU development on Apple's M* chips?
#8People have already mentioned Metal, but if you want cross platform, https://github.com/gfx-rs/wgpu has a vulkan-like API and cross compiles to all the various GPU frameworks. I believe it uses https://github.com/KhronosGroup/MoltenVK to run on Macs. You can also see the metal shader transpilation results for debugging.
There is also a Vulkan backend if you want to run Vulkan through MoltenVK though.
Re: Ask HN: Resources for general purpose GPU development on Apple's M* chips?
#9People have already mentioned Metal, but if you want cross platform, https://github.com/gfx-rs/wgpu has a vulkan-like API and cross compiles to all the various GPU frameworks. I believe it uses https://github.com/KhronosGroup/MoltenVK to run on Macs. You can also see the metal shader transpilation results for debugging.
wgpu has its own Metal backend that most people use by default (not MoltenVK). There is also a Vulkan backend if you want to run Vulkan through MoltenVK though.