[Openmp-commits] [openmp] [OpenMP][AMDGPU] Adapt dynamic callstack sizes to HIP behavior (PR #74080)

Michael Halkenhäuser via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 4 11:21:52 PST 2024


mhalk wrote:

When starting to actually try and implement this, I came to the conclusion that when adding such a 'SubtargetFeature' it would really just duplicate `GCNSubtarget::getMaxWaveScratchSize`.
(IMHO this does not seem like a desirable / acceptable solution when looking at the former discussion.)

On top of that, TBH I only see `bool` features that may be queried via `TargetParser` but we want to encode an `unsigned` value. (So, if that is in fact a desired solution: how would one create such an unsigned feature?)

If we would really want to avoid duplication IMO (maybe I'm wrong) we would have to either:
 * Use `GCNSubtarget::getMaxWaveScratchSize` (somehow?) at the particular location within the OpenMP amdgpu plugin (I have the Triple available, so theoretically I have the information I need).
 * Encode an `unsigned` value which holds the `MaxWaveScratchSize` and can be queried via `TargetParser` at both locations where this info is needed (OpenMP amdgpu plugin and GCNSubtarget class).

Any suggestions or ideas are very welcome & appreciated.

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


More information about the Openmp-commits mailing list