Repository navigation
test(mir-lower): Add representative unit tests for MIR cast lowering - #302
Merged
Merged
Conversation
Signed-off-by: Raul Estrada <[email protected]>
Signed-off-by: nihalp <[email protected]>
nihalpasham
force-pushed
the
test/mir-cast-lowering
branch
from
June 29, 2026 10:29
219b84a to
bcd22e5
Compare
8 tasks done
Collaborator
|
Thanks for the PR. I see the cast matrix is well chosen. I layered a maintainer assertion on top that proves the saturation call directly targets |
meefs
pushed a commit
to meefs/cuda-oxide
that referenced
this pull request
Sep 30, 2026
…submissions (NVIDIA#302) Per launch, each tensor argument cost two heap allocations (an Arc<()> access id and a Box<dyn Send> owner); access ids are now u64 counters and leases are stored inline in the submission. Graph replays walked every recorded context and re-registered every recorded resource; the recorded resources are now frozen and deduplicated by storage at capture time, and a replay reacquires each distinct buffer once. Lifetime and cross-stream conflict semantics are unchanged: every in-flight access is still registered on its storage and released when the submission completes. Host-only enqueue cost (RTX 5090, benches/host_overhead): tiny 4-tensor launch 1.954 -> 1.884 us (pre-NVIDIA#275: 1.640) 32-node graph replay 14.68 -> 1.67 us (pre-NVIDIA#275: 1.139) Signed-off-by: Melih Elibol <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #301
Part of #303.
Summary
Adds six representative tests for existing MIR cast lowering. The tests build
minimal MIR functions, run the normal
lower_mir_to_llvmpass, and inspect theselected LLVM operations.
What changed
llvm.sext.llvm.zext.llvm.trunc.llvm.uitofp.llvm_fptosi_sat_i32_f32.llvm.ptrtoint.Maintainer hardening
The saturation test now connects the emitted call to its declaration by
requiring a direct callee named
llvm_fptosi_sat_i32_f32. This prevents anunrelated call plus an unused correct declaration from passing.
Testing
cargo fmt --all -- --checkcargo test -p mir-lower cast::tests --libcargo test -p mir-lowercargo clippy --workspace -- -D warningsChecklist
crates/cuda-bindings/changes