Repository navigation
fix(#231): lower projected reads through place addresses - #249
Merged
nihalpasham merged 1 commit intoJun 18, 2026
Merged
Conversation
pattersonjack
force-pushed
the
fix-231-addressable-place-read
branch
from
June 18, 2026 11:33
86b4d73 to
d086916
Compare
Collaborator
|
Thanks again for the PR. The design looks good i.e. dry-run eligibility check (can't call the address walker speculatively since it emits IR as it goes) along with the hard-error on checker/walker divergence. A few quick notes:
Just a quick follow-up question: if you plan to send the holistic refactor as a separate PR? The piece that makes |
nihalpasham
added a commit
that referenced
this pull request
Jun 18, 2026
…read fix(#231): lower projected reads through place addresses
meefs
pushed a commit
to meefs/cuda-oxide
that referenced
this pull request
Sep 30, 2026
Attribution lives in git history; the Sphinx author becomes the corporate entity, matching the copyright line.
meefs
pushed a commit
to meefs/cuda-oxide
that referenced
this pull request
Sep 30, 2026
…NVIDIA#225, NVIDIA#185) (NVIDIA#256) Three squash merges landed from branches that had resolved a merge against main by keeping pre-merge copies of files, so each one quietly reverted an earlier, unrelated merge: - NVIDIA#239 (2482cb9) reverted NVIDIA#240 (1216aef): the const raw-pointer surface (as_ptr, program_id/num_programs, the cast_* and get_tensor_base helpers, unsafe on load_ptr_tko/store_ptr_tko), the compiler's const-pointer typing, the two GPU test files and the matching book and tutorial text. - NVIDIA#247 (5f5f4c5) reverted NVIDIA#225 (a2843e7): integer division and remainder serialization (rounding<zero> and inferred signedness on divi/remi) and its test. - NVIDIA#187 (35a9cc2) reverted NVIDIA#185 (cbf52c0): the flake.nix toolkit-assembly hardening and host-arch driver directory derivation. This re-applies all three verbatim as cherry-picks. The only overlapping file, cutile-book/guide/performance.md, merges cleanly with NVIDIA#239's own edits. A per-file scan of the last 60 merges finds no other reversal still missing at HEAD: NVIDIA#249's removal of the About page was deliberate, and the two setup-python flips in .github/workflows/pages.yml were re-applied by the later dependabot bump. Verified: cargo fmt, cargo build, and the restored GPU tests (const_pointers, program_id) plus integer_ops, memory_and_atomic_ops and optimization_hints pass on an RTX 5090 with CUDA 13.3. Signed-off-by: Melih Elibol <[email protected]> Co-authored-by: Gabriel Wu <[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.
What
Closes #231.
Projected reads like
scratch[row][col]from an addressable local array were lowered by materializing values at each projection step. For a nested array, that meant loading/copying the whole[4 x [2 x double]]local, indexing into the copy, then loading/copying the[2 x double]row before the final scalar read.Fix
This PR adds a narrow, staged fix: an eligibility check for whether the projected place is representable as a real address, followed by the existing
translate_place_addresswalker and one finalMirLoadOp.The eligibility check is separate from the address walker because the walker emits IR as it goes. Unsupported projections still fall back to the existing value-projection lowering.
This leaves the broader model refactor for a follow-up PR, where place-as-address can become the default for
Copy/Move, value-projection can become the explicit fallback, and fallback cases such as unsupported enum/downcast projections, ZSTs, and computed aggregates with no addressable backing slot can be covered directly.Test plan
cargo test --workspacecargo oxide run projected_place_readcargo oxide run ref_index_projectionscargo oxide build projected_place_read --emit-nvvm-ir --arch sm_100