Repository navigation
build: backport the shared-pointer call-argument cast - #811
juliankang4 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Verdict: MUST_FIX: The PR leaves the required old-pin preservation tag pending.
Must fix
1. Publish the old compiler pin tag (kind B)
Cargo.toml:49 advances the fork revision. The base contract, AGENTS.md:221, requires a preservation tag before the fork branch moves. The PR's “Before merge” section says the author could not create pin/87bc9518 and leaves it for a maintainer. The old commit's branch reachability does not fulfill the tag requirement.
Cost: Preserve the rollback revision now, while the old commit is still reachable.
Fix: A maintainer must run these commands in a midagedev/cuda-oxide checkout before merging this PR:
git tag pin/87bc9518 87bc951864b79f723b4da9c11fa229f5600aefcb
git push https://github.com/midagedev/cuda-oxide.git refs/tags/pin/87bc9518Non-blocking
⚠ Attach the PTX comparison output: Cargo.toml:49 changes the compiler for every kernel. Base AGENTS.md:223 requires identical generate_ds41 and gate_e2e PTX tables for a fork patch that must preserve codegen. The body reports an earlier 87bc9518 → 10cdbef7 comparison but supplies no scan commands or tables.
Paste the commands and identical --no-jit tables for the old and new pins, or the earlier logs plus the compiler source diff supporting reuse at 466ee160. This makes the claimed proof reviewable without repeating the build.
Checked
Duplicates: 0 new definitions; dryer reported 0 pairs.
Complexity: crapper reported no changed function crossing its thresholds; no function bodies changed.
Silent failure: 0 changed sites; Rust source outside doc comments is unchanged.
Tests: none added or changed; no mutation check applies. Compiler FAIL-first is reported in the body.
Gates: no numerical thresholds, test cases or lint levels changed.
Pins: all three patch entries and build instructions agree; nightly and architecture flags are unchanged. Existing backend and CLI guards reject stale installations.
Escape catalog: no C1–C4 patterns matched the diff.
Notes
No builds or GPU gates were run during this review. The compiler implementation and PTX comparison output are absent from the supplied trees.
Card check: gpu-evidence. This pull request changes crates/gpu/src/flash_gqa_prefill.rs and carries a gate run on the author's card, which counts as verified.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
shared 메모리 포인터를 Rust 함수에 넘길 때 생기는 컴파일 오류를 고친 cuda-oxide pin을 사용합니다.
Part of #495.
Before merge
AGENTS.mdasks for apin/87bc9518tag onmidagedev/cuda-oxidebefore the pin moves. My account can only read that repository, so I could not add it. The old commit is still reachable as the parent of466ee160onbloomery. A maintainer can add the tag with:What and why
Move the cuda-oxide source pin to midagedev/cuda-oxide#3 (merged as
466ee160) onmidagedev/cuda-oxide:bloomery, backported from NVIDIA/cuda-rust927d462e(#1598). The importer converts an address-space-only difference at the call boundary, so a shared raw pointer can reach a helper's generic-pointer parameter. It preserves the existing pointee, mutability and pointer-kind checks.Keep all compiler patches on
midagedev/cuda-oxide. The lockfile, notices, build instructions and upstream ledger use the same merged source pin. Ledger row 38 now lists the affected pins and the merged fix in one place, and the duplicate row 51 is gone.The only Rust change here is comments in
crates/gpu/src/flash_gqa_prefill.rs. They no longer say that a shared pointer cannot be passed to a helper function. Moving the q8 staging into a helper changes those kernels' PTX, sodequant_row!andzero_row!stay macros, and the comments give that reason.Release notes: Under the hood: the cuda-oxide pin adapts shared-memory pointer arguments at ordinary device helper calls; generated PTX is unchanged.
Code shape
cargo fmtandcargo clippyare clean on what I touched. Only comments changed in Rust; fmt and clippy were not run here.Duplication found or removed: none.
What I ran
On a DGX Spark, installed
cargo-oxidefromhttps://github.com/midagedev/cuda-oxide.gitat466ee1605a65936df4a49ceb3b6870f5b911a60dinto an emptyCARGO_HOME, then built and ran:466ee160from the maintainer repository, and the build succeeded.Cargo.lockstayed unchanged during the build and gate checks.gate-gpu-nvfp4:gpu-gate.sh: gate_nvfp4 ran 14 s (exit 0). The dense and routed numerical, bit-identity and refusal checks passed.On that machine
nvidia-smireported:No model file is needed; the gate uses synthetic tensors.
Not run here
The earlier DGX Spark comparison at source pins
87bc9518and10cdbef7built the same binaries and found identicalgenerate_ds41andgate_e2ePTX tables and normalized entry digests. Those scans include ptxas resource columns, not driver JIT columns (--no-jit). This pin move reuses that comparison:466ee160differs from10cdbef7only in the examples workflow and documentation, including a helper doc comment.The compiler backport's regression check builds the existing local and dependency helper examples at both source pins. Both fail with the callee-signature mismatch at
87bc9518; both build and pass their GPU data/barrier checks at10cdbef7. The direct control and the existing pointer-normalization unit tests also pass.I also tried moving the q8 staging into a helper function on the same compiler pin. The
generate_ds41scan then differed for two q8 entries:gqa_prefill_flash_q8went from 252 to 249 registers and from 3706 to 3692 normalized PTX lines, andgqa_prefill_flash_256_q8from 4132 to 4120 lines. That change is not in this PR, and I make no speed or bit-identity claim for it.The gate and build above ran on Bloomery commit
6015f3db0. The final head differs from it only in Rust comments and the ledger, so I did not rerun them. Fullcontrib-checkand the complete GPU suite were not run here.Hardware
DGX Spark, NVIDIA GB10, aarch64 Linux. The pinned toolchain is
nightly-2026-08-28(rustc 1.100.0-nightly e457a7b0d). Thenvidia-smilines are above.AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.