Repository navigation
fix(cuda-host): accept CUDA-specific cubin ELF versions - #389
Closed
niklebedenko wants to merge 1 commit into
Closed
niklebedenko wants to merge 1 commit into
niklebedenko wants to merge 1 commit into
Conversation
Signed-off-by: nik <[email protected]>
niklebedenko
marked this pull request as draft
July 12, 2026 23:41
niklebedenko
marked this pull request as ready for review
July 12, 2026 23:55
Collaborator
|
Thanks @niklebedenko — caching correctness matters, but after a full forensic pass I can't accept this change, because the premise doesn't hold up:
Accepting any non-zero version would weaken a fail-closed corruption check to fix a bug we can't reproduce. If you have an actual cubin whose |
This was referenced Aug 1, 2026
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 #388.
Summary
The cubin cache rejected genuine nvJitLink output because it treated generic
ELF
EV_CURRENTas the only valid CUDA ELF version. This accepts CUDA'snon-zero version encodings while preserving the validator's structural and
content-integrity checks.
Before: valid cubins with observed CUDA versions such as
0x73and0x80were rebuilt instead of cached. After: those cubins are cacheable, while zero
and malformed ELF inputs remain rejected.
What changed
CUDA ELF version validation
looks_like_cubinnow accepts any non-zeroe_versionafter identifying a64-bit, little-endian
ET_EXECfile forEM_CUDA.1remains valid, and zero remains an explicit invalidvalue.
Validation boundaries
rejection, table bounds, and file-backed segment/section bounds checks are
unchanged.
mainspecifically at thee_version = 0x80assertion.Known separate limitations
every cached artifact.
eviction behavior.
bounds checks succeed.
Testing
cargo fmt --all -- --checkcargo test -p cuda-host cubin_validation -- --nocapturecargo test -p cuda-host --all-targets(61 passed, 1 ignored; integrationsuites: 9 passed and 13 passed)
cargo clippy -p cuda-host --all-targets -- -D warningscargo test -p cuda-host ltoir::tests::live_file_cache_hits_and_source_changes_miss -- --exact --ignored --nocapture1,0x73, and0x80, explicit rejection ofzero, and retained truncated-header and out-of-bounds-table assertions.
main, the focused regression failed at the expectedcubin-validation assertion with
e_version = 0x80; it passes on this branch.Checklist
main.mainand passes on this branch.