Repository navigation
CuMetal v0.7.1
CuMetal v0.7.1
CuMetal 0.7.1 is a correctness release. CUDA event timing now measures GPU
execution rather than host submission. A possible hang in typed
grid.sync() is fenced. System atomics and roundf compile and keep their
semantics on both backends. The nvcc-compatible driver accepts the options
real CMake CUDA projects emit.
Highlights
- GPU-timed events.
cudaEventElapsedTimereads the GPU end times of
the Metal command buffers thatcudaEventRecordcommits. Previously it
subtracted CPU timestamps from submission, so a benchmark with ~112 ms of
GPU work reported 0.09 ms. - Grid sync fence. The typed backend's
grid.sync()leader snapshotted
the barrier generation and published its arrival with unfenced relaxed
atomics. A reordering could make it miss the release and spin forever,
matching a hang reported on M1 Pro (#175). Validated on M4 Pro, where the
race did not reproduce; M1 Pro confirmation is pending. - System atomics and
roundf. Clang 22's 32-bit NVVM system atomic
intrinsics import into the existing coherent-UMA lowering, and unsigned
system min/max keep unsigned comparisons.__nv_roundfno longer emits
llvm.round.f32, which could fail Metal pipeline creation, and preserves
signed zero on both backends. - nvcc drop-in.
--fp64=MODE,-isystem,-Xcompiler=and
--compiler-options(also forwarded to linking), and
--options-file/-optfresponse files are honoured.SYSTEM_INCLUDES
is reported as-isystem, sofind_package(CUDAToolkit)plus
CUDA::cudartconfigures cleanly. - Metal emission. Null-pointer comparisons and LLVM aggregates with
template-like names, such as CUBBlockReduce, produce valid MSL. - Install. The installed
cumetal_benchkeeps its signature and finds
libcumetal.dylibwithoutDYLD_LIBRARY_PATH.
Verification
On Apple M4 Pro, macOS 26, at 0271417 plus the version bump:
- Merged PR set, Debug with the binary shim ON: 450 of 454 passed in a
-j 6run. The four failures passed when rerun alone. - Same set, Debug with the binary shim OFF: 448 of 453 passed in a
-j 4run. The five failures passed when rerun alone. - The grid-sync fence: the cooperative-grid, cooperative-groups,
backend-matrix and both corpus tests passed, and a unit assertion fails
without the fix. A later full run lost the macOS Metal compiler service
partway through; the 20 runtime-JIT tests that failed then do not use
grid sync, and their generated code is unchanged by the fix.
These totals are evidence for the enrolled test surfaces, not a
percentage of the complete CUDA ecosystem.
Important limits
- Event intervals use Metal command-buffer timestamps, so they include any
idle gap between command buffers and are not per-kernel counters. - System-atomic import covers relaxed 32-bit integer forms on device
storage. Wide and floating system atomics, other scopes and
shared/private targets are not added. - Linking existing objects with
--fp64does not change their arithmetic
mode; select it when compiling each source. - Static and anonymous-namespace kernels in native-AOT executables
(#180) are not in this release.
Contributors
Thank you to the people who found, fixed and validated the work in this
release:
- Christopher Albert (@krystophny)
reported #181–#189 and #198 while bringing the
SIMPLE CUDA sources and a real CMake
build to CuMetal, then fixed each one with a regression test:
GPU-timed CUDA events (#199), the nvcc driver's--fp64,-isystem,
-Xcompiler=and options-file handling and CMake system-include metadata
(#192–#196), valid Metal emission for null pointers and template-like
aggregates (#191, #197), the installedcumetal_bench(#190), and faster
PTX import (#200). - Harrison O'Connor-Hoover
(@harrisonoconnorhover)
brought Clang 22 system atomics to the source path and kept unsigned
system min/max unsigned (#177), maderoundfbit-exact on both
backends (#178), and reported the cooperative grid-sync hang (#175)
with the diagnostic that located it.
See the changelog for the complete list.