Skip to content

feat: add validated scalar libm aliases to generated dispatch - #1650

Open
uurl wants to merge 5 commits into
NVIDIA:mainfrom
uurl:feat/libdevice-math-aliases
Open

uurl wants to merge 5 commits into
NVIDIA:mainfrom
uurl:feat/libdevice-math-aliases

Conversation

@uurl

@uurl uurl commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add 11 libm math families in both f32 and f64: erf, erfc, exp10, j0, lgamma, y0, y1, fdim, fmod, nextafter, and remainder.
  • Generate typed scalar signatures and dispatch from the libdevice math shard. Coverage reaches 104 of libm 0.2.16's 124 f32/f64 exports.
  • Validate 96 referenced libdevice signatures against CUDA 13.0 bitcode.
  • Add an independent libm export fixture, lowering tests, and the math_aliases GPU example.

j1, jn, and yn remain unmapped: direct libdevice calls differ from libm for signed zero or negative orders. They require semantic adapters.

Validation

  • cargo oxide run math_aliases: 416/416 checks passed on sm_120a.
  • just check: passed.
  • git diff --check: passed.

Stacked on #1649.

Refs #1224

Testing

  • just -f cuda-oxide/Justfile check passes (the local mirror of CI: fmt, clippy, tests, guards, docs)
  • cargo oxide run <example> passes, or cuda-oxide/scripts/smoketest.sh -o '^<example>$'
  • New example added (if applicable)

Checklist

  • All commits signed off (git commit -s)
  • SPDX headers on new source files

uurl added 4 commits October 25, 2026 19:16
Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Raul Estrada <raulestradaa@gmail.com>
@uurl
uurl force-pushed the feat/libdevice-math-aliases branch from 7cb79f5 to 70bde3a Compare October 26, 2026 05:29
@uurl
uurl marked this pull request as ready for review October 26, 2026 06:54
@uurl
uurl requested a review from nihalpasham as a code owner October 26, 2026 06:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant