Skip to content

Cubin cache rejects valid CUDA-specific ELF versions #388

Closed as not planned

Description

@niklebedenko

Cubin cache rejects valid CUDA-specific ELF versions

Problem

The LTOIR cubin cache only accepts ELF files whose e_version field is the
generic EV_CURRENT value (1). Cubins produced by nvJitLink use non-zero
CUDA-specific values such as 0x73 and 0x80, so otherwise valid cubins are
treated as uncacheable and every load rebuilds them.

Why this matters

The cache silently loses its primary benefit for real nvJitLink output even
though its integrity checks, content digest, and ELF table bounds are valid.
Repeated process launches therefore pay the full NVVM and nvJitLink cost.

Expected behavior

The validator should accept non-zero CUDA ELF versions while retaining the
existing CUDA machine, ELF class, endianness, file type, header-size, and table
bounds checks. The invalid zero version must remain rejected.

Acceptance criteria

  • Cubins using EV_CURRENT remain accepted.
  • Observed CUDA-specific versions such as 0x73 and 0x80 are accepted.
  • Version zero, truncated headers, and out-of-bounds ELF tables remain rejected.

Activity

  1. nihalpasham commented on Jul 23, 2026

    @nihalpasham
    Collaborator

    Closing as not reproducible. Every cubin we can produce or find carries ELF version 1 at offset 0x14: fresh nvcc 13.0/13.3 output across sm_75/sm_90/sm_100, all 49 cubins in the tree, and the nvJitLink-produced entries the LTOIR cache stores (their existence on disk also shows the cache accepts and stores nvJitLink output on unmodified main). The reported 0x73/0x80 values match the section/program header table offset bytes (e_shoff/e_phoff) of a real cubin, which sit a couple of hexdump rows below e_version, so this looks like a misread header dump. Current main additionally hard-gates every nvJitLink link on the same validator, which would fail loudly on every run if the claim were true. Happy to reopen if a real cubin with readelf -h showing Version != 0x1 turns up, together with the toolkit and command that produced it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions