[GH-ISSUE #6494] [Bug] Standalone PTX with a valid compute_80 target alias is rejected as unsupported #3895

Closed
opened 2026-10-31 00:45:02 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @coygeek on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6494

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

The open issue and PR inventories and targeted live searches across open and closed issues found no matching open bug report. The related CUDA feature issue does not describe this trigger.

Area

Native analysis or decompilation

Observed behavior

The static GPU CLI rejects a standalone PTX 7.0 file whose target is the documented compute_80 synonym for sm_80. It exits 1 with unsupported_target and the reason No supported CUDA/HIP container or PTX declarations were identified. An otherwise identical sm_80 control passes and returns kernel k with complete discovery and payload coverage.

Reproduction

Executed once per input during initial discovery using the reported source build. The launcher was Node executing scripts/rea.mjs; REA_CHECKOUT below denotes that checkout. Run from a disposable directory containing the fixtures.

  1. Create compute-target.ptx with these exact UTF-8 contents, including the final newline:
.version 7.0
.target compute_80
.address_size 64
.visible .entry k() { ret; }
  1. Invoke the source CLI with these arguments:
node "$REA_CHECKOUT/scripts/rea.mjs" inspect-gpu-code-objects compute-target.ptx --analysis kernels --detail complete --json
  1. Observe the error fields below. For the executed control, create entry-empty-params.ptx with identical contents except .target sm_80, then invoke the same arguments with that filename. The control exits 0, reports format: "ptx", complete discovery and payload coverage, and kernel k.

Expected behavior

Recognize the standalone file as PTX and retain kernel k; a documented target synonym should not make the artifact unrecognizable. NVIDIA's PTX ISA 7.0 .target notes permit compute_xx target names as synonyms for sm_xx and list sm_80 as introduced in PTX 7.0. REA documents standalone PTX inspection, and its input-preservation contract requires caller-selected inputs and evidence to survive interpretation.

Impact and scope

The observed effect is complete refusal of this valid 78-byte standalone PTX input, so no GPU Evidence or kernel declarations are returned. One failing invocation and one passing control were executed. Replacing the target with its sm_80 synonym in a disposable copy allows the same declaration analysis, as the control demonstrated, but changes source bytes, target spelling, and digest. Other compute_xx spellings, inventory-only calls, embedded PTX, and MCP were not executed.

REA version

6.7.0; source revision c106cf20cbfcec8e1fcd953ad8e52bdfbf8c3f9c. The built source launcher's --version printed 6.7.0.

Runtime and platform

Node.js v24.18.0; Linux x86_64. The static GPU reader was used. No CUDA assembler, GPU runtime, Hopper, or Ghidra was invoked. Home, configuration, cache, and temporary directories were isolated for the fixture probes.

Target and artifact context

Synthetic standalone UTF-8 PTX 7.0, target compute_80, 64-bit address size, one kernel with an explicit empty parameter list. Fixture size: 78 bytes.

Interface

CLI

Earliest failure stage

Native analysis or reconstruction

Relevant output or evidence

Observed error fields, with the path-bearing message and unrelated fields omitted:

{
  "code": "unsupported_target",
  "details": {
    "operation": "inspect_gpu_code_objects",
    "reason": "No supported CUDA/HIP container or PTX declarations were identified"
  }
}

Exit status was 1 and stderr was empty. The sm_80 control exited 0 and returned format: "ptx", coverage.discovery: "complete", coverage.payloads: "complete", and a kernel named k.

  • Expected source: The linked NVIDIA PTX 7.0 target-synonym notes and REA's standalone PTX inspection documentation above.
  • Failure source: The initial CLI observations above; target recognition also admits only strings beginning with sm_.
  • Evidence provenance: observed. The target-recognition diagnosis is separately source-derived.
  • Local verification: reproduced.
  • Reproduction completeness: complete.

The public CLI dispatch reaches the static GPU reader. Standalone recognition calls the restricted target parser and throws the observed unsupported-format reason when it returns null. The fixture uses k(), so the optional-entry-parameter defect is not involved.

Typed outcome or recovery expected

Return ordinary GPU Evidence with the original PTX retained and kernel k available. Proposed restoration check: this exact compute_80 fixture must be recognized and yield the same kernel facts as the sm_80 control, while preserving its original text and declared target spelling in source evidence. Both supported spellings must continue to work.

Analysis or suspected cause

Source-derived: readPtxTarget requires a token matching ^sm_[0-9]+[a-z]?$. The lexer supplies compute_80 intact, but that predicate rejects it; standalone discovery consequently treats the whole file as an unsupported artifact. A target alias cannot be recovered later because admission stops before payload parsing.

Additional context

The fixture's validity is grounded in NVIDIA's PTX 7.0 specification, not a CUDA compilation or execution test. CUDA feature proposal #3674 mentions target tags but does not report this implemented reader's synonym rejection; no comment or redundant report was added there. NOT_ENOUGH_INFO: the last known good release and first affected release were not investigated.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: The supported static PTX inspection command refuses a small valid artifact solely because its documented target uses a synonym; the otherwise identical canonical-spelling control succeeds.
  • Workaround status: available
  • Workaround basis: Replacing compute_80 with its documented sm_80 synonym in a disposable copy matches the executed passing control. This permits declaration analysis when a copy is acceptable, but changes the artifact digest and declared spelling.
Originally created by @coygeek on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6494 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. The open issue and PR inventories and targeted live searches across open and closed issues found no matching open bug report. The related CUDA feature issue does not describe this trigger. ### Area Native analysis or decompilation ### Observed behavior The static GPU CLI rejects a standalone PTX 7.0 file whose target is the documented `compute_80` synonym for `sm_80`. It exits 1 with `unsupported_target` and the reason `No supported CUDA/HIP container or PTX declarations were identified`. An otherwise identical `sm_80` control passes and returns kernel `k` with complete discovery and payload coverage. ### Reproduction Executed once per input during initial discovery using the reported source build. The launcher was Node executing `scripts/rea.mjs`; `REA_CHECKOUT` below denotes that checkout. Run from a disposable directory containing the fixtures. 1. Create `compute-target.ptx` with these exact UTF-8 contents, including the final newline: ```ptx .version 7.0 .target compute_80 .address_size 64 .visible .entry k() { ret; } ``` 2. Invoke the source CLI with these arguments: ```sh node "$REA_CHECKOUT/scripts/rea.mjs" inspect-gpu-code-objects compute-target.ptx --analysis kernels --detail complete --json ``` 3. Observe the error fields below. For the executed control, create `entry-empty-params.ptx` with identical contents except `.target sm_80`, then invoke the same arguments with that filename. The control exits 0, reports `format: "ptx"`, complete discovery and payload coverage, and kernel `k`. ### Expected behavior Recognize the standalone file as PTX and retain kernel `k`; a documented target synonym should not make the artifact unrecognizable. NVIDIA's [PTX ISA 7.0 `.target` notes](https://docs.nvidia.com/cuda/archive/11.0/parallel-thread-execution/index.html#ptx-module-directives-target) permit `compute_xx` target names as synonyms for `sm_xx` and list `sm_80` as introduced in PTX 7.0. REA documents [standalone PTX inspection](https://github.com/morluto/rea/blob/c106cf20cbfcec8e1fcd953ad8e52bdfbf8c3f9c/docs/gpu-code-objects.md#L3-L7), and its [input-preservation contract](https://github.com/morluto/rea/blob/c106cf20cbfcec8e1fcd953ad8e52bdfbf8c3f9c/AGENTS.md#L13) requires caller-selected inputs and evidence to survive interpretation. ### Impact and scope The observed effect is complete refusal of this valid 78-byte standalone PTX input, so no GPU Evidence or kernel declarations are returned. One failing invocation and one passing control were executed. Replacing the target with its `sm_80` synonym in a disposable copy allows the same declaration analysis, as the control demonstrated, but changes source bytes, target spelling, and digest. Other `compute_xx` spellings, inventory-only calls, embedded PTX, and MCP were not executed. ### REA version 6.7.0; source revision `c106cf20cbfcec8e1fcd953ad8e52bdfbf8c3f9c`. The built source launcher's `--version` printed `6.7.0`. ### Runtime and platform Node.js v24.18.0; Linux x86_64. The static GPU reader was used. No CUDA assembler, GPU runtime, Hopper, or Ghidra was invoked. Home, configuration, cache, and temporary directories were isolated for the fixture probes. ### Target and artifact context Synthetic standalone UTF-8 PTX 7.0, target `compute_80`, 64-bit address size, one kernel with an explicit empty parameter list. Fixture size: 78 bytes. ### Interface CLI ### Earliest failure stage Native analysis or reconstruction ### Relevant output or evidence Observed error fields, with the path-bearing message and unrelated fields omitted: ```json { "code": "unsupported_target", "details": { "operation": "inspect_gpu_code_objects", "reason": "No supported CUDA/HIP container or PTX declarations were identified" } } ``` Exit status was 1 and stderr was empty. The `sm_80` control exited 0 and returned `format: "ptx"`, `coverage.discovery: "complete"`, `coverage.payloads: "complete"`, and a kernel named `k`. - Expected source: The linked NVIDIA PTX 7.0 target-synonym notes and REA's standalone PTX inspection documentation above. - Failure source: The initial CLI observations above; [target recognition](https://github.com/morluto/rea/blob/c106cf20cbfcec8e1fcd953ad8e52bdfbf8c3f9c/src/gpu/PtxKernels.ts#L379-L390) also admits only strings beginning with `sm_`. - Evidence provenance: observed. The target-recognition diagnosis is separately source-derived. - Local verification: reproduced. - Reproduction completeness: complete. The [public CLI dispatch](https://github.com/morluto/rea/blob/c106cf20cbfcec8e1fcd953ad8e52bdfbf8c3f9c/src/cli/gpuCommands.ts#L98-L117) reaches the static GPU reader. [Standalone recognition](https://github.com/morluto/rea/blob/c106cf20cbfcec8e1fcd953ad8e52bdfbf8c3f9c/src/gpu/GpuInventory.ts#L228-L263) calls the restricted target parser and throws the observed unsupported-format reason when it returns null. The fixture uses `k()`, so the optional-entry-parameter defect is not involved. ### Typed outcome or recovery expected Return ordinary GPU Evidence with the original PTX retained and kernel `k` available. Proposed restoration check: this exact `compute_80` fixture must be recognized and yield the same kernel facts as the `sm_80` control, while preserving its original text and declared target spelling in source evidence. Both supported spellings must continue to work. ### Analysis or suspected cause Source-derived: [readPtxTarget](https://github.com/morluto/rea/blob/c106cf20cbfcec8e1fcd953ad8e52bdfbf8c3f9c/src/gpu/PtxKernels.ts#L383-L390) requires a token matching `^sm_[0-9]+[a-z]?$`. The lexer supplies `compute_80` intact, but that predicate rejects it; standalone discovery consequently treats the whole file as an unsupported artifact. A target alias cannot be recovered later because admission stops before payload parsing. ### Additional context The fixture's validity is grounded in NVIDIA's PTX 7.0 specification, not a CUDA compilation or execution test. [CUDA feature proposal #3674](https://github.com/morluto/rea/issues/3674) mentions target tags but does not report this implemented reader's synonym rejection; no comment or redundant report was added there. NOT_ENOUGH_INFO: the last known good release and first affected release were not investigated. ## Triage assessment - Impact level: P2 - Assessment status: supported - Impact basis: The supported static PTX inspection command refuses a small valid artifact solely because its documented target uses a synonym; the otherwise identical canonical-spelling control succeeds. - Workaround status: available - Workaround basis: Replacing `compute_80` with its documented `sm_80` synonym in a disposable copy matches the executed passing control. This permits declaration analysis when a copy is acceptable, but changes the artifact digest and declared spelling.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3895
No description provided.