NVIDIA’s highest ecological moat CUDA may no longer be completely unshakable, OpenFPM developer Abhinav Singh said in X Announces OpenFPM 5.2.0, making Apple Metal GPU the first-level backend of this open source high-performance computing framework for the first time. It was actually measured that a three-dimensional SPH dam breach simulation was run on M3 Pro. The GPU took 6 seconds compared to the sequential CPU 60 seconds. The acceleration ratio was about 10 times. The GPU utilization was close to 100%. The physical results were also highly consistent with the original CUDA version.
We got CUDA kernels running on @Apple Metal GPUs! 🍎⚡️
Thanks to GPT 5.6 Sol, our existing CUDA/HIP-style simulation kernels in OpenFPM now directly execute on Apple Silicon GPUs.
Here is how we got there, and what the first real Dam break benchmark says. 🧵 pic.twitter.com/28S8X2aXwK
— Abhinav (@Abhinavsns) July 22, 2026
This major breakthrough is mainly at two levels: First, the progress of Apple’s ecological translation CUDA project has gone from sporadic individual attempts in the past to a stage that can be accepted by real scientific computing tasks; second, this multi-layer IR translation chain was opened within six hours, not by a certain GPU driver engineer, but by OpenAI’s GPT-5.6 Sol to help locate the compatibility issues of MoltenVK and SPIR-V and design workarounds. To the average person, the signal significance of this incident is that when NVIDIA has built a territory known as the “$5 trillion moat” with 4 million developers in the CUDA ecosystem and $51.2 billion in quarterly data center revenue, the open source community may have quietly crossed the corner of this moat.
What does this PR solve?
OpenFPM is an open source C++ framework maintained by the European mosaic-group. It is specially used to develop scalable particle and particle-grid hybrid simulation codes, supporting distributed memory and shared memory heterogeneous systems. For a long time, OpenFPM’s GPU backend has only been connected to CUDA and HIP, which means that it can only run efficient operations on NVIDIA and AMD platforms.

