[llvm] [AMDGPU] Generalize generic-target numeric property validation (PR #223177)

Chinmay Deshpande via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 12 18:09:52 PDT 2026


chinmaydd wrote:

I hear you. But `!listremove` can help remove conflicting features within one GPU’s feature list, but it doesnt really solve compatibility between a generic target and its covered GPUs.

For instance,

```
 Target            Addressable LDS size    LDS allocation granularity
━━━━━━━━━━━━━━━━  ━━━━━━━━━━━━━━━━━━━━━━  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 gfx942                          64 KiB                     512 bytes
────────────────  ──────────────────────  ────────────────────────────
 gfx950                         160 KiB                    1280 bytes
────────────────  ──────────────────────  ────────────────────────────
 gfx9-4-generic                  64 KiB                    1280 bytes
```

The old validator required every frontend-visible feature on the generic target to appear as the exact same feature record on every covered GPU. It therefore rejected the generics `FeatureLDSAllocGranularity1280` when checking gfx942, which has `FeatureLDSAllocGranularity512`.

We need the validator to understand the intended numeric relationships:

- Addressable LDS size: generic value <= each covered GPU’s value.
- Allocation granularity: generic value >= each covered GPU’s value.

And these two examples do indicate that the generic - specialized subtarget numeric relationships dont necessarily go one way.

https://github.com/llvm/llvm-project/pull/223177


More information about the llvm-commits mailing list