All 57 Entries
Era 0 · Historical Whitepaper (Verbatim + Nov 2026 Addendum) Wave I · GPU Liberation Whitepaper v1.1 (Feb 2026) engineering est_j · Analytical / TDP Model Measured/Empirical Engineering Archival v1.1 PDF (Feb 19, 2026) & 33-EC2 compatibility matrix; invisible-cuda-private source repo is private (unreproduced externally); successor Apple Silicon tooling public at openIE-dev/mac-ssi

Breaking the CUDA–Metal Barrier: A PTX-to-Metal Translation Layer for 100 Million Dormant GPUs

February 19, 2026 v1.1 technical whitepaper and 33-EC2 compatibility experiment lowering PTX 8.0 across 276 CUDA C-ABI symbols to Apple Metal (4,999 GFLOPS FP32 on M3 Ultra), with explicit FP64-to-FP32 surrogate downcast and est_j TDP disclosures.

David Charlot • • Addendum & Errata: Nov 25, 2026 • 7 min read • Glossary • Verification & AI-Use Disclosure
cuda metal apple-silicon ptx-compiler gpu-portability cubecl historical-whitepaper

Part I: Contemporary Historical Summary (As Written in February 2026)

Historical Source Provenance (Original Date: February 19, 2026): David Jean Charlot, PhD · Open Interface Engineering. Preserved from our 16-page v1.1 GPU translation whitepaper (Download Original Feb 2026 PDF) and companion 33-instance EC2 EXPERIMENT.md.

Motivation: Unlocking Unified-Memory GPUs Locked Behind libcuda

In February 2026, over 100 million Apple Silicon laptops and workstations carried high-bandwidth unified memory (up to 512 GB shared directly between CPU and GPU without cudaMemcpy PCIe transfers), yet precompiled CUDA wheels and native binaries aborted at dynamic-link time when probing for libcuda.so or cuLaunchKernel.

We engineered invisible-cuda (~20,000 lines of Rust across 65 modules, exercised by 464 unit tests and 45 SDK integration suites) as a drop-in C-ABI libcuda.dylib / libcuda.so translation layer exporting 276 CUDA Driver, Runtime, BLAS, DNN, and Signal symbols across 29 FFI modules (122 Core Driver/Runtime, 44 cuBLAS, 66 cuDNN/ML, and 44 cuFFT/cuSPARSE), alongside TCP/Thunderbolt multi-node NCCL collectives.

Three-Stage PTX 8.0 -> KernelIR -> Metal Shading Language (MSL) Compiler

Translating compiled NVIDIA PTX 8.0 virtual assembly into Apple Metal compute shaders required resolving an ABI ambiguity: PTX .param .u64 kernel parameters do not distinguish a device buffer pointer (device T* [[buffer(i)]] in MSL) from a 64-bit scalar integer (constant uint64_t&).

CUDA Binary / PTX 8.0 Module
   │
   ▼  Stage 1: PTX 8.0 Lexer & Parser (registers, predicates %p, shared .shared arrays, warp intrinsics)
KernelIR (100+ typed SSA/CFG operations)
   │  • Backward `find_buffer_ref()` dataflow analysis traces `ld.global` / `st.global` address arithmetic
   │    back to entry `.param` slots to classify device pointers vs. scalar uniforms automatically
   │  • Maps CUDA `tid.x / ctaid.x / ntidx` -> MSL `thread_position_in_threadgroup` & `threadgroup_position_in_grid`
   │  • Maps `__syncthreads()` (`bar.sync 0`) -> `threadgroup_barrier(mem_flags::mem_threadgroup)`
   │  • Lowers warp shuffles (`shfl.sync`) -> Apple `simd_shuffle*` intrinsics
   ▼  Stage 2: MSL Source Codegen + 3-Tier Content-Hashed Cache (BLAKE3 -> 4,096-entry atomic LRU + disk)