The design idea of this version is not to re-create a GPU core for Apple Metal, but to build a multi-layer conversion pipeline:
- The first layer: CUDA/HIP kernel source code, the application layer maintains the original kernel calling style and does not touch any Metal-specific API.
- Second layer: Clang/HIP compiler, retaining kernel semantics, first convert HIP to LLVM IR.
- Layer 3: SPIR-V intermediary representation, which is a general GPU intermediate code developed by Khronos, allowing a core to run on Vulkan-compatible hardware.
- Layer 4: Vulkan API calls, compile OpenCL C into SPIR-V through tools such as clspv and chipstar, and then use Vulkan to enter the GPU.
- The fifth layer: MoltenVK translation layer, translating Vulkan instructions into the Apple Metal API.
- Bottom layer: Apple Metal GPU (Apple Silicon such as M3 Pro), final execution.
The key value of this path is hardware transparency. As long as developers do not change the way the kernel is written, they can theoretically run the same OpenFPM code on NVIDIA, AMD, and Apple GPUs. Abhinav also said in the original text: “hard part done. Apple Silicon GPU is now a first-class OpenFPM backend.”
Apple ecological translation CUDA: from sporadic attempts to acceptance
Attempts to run CUDA/HIP style programs on Apple Metal GPUs are not uncommon in recent years, but most of them remain in the demo stage. In the past, developers often had to rewrite the entire kernel for Apple platforms, or accept demonstrations that could only run vector addition levels. The reason why OpenFPM is worth talking about this time is because it selected real scientific computing tasks for acceptance. Three-dimensional SPH dam breach simulation requires simultaneous processing of scanning, sorting and rearrangement, cell and neighbor list construction, ghost particle exchange, reduction operations, atomic operations and other modules. Errors in any link will cause problems with performance or physical results.
- M3 Pro Metal GPU execution time: Approximately 6 seconds.
- Same program sequence CPU execution time: Approximately 60 seconds.
- Speedup ratio: Approximately 10 times.
- GPU utilization: Close to 100%, indicating extremely high conversion efficiency.
- Consistency of physical results: Key parameters and particle trajectories are highly consistent with the original CUDA version, without loss of accuracy.
Particle storage grows linearly with the number of particles N, and the workload of neighbor search is about O(N·k) (k is the number of neighbors under a fixed density). The 10x acceleration this time is a single-machine backend comparison. In the future, the RDMA technology supported by Apple Thunderbolt can be used to achieve multi-machine dynamic load balancing, further extending the simulation scale.
The community is not without doubts about “Mac running scientific computing”. Someone on Hacker News bluntly said that instead of spending time dealing with the translation layer, it is better to directly use a more suitable system; AMD and the community have always had different attitudes towards this type of translation layer. AMD officials prefer to directly implement HIP support in the upstream projects (PyTorch, llama.cpp), because the pursuit of bug-for-bug compatibility is considered futile. What OpenFPM proves this time is another path: first abstract the application layer so that the same core code can run transparently on NVIDIA, AMD, and Apple GPUs through the middle layer.
AI Participation Improvement: GPT-5.6 What does Sol do in this chain?
The reason why OpenFPM was able to open this translation chain within six hours this time is that the role of GPT-5.6 Sol is worth exploring. Abhinav publicly pointed out the actual involvement of AI:
- Device-side memory layout: Apple Metal’s memory model is fundamentally different from CUDA. GPT-5.6 Sol assists in the construction of device-side memory layout.
- Single precision limit handling: Metal does not support 64-bit double precision floating point, AI passes
-cl-single-precision-constantThe compile flag allows all kernels to use single-precision constants uniformly, removing the compatibility logic that was originally maintained by hack code. - Volatile decorator issues: MoltenVK does not respect the Volatile decorator in SPIR-V, causing load/store instructions to be reordered, thus affecting the correctness of atomic operations. After GPT-5.6 Sol discovered this problem, it designed a corresponding workaround at the SPIR-V layer, and recommended reporting recurring use cases to the MoltenVK project to promote upstream patching.
- ABI adapter code: The cmake/MoltenVKKernelABI.cpp file in the PR contains the ABI adaptation code automatically generated by AI.
Compared with the past debugging experience of underlying environments such as SPIR-V and MoltenVK, the workload is usually calculated in weeks or months. aoyii commented in the detailed article that this corresponds to the manual debugging work that used to take weeks, and is now compressed to a few hours. What AI participates in this chain is no longer application layer code generation, but work such as SPIR-V intermediary representation design, cross-platform memory model adjustment, and GPU driver compatibility troubleshooting.
What does this development mean for NVIDIA’s moat?
OpenFPM PR #18 It’s small, but it demonstrates an open source workflow that bypasses the CUDA moat. NVIDIA’s market value of US$5 trillion in 2026 relies on its software stack: 4 million developers, an ecosystem spanning PyTorch, TensorFlow, JAX, cuDNN, and TensorRT, plus a business model in which 90% of its revenue is focused on the data center business.

What makes this translation chain interesting is that it uses multiple layers of IR translation rather than rewriting the core. Similar open source projects such as cuda4mac (GitHub haj/cuda4mac) also follow the SPIR-V + LLVM translation route, but OpenFPM is the first version to be accepted with real scientific computing tasks. For Mac users, this means that particle simulations that could only be run on the server in the past can now be completed locally on laptops; for NVIDIA, although Apple GPUs are still limited by double-precision floating point in the short term and cannot directly replace high-efficiency computing clusters, in the long term it will allow more developers to keep their workflows on the Mac platform, which is equivalent to growing a usable beachhead outside the moat.
Developer Confessions: Practical Value and Realistic Limitations
Abhinav is quite candid about his positioning on this breakthrough:
- Local debugging requirements: The team’s large-scale simulations are still run on the cluster, but before running large simulations, small simulations should always be used to debug errors. Local debugging that relies on the CPU is too slow, and the simulation results are often several GB and cannot be sent back through SSH. The remote desktop is cumbersome and difficult to use, so running it locally is the most trouble-free.
- Code portability: The code that has been debugged on the laptop can be automatically scaled up by throwing it into the GPU cluster intact.
- Hardware abstraction layer verification: Being able to run on Apple architecture proves that the design of the device abstraction layer is effective.
Abhinav further pointed out that the biggest limitation of current Apple Metal GPUs is the insufficient support for high-precision floating-point operations. Many professional scientific computing fields rely on double-precision operations, so NVIDIA’s professional GPUs still have advantages in efficient computing scenarios such as weather forecasting and aerospace simulations. The significance of OpenFPM PR #18 this time is to open up the translation chain to the extent that it can be used by local development. As for replacing the professional cluster, that is another way.
Source: KOCPC Chinese