Roadmap

std.math functions the corpus kernels call

Scope

The functions of Mojo's std.math whose lowering appears in the corpus IR, with each function's contract as the Modular source at bbc13a71 states it and the Lean declaration of that contract. A function is in scope if the corpus IR has the intrinsic it lowers to: rsqrt (llvm.nvvm.rsqrt.approx.ftz.f), max (llvm.maxnum, llvm.smax) and min (llvm.smin).

Items

Out of scope

Depends on

The llvm-ir cards for the intrinsics (intrinsic-rsqrtapprox, intrinsic-fminmax, intrinsic-minmax) and the reading of LangRef and PTX ISA (docs/TRUST.md T7, T10).

Coverage in MojoProof

Every card is L1: its contract is stated in Lean (MojoProof.Sem.rsqrtOk, MojoProof.Sem.maxnum, MojoProof.Sem.intMinMax). No card is L2, since no GPU run is recorded, and so none is L3.

Next steps

Status of the cards

From roadmap/status.yaml, which the roadmap script writes from the code.

CardKindLevelEvidence above the levelNextCorpus kernels
max: std.math.max on SIMD values: llvm.maxnum on floats, llvm.smax on signed integersconstructL1-L2 needs a recorded GPU run (a conformance test, not a proof)44
min: std.math.min on SIMD values: llvm.smin on signed integersconstructL1-L2 needs a recorded GPU run (a conformance test, not a proof)37
rsqrt: std.math.rsqrt on float32 on the GPU is llvm.nvvm.rsqrt.approx.ftz.fconstructL1-L2 needs a recorded GPU run (a conformance test, not a proof)34