Metal `MTLComputePipelineState` Dispatch (Zero-Copy Unified Memory on Apple Silicon)

Apple Silicon Throughput & 33-EC2 Cloud Compatibility Matrix

Across four Apple Silicon configurations (45/45 SDK suites and 464/464 unit tests passing), Metal dispatch (cublasSgemm / translated FP32 kernels) recorded the following FP32 throughput and nominal SoC TDP ratios (Superseded / corrected — see Nov 25, 2026 Errata below):

Hardware ConfigurationNominal Power DenominatorPeak FP32 Compute (SGEMM Numerator)STREAM Triad BandwidthNominal Envelope Ratio
Apple M5 Laptop~27 W SoC TDP3,386 GFLOPS118.4 GB/s125.4 GFLOPS/W
Apple M4 Max Laptop~95 W SoC TDP4,120 GFLOPS382.0 GB/s43.4 GFLOPS/W
Apple M3 Ultra (96 GB, idle desktop)~60 W estimated active4,999 GFLOPS154.6 GB/s83.3 GFLOPS/W
Apple M3 Ultra (256 GB, 20+ apps open)Loaded workstation3,809.3 GFLOPS (4096 x 4096)Zero GPU context resetsSustained unified-memory sharing

In our companion 33-Instance AWS EC2 Compatibility Experiment (876 KB x86_64 and 788 KB aarch64 glibc 2.17 self-contained Rust binaries across x86, Graviton, AMD, Intel, and GPU instances), the shim passed 17/17 core ABI tests across 47/47 modules (164 entry points) and documented a 24-capability support matrix: 9 fully supported, 10 degraded (functional with throughput or FP64->FP32 precision caveats), and 5 unsupported (hardware CUDA Graphs, cross-process IPC handles, cooperative grid-wide sync, texture objects, and raw mma.sync tensor-core PTX opcodes outside cuBLAS interception).


Methods, Baseline & Numerical-Precision Scope Box (est_j)

  1. FP64 -> FP32 (DGEMM -> SGEMM) Mixed-Precision Surrogate Caveat: Apple Silicon GPUs lack high-throughput hardware IEEE-754 binary64 (FP64) execution units. As noted in Section 7.5 of the original PDF and foregrounded here, invisible-cuda’s compatibility mode downcast FP64 buffers and cublasDgemm calls to FP32 (binary32, 24-bit significand, machine epsilon 1.19e-7). While acceptable for neural inference and graphics workloads that default accidentally to float64, this downcast violates IEEE-754 binary64 semantics (53-bit significand, 2.22e-16 epsilon) and is unsuitable for ill-conditioned scientific linear algebra, stiffness matrices, or orbital integration.
  2. Baseline & Denominator Scope (SGEMM Interception vs. Raw PTX; TDP est_j):
    • Peak 4,999 GFLOPS on M3 Ultra reflects cuBLAS SGEMM routed into Apple’s tuned Metal Performance Shaders (MPSMatrixMultiplication), whereas custom PTX kernels translated to raw MSL achieved lower fraction-of-peak depending on register pressure and threadgroup tile geometry (and 4,999 GFLOPS remains well below M3 Ultra’s theoretical native shader ceiling on massive batch sizes).
    • Every GFLOPS/W ratio in Part I (3,386 GFLOPS / 27 W = 125.4 GFLOPS/W, 4,999 GFLOPS / 60 W = 83.3 GFLOPS/W) divided measured SGEMM FLOP/s (numerator) by nominal SoC TDP or estimated package wattage (est_j denominator) rather than inline DC board-shunt power (measured_j) or IOReport energy counters (reported_j). Contrasting laptop FP32 shader GFLOPS/W against 700 W datacenter H100 boards mixes precision classes and server cooling/NVLink envelopes and must not be read as an apples-to-apples silicon efficiency win.
  3. Artifact & Licensing Status: Archival PDF (#11) is public at /papers/archive/11-Breaking-CUDA-Metal-Barrier.pdf under CC BY-ND 4.0. The invisible-cuda-private Rust repository remains private (unreproduced externally); public Apple Silicon telemetry and systems utilities later shipped in openIE-dev/mac-ssi.

Chronological Evolution Within OpenIE Research

  1. Portable First-Party Kernels Over Binary ABI Interception (Downward LUT6 Compilation): Encountering the 5 unsupported low-level PTX capabilities and the FP64 hardware mismatch motivated authoring portable GPU kernels directly in Rust CubeCL, compiling with explicit type and precision contracts across NVIDIA CUDA, AMD ROCm, Apple Metal, and Vulkan/CPU.
  2. Counter- and Shunt-Grounded Hardware Audits (Eco-Compute): Replaced nominal TDP ratios (est_j) with workload-matched reported_j on-chip counters and measured_j inline DC shunt traces across Jetson Thor, Kria KV260, and Apple Silicon.
  3. Unified-Memory Interactive Simulation (Game Engines): Explored the zero-copy CPU/GPU unified-memory architecture highlighted in the M3 Ultra loaded-workstation test for real-time world-simulation pipelines.
  • Janik, A. (2020–2024). ZLUDA: CUDA on Non-NVIDIA GPUs (Intel / AMD ROCm binary libcuda translation and PTX compiler) — closest architectural predecessor in drop-in C-ABI CUDA binary translation.
  • Spectral Compute (2024). SCALE: GPGPU Programming for AMD GPUs — clean-room CUDA toolkit and binary/source compilation targeting AMD RDNA/CDNA hardware.
  • AMD ROCm / HIPIFY (2016–2026). HIP C++ Runtime API and CUDA-to-HIP Translation Tools — industry-standard source-level portability layer across CUDA and AMD GPUs.
  • The Khronos Group / Brenwill Workshop (2018–2026). MoltenVK: Vulkan Portability Implementation on Apple Metal — mature SPIR-V-to-MSL shader and runtime translation architecture on macOS/iOS.
  • Hannun, A., Jaggi, D., et al. (Apple Machine Learning Research) (2023). MLX: An Array Framework for Apple Silicon — native unified-memory lazy compute graph engine on Apple Metal.
  • Tracel AI (2024–2026). CubeCL: Multi-Platform Compute Kernel Language in Rust (CUDA, ROCm, Metal, WebGPU).

Changelog (2026-11-25)

  • Separated Part I (February 19, 2026 historical summary) from Part II (November 25, 2026 precision disclosures, baseline scope, and related work).
  • Added track, artifactStatus, licenseNote, and primaryClaim frontmatter fields and explicitly tagged (FP64->FP32 surrogate, est_j TDP model) in headlineMetric.
  • Clarified cuBLAS -> MPS library interception vs. raw PTX-to-MSL codegen, explicit GFLOPS / TDP numerators and denominators, and private-repo provenance (invisible-cuda-private, externally unreproduced).
  • Added prior-art citations to ZLUDA, SCALE, AMD HIPIFY/ROCm, MoltenVK, Apple MLX, and CubeCL.
DC

David Charlot

Open Interface Engineering, Inc. · Signed Provenance · Self-Checked

Archival PDF (#11) public at /papers/archive/11-Breaking-CUDA-Metal-Barrier.pdf under CC BY-ND 4.0; original invisible-cuda-private repository is private (externally unreproduced); Apple Silicon tooling lineage openIE-dev/mac-ssi is public. Full licensing & AI-use disclosure →

Archival v1.1 PDF (Feb 19, 2026) & 33-EC2 compatibility matrix; invisible-cuda-private source repo is private (unreproduced externally); successor Apple Silicon tooling public at openIE-dev/mac-ssi

Check the primary artifacts or run an independent replication

Inspect signed provenance manifests, rerun our public Apache-2.0 commodity-hardware replication kits, review our November 25, 2026 outside-review errata, or browse primary manuscripts on the Research Hub.