A notable development has occurred in the world of GPU programming. Researchers successfully ran a high-performance computing application, developed for Nvidia's CUDA platform, on the GPU of an Apple Silicon-based M3 Pro processor with almost no changes to the kernel code.
CUDA Application Ran on Apple GPU
This new achievement is not limited to a simple computational example. The study successfully executed a three-dimensional SPH (Smoothed Particle Hydrodynamics) dam break simulation, commonly used in scientific computing. The simulation completed on the Apple GPU in approximately 6 seconds, while the same process took approximately 60 seconds on the CPU. This resulted in an approximate 10-fold performance increase.
For those unfamiliar, CUDA, HIP, and Metal are distinct GPU programming ecosystems. Normally, porting CUDA-written applications to Apple's Metal infrastructure requires significant code modifications. However, the researchers adopted a different approach. In their developed system, the application is first processed via Clang/HIP, then passed through SPIR-V, Vulkan, and MoltenVK layers to run on Apple's Metal architecture.
This approach eliminated the need to write Metal-specific kernel codes at the application level. The CUDA/HIP-based kernel structure was preserved, creating a more transparent operating environment across different hardware platforms.
GPT-5.6 Sol Played a Role in the Development Process
One of the striking details of the project is the use of the GPT-5.6 Sol model in the development process. Researchers state that artificial intelligence helped create the device-side memory layout, identified compatibility issues between MoltenVK and SPIR-V in approximately six hours, and developed alternative solutions for these problems.
According to the researchers, the achieved speed increase was not at the expense of computational accuracy. Comparisons showed that the physical results of the simulation running on the Apple GPU were largely identical to the original CUDA version. The simulation paths and fundamental computational parameters were also reported to be very similar. Furthermore, the GPU utilization rate approaching 100% confirms that the developed conversion layer can efficiently use the hardware.
The researchers also suggest that while the current work was performed on a single device, dynamic load balancing could be achieved across multiple Apple devices in the future using RDMA support over Thunderbolt. This could enable larger simulations to run on more than one system.
Less Powerful Than Nvidia
However, Apple GPUs still have a significant limitation. The Metal architecture is not as powerful as Nvidia's professional GPU solutions for double-precision (FP64) computations. Therefore, Nvidia's data center GPUs maintain their advantage in areas requiring high precision, such as weather forecasting, engineering analyses, and supercomputing applications.
Nevertheless, this work is important as it demonstrates that CUDA/HIP-based applications can be ported to different GPU architectures like Apple Silicon with significantly fewer code changes. If this developed approach matures, developers' dependence on a single GPU ecosystem could decrease, and cross-platform portability could be substantially eased.
0 Comments: