Skip to content

cuda-oxide v0.5.0

Latest

Choose a tag to compare

@nihalpasham nihalpasham released this 01 Dec 12:37
· 19 commits to main since this release
cuda-oxide/v0.5.0
32b93c1

Provably safe GPU kernels with compile-time Lean 4 verification (#[verify], preview), Windows x86_64 MSVC support, OptiX and RTX shader compilation support, and CUTLASS 4.8.1 + Vera Rubin (sm_107a) support in cute-rs-preview.

Rust #[kernel] + #[verify(...)]  ──►  PostMem2Reg MIR  ──►  Lean 4 Proofs (0 sorryAx)
                                            │
                                            ▼  (proven mir.assert bounds checks elided)
                                       Emitted PTX / Cubin (Linux + Windows, CUDA + OptiX)
Area What Shipped in cuda-oxide v0.5.0
Provably Safe Kernels Compile-time Lean 4 proofs (#[verify], preview) + zero-unsafe GEMM
Windows Support Native x86_64-pc-windows-msvc host/device builds, COFF, and CI
OptiX & RTX Support Callable .func exports, 64-bit pointers, 256-input ptx_asm!
Vera Rubin & Compiler Opts CUTLASS 4.8.1 + sm_107a, local-array auto-unroll, DWARF fixes

1. Provably Safe Kernels (#[verify], Preview)

  • Compile-time Lean 4 verification (lean-exporter, oxide-proofs-preview): Annotate kernels with #[verify(...)] to prove memory bounds, race freedom, barrier uniformity, and async hardware lifecycle invariants at compile time over PostMem2Reg MIR (no_oob_idx, no_data_race, disjoint_writes, writes_all_elems, uniform_barriers, tmem_lifecycle) with zero per-kernel manual proofs (#1851, #1857, #1858, #1859, #1860, #1861, #1862, #1866, #1868, #1877, #1878, #1881, #1883, #1884, #1885, #1887, #1891, #1892, #1904, #1905, #1906).
  • Zero-unsafe speed-of-light kernels & bounds-check elision: Proven slice and SharedArray mir.assert bounds checks are erased before lowering to emitted PTX. Ships with 10 verified safe_* examples, from 1D vector addition up to safe_gemm_sol_final (warp-specialized Blackwell tcgen05 + TMA + TMEM + 2-CTA cluster CLC + PDL GEMM with zero unsafe blocks) (#1851, #1875, #1893).
  • Tooling & guide: Added cargo oxide lean-export, Lean 4 setup in nix develop and .devcontainer, a 45-pair GPU synchronization bug/fix verification suite, and the Verified Kernels chapter (#1904, #1906).

2. Windows x86_64 MSVC Support

  • End-to-end Windows builds (x86_64-pc-windows-msvc): Added native Windows host and device compilation, COFF object artifact embedding (oxide-artifacts), shared CUDA Toolkit discovery (cuda-toolkit-discovery), target-triple extra-rustflags selection in cargo-oxide, MSVC enum-type alignment in cuda-bindings, and PowerShell smoketest support (#1473, #1770, #1828).
  • Continuous verification & documentation: Added a dedicated Windows MSVC compile and PTX/cubin verification CI lane (windows.yml) and the Windows setup guide (#1770, #1870).

3. OptiX & RTX Shader Compilation Support

  • Callable device exports (#[device(export)], #[device(export_name = "...")]): Root uncalled .visible .func device functions (such as OptiX __direct_callable__* and __continuation_callable__* Shader Binding Table callables or C++ FFI callbacks) alongside #[kernel] entry points (#1872).
  • Wide inline PTX & named .const launch parameters: Extended ptx_asm! to support up to 256 input operands and 64 output operands (covering OptiX 9 cooperative-vector intrinsics) and preserved exact #[constant(export_name = "params")] symbols inside #[cuda_module] (#1871).
  • Opt-in 64-bit addressing & named .global statics: Added short-pointers = false (CUDA_OXIDE_NO_SHORT_PTR) so OptiX continuation stacks keep 64-bit .local pointers (%SPL), and honored #[no_mangle] / #[export_name] on device statics with evaluated const array lengths (#1873, #1874).

4. cute-rs-preview, Compiler Optimizations & Debugging

  • CUTLASS 4.8.1 & Vera Rubin (sm_107a): Upgraded cute-rs-preview to CUTLASS 4.8.1 and enabled Vera Rubin sm_107a BF16 and MXFP8 GEMM workloads (#1849), plus Option<&T> niche storage and the cuda-device-diag-mlir22 static-analysis profile (#1865).
  • Loop unrolling, generic policies & intrinsics: Added automatic full unrolling for loops indexing small local arrays (#1841), generic policy expressions in #[launch_bounds] and #[unroll] (#1853), sm_75 scalar arithmetic intrinsics (#1907), and GB10 (sm_121a) / R100 (sm_107) target handling (#1789, #1830).
  • DWARF debug info & build reliability: Coalesced DWARF debug sections with disambiguated labels in merge_ptx_bundles (#1779), preserved deeply nested and cycle-safe composite pointee debug types (#1780, #1781), serialized concurrent pipeline output writes (#1908), and added CI template builds for cargo oxide new (#1764).