Skip to content

feat(cargo-oxide): add build debug assertions flag - #1258

Merged
nihalpasham merged 2 commits into
NVIDIA:mainfrom
uurl:feat/1255-debug-assertions
Sep 15, 2026
Merged

nihalpasham merged 2 commits into
NVIDIA:mainfrom
uurl:feat/1255-debug-assertions

Conversation

@uurl

@uurl uurl commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

cargo oxide build --debug-assertions enables conditional diagnostics while retaining release optimization and wrapping arithmetic. Closes #1255.

Shape of the change

One shared profile applies to ordinary builds, Cargo passthrough and metadata-declared device builds.

opt-level        = 3
debug-assertions = on
overflow-checks  = off

Guardrails

  • The option defaults off; cargo oxide test keeps Cargo's selected profile.
  • Device-debug precedence and full-debug mode retain their existing behavior, including combinations with assertions.
  • Ordinary and Cargo passthrough builds apply the profile to host crates in the same Cargo invocation too.

Validation

@forrest-angus

Copy link
Copy Markdown

#1255 Checked against my issue and it works within our pipeline. Thank @uurl for looking at this.
👍

@nihalpasham
nihalpasham force-pushed the feat/1255-debug-assertions branch from 976bab5 to 0c4a62c Compare September 15, 2026 06:05
@nihalpasham nihalpasham added cargo-oxide The `cargo oxide` subcommand and build automation debug info Debug information in generated PTX/IR (line/source maps) enhancement New feature or request maintainer-owned labels Sep 15, 2026

@nihalpasham nihalpasham left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and validated 0c4a62c3: ready after maintainer rebase.

  • Preserved main's device-debug handling while adding the build-only assertion profile.
  • Ordinary, passthrough and metadata device builds share the policy; test profiles remain Cargo-owned.
optimization 3 + assertions on + overflow checks off

All 228 CLI tests, strict Clippy, GPU on/off/full-debug controls across the three routes, and all seven hosted workflows pass. Combined integration with #1244/#1247 also passes. Author/DCO are preserved and both commits are signed.

This completes #1255's implementation.

@nihalpasham
nihalpasham merged commit 6d2b241 into NVIDIA:main Sep 15, 2026
54 checks passed
@uurl
uurl deleted the feat/1255-debug-assertions branch September 16, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cargo-oxide The `cargo oxide` subcommand and build automation debug info Debug information in generated PTX/IR (line/source maps) enhancement New feature or request maintainer-owned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

First party debug flag for cargo oxide build

3 participants