[GH-ISSUE #6704] [Bug] Hyphenated AMDGPU generic processors lose their bundle target and exact selection #4076

Closed
opened 2026-10-31 00:46:38 +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/6704

Before submitting

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

Area

Native analysis or decompilation

Observed behavior

A HIP bundle explicitly declaring gfx11-generic is inventoried as amdgcn-amd-amdhsa--gfx11-generic with single-source consistency. targets: ["gfx11-generic"] then returns zero kernels and marks the object not-selected, although unfiltered inspection returns its kernel. Filtering by the fallback full note string returns the kernel. The initial matrix observed the same failure for gfx9-4-generic, with gfx1100 working as a control.

Reproduction

From the source checkout with locked dependencies and Node 24.22.1, run this synthetic-fixture probe. Each final selection was inspected once. The generic code-object header uses ABI v6 and generic version 1; no target code executes.

node --import tsx --input-type=module <<'JS'
import { mkdtemp, writeFile, rm } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
import { GpuCodeObjectsProvider } from './src/gpu/GpuCodeObjectsProvider.ts';
import { amdFixture, hipFixture } from './tests/fixtures/gpu/codeObjects.ts';
const dir = await mkdtemp(join(tmpdir(), 'rea-generic-'));
const raw = 'amdgcn-amd-amdhsa--gfx11-generic';
const amd = amdFixture(false, undefined, raw);
amd[8] = 4; // AMDHSA code object v6.
amd.writeUInt32LE(0x01000054, 48); // gfx11-generic, generic version 1.
const path = join(dir, 'bundle');
await writeFile(path, hipFixture(amd, `hipv4-${raw}`));
for (const targets of [undefined, ['gfx11-generic'], [raw]]) {
  const provider = new GpuCodeObjectsProvider();
  const result = await provider.inspect({ path, analysis: 'kernels', targets });
  if (!result.ok) throw result.error;
  const object = result.value.objects.find(x => x.kind === 'amdgpu');
  console.log(JSON.stringify({ selected: targets ?? 'all', target: object.target,
    consistency: object.target_consistency, inspection: object.inspection,
    kernels: result.value.kernels.length }));
  await provider.close();
}
await rm(dir, { recursive: true });
JS

Expected behavior

Retain the bundle's declared processor gfx11-generic for exact selection and compare it with the separately retained note target. REA documents processor retention and exact selection. LLVM's released AMDGPU processor and ELF documentation includes hyphenated gfx11-generic and gfx9-4-generic; the hyphens are part of the processor name.

Impact and scope

Target inventory changes representation for these valid processor spellings and exact processor selection omits a readable kernel. The full-string fallback workaround was directly observed. These were synthetic bundle/metadata declarations, not compiler-produced executable code objects. Other generic processors, CLI/MCP transports, compilers and GPU execution were not tested.

REA version

rea-agents 6.7.0 source revision 8c4f96ef4759fd78da66c4b9726825ca71d7ee0c.

Runtime and platform

Node v24.22.1; Linux x86_64; locked source dependencies. No GPU or external analysis provider.

Target and artifact context

Synthetic Clang HIP bundle containing an ELF64 little-endian EM_AMDGPU object with an AMDGPU type-32 MessagePack note; bundle ID hipv4-amdgcn-amd-amdhsa--gfx11-generic. Repository fixture builders provide the static declarations.

Interface

Other — production GpuCodeObjectsProvider.inspect source API. CLI and MCP transports were not run.

Earliest failure stage

Native analysis or reconstruction

Relevant output or evidence

Observed output from the inline probe:

{"selected":"all","target":"amdgcn-amd-amdhsa--gfx11-generic","consistency":"single-source","inspection":"complete","kernels":1}
{"selected":["gfx11-generic"],"target":"amdgcn-amd-amdhsa--gfx11-generic","consistency":"single-source","inspection":"not-selected","kernels":0}
{"selected":["amdgcn-amd-amdhsa--gfx11-generic"],"target":"amdgcn-amd-amdhsa--gfx11-generic","consistency":"single-source","inspection":"complete","kernels":1}

Typed outcome or recovery expected

The exact gfx11-generic selector should retain the declared kernel, as the gfx1100 control does, while keeping the raw full note target separately.

Analysis or suspected cause

Source-derived: the bundle processor pattern accepts only alphanumeric characters after gfx, so a hyphenated processor becomes null and triggers metadata fallback. The note's comparison-key pattern has the same restriction. The resulting inventory target is the whole raw note string rather than the explicit bundle processor.

Additional context

Open/closed searches for gfx11-generic, gfx9-generic, AMDGPU generic, and generic GPU found no matching report. Related #6613 covers +feature suffixes on older processor spellings; this concerns hyphens inside processor names and persists at the supplied revision. No source changes or external provider checks were made.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: The exact processor filter drops the known readable kernel for the tested generic processor declarations. The failure is bounded and does not mutate input files.
  • Workaround status: available
  • Workaround basis: Filtering with the inventory's full amdgcn-amd-amdhsa--gfx11-generic fallback value returned the kernel in the final observed probe.
Originally created by @coygeek on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6704 ## 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. ## Area Native analysis or decompilation ## Observed behavior A HIP bundle explicitly declaring `gfx11-generic` is inventoried as `amdgcn-amd-amdhsa--gfx11-generic` with `single-source` consistency. `targets: ["gfx11-generic"]` then returns zero kernels and marks the object `not-selected`, although unfiltered inspection returns its kernel. Filtering by the fallback full note string returns the kernel. The initial matrix observed the same failure for `gfx9-4-generic`, with `gfx1100` working as a control. ## Reproduction From the source checkout with locked dependencies and Node 24.22.1, run this synthetic-fixture probe. Each final selection was inspected once. The generic code-object header uses ABI v6 and generic version 1; no target code executes. ```sh node --import tsx --input-type=module <<'JS' import { mkdtemp, writeFile, rm } from 'node:fs/promises'; import { tmpdir } from 'node:os'; import { join } from 'node:path'; import { GpuCodeObjectsProvider } from './src/gpu/GpuCodeObjectsProvider.ts'; import { amdFixture, hipFixture } from './tests/fixtures/gpu/codeObjects.ts'; const dir = await mkdtemp(join(tmpdir(), 'rea-generic-')); const raw = 'amdgcn-amd-amdhsa--gfx11-generic'; const amd = amdFixture(false, undefined, raw); amd[8] = 4; // AMDHSA code object v6. amd.writeUInt32LE(0x01000054, 48); // gfx11-generic, generic version 1. const path = join(dir, 'bundle'); await writeFile(path, hipFixture(amd, `hipv4-${raw}`)); for (const targets of [undefined, ['gfx11-generic'], [raw]]) { const provider = new GpuCodeObjectsProvider(); const result = await provider.inspect({ path, analysis: 'kernels', targets }); if (!result.ok) throw result.error; const object = result.value.objects.find(x => x.kind === 'amdgpu'); console.log(JSON.stringify({ selected: targets ?? 'all', target: object.target, consistency: object.target_consistency, inspection: object.inspection, kernels: result.value.kernels.length })); await provider.close(); } await rm(dir, { recursive: true }); JS ``` ## Expected behavior Retain the bundle's declared processor `gfx11-generic` for exact selection and compare it with the separately retained note target. [REA documents processor retention and exact selection](https://github.com/morluto/rea/blob/8c4f96ef4759fd78da66c4b9726825ca71d7ee0c/docs/gpu-code-objects.md#L41-L50). LLVM's [released AMDGPU processor and ELF documentation](https://releases.llvm.org/20.1.0/docs/AMDGPUUsage.html#processors) includes hyphenated `gfx11-generic` and `gfx9-4-generic`; the hyphens are part of the processor name. ## Impact and scope Target inventory changes representation for these valid processor spellings and exact processor selection omits a readable kernel. The full-string fallback workaround was directly observed. These were synthetic bundle/metadata declarations, not compiler-produced executable code objects. Other generic processors, CLI/MCP transports, compilers and GPU execution were not tested. ## REA version rea-agents 6.7.0 source revision `8c4f96ef4759fd78da66c4b9726825ca71d7ee0c`. ## Runtime and platform Node v24.22.1; Linux x86_64; locked source dependencies. No GPU or external analysis provider. ## Target and artifact context Synthetic Clang HIP bundle containing an ELF64 little-endian EM_AMDGPU object with an AMDGPU type-32 MessagePack note; bundle ID `hipv4-amdgcn-amd-amdhsa--gfx11-generic`. Repository fixture builders provide the static declarations. ## Interface Other — production `GpuCodeObjectsProvider.inspect` source API. CLI and MCP transports were not run. ## Earliest failure stage Native analysis or reconstruction ## Relevant output or evidence Observed output from the inline probe: ```json {"selected":"all","target":"amdgcn-amd-amdhsa--gfx11-generic","consistency":"single-source","inspection":"complete","kernels":1} {"selected":["gfx11-generic"],"target":"amdgcn-amd-amdhsa--gfx11-generic","consistency":"single-source","inspection":"not-selected","kernels":0} {"selected":["amdgcn-amd-amdhsa--gfx11-generic"],"target":"amdgcn-amd-amdhsa--gfx11-generic","consistency":"single-source","inspection":"complete","kernels":1} ``` ## Typed outcome or recovery expected The exact `gfx11-generic` selector should retain the declared kernel, as the `gfx1100` control does, while keeping the raw full note target separately. ## Analysis or suspected cause Source-derived: [the bundle processor pattern accepts only alphanumeric characters after `gfx`](https://github.com/morluto/rea/blob/8c4f96ef4759fd78da66c4b9726825ca71d7ee0c/src/gpu/ClangOffloadBundle.ts#L60-L74), so a hyphenated processor becomes null and triggers metadata fallback. [The note's comparison-key pattern has the same restriction](https://github.com/morluto/rea/blob/8c4f96ef4759fd78da66c4b9726825ca71d7ee0c/src/gpu/GpuElfKernels.ts#L378-L387). The resulting inventory target is the whole raw note string rather than the explicit bundle processor. ## Additional context Open/closed searches for `gfx11-generic`, `gfx9-generic`, `AMDGPU generic`, and `generic GPU` found no matching report. Related #6613 covers `+feature` suffixes on older processor spellings; this concerns hyphens inside processor names and persists at the supplied revision. No source changes or external provider checks were made. ## Triage assessment - Impact level: P2 - Assessment status: supported - Impact basis: The exact processor filter drops the known readable kernel for the tested generic processor declarations. The failure is bounded and does not mutate input files. - Workaround status: available - Workaround basis: Filtering with the inventory's full `amdgcn-amd-amdhsa--gfx11-generic` fallback value returned the kernel in the final observed probe.
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#4076
No description provided.