[Openmp-commits] [PATCH] D127769: [Libomptarget] Add checks for AMDGPU TargetID using new image info
Saiyedul Islam via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jun 14 23:52:48 PDT 2022
saiislam added a comment.
In D127769#3583335 <https://reviews.llvm.org/D127769#3583335>, @JonChesterfield wrote:
> The control flow here is quite complicated and it's not immediately obvious why things are being stashed in a map. I vaguely recall the rules for choosing compatible images by target ID being complicated and undocumented.
>
> Did you reverse engineer this from the HIP implementation, or is there now documentation for how the +/-/any stuff is meant to resolve?
I implemented and documented the compatibility checking approach last year. Here is our complete documentation and implementation in the downstream. <https://github.com/RadeonOpenCompute/llvm-project/commit/e7a2fd29a0371cf14e41706135e0968f9edac25d>
Upstream reviewers at that time suggested to split TargetID specific checking to a separate patch, hence only a subset of checks were documented <https://github.com/llvm/llvm-project/commit/ee31ad0ab5f7d443b0bd582582a3524dcf7f13f0> and implemented <https://github.com/llvm/llvm-project/commit/f7ce532d622dc26eddd25f87faec0ff35dc0c2e9> in upstream.
Implementation in this patch is exact application of my above patches.
`target-feature` subsection in this doc <https://clang.llvm.org/docs/ClangOffloadBundler.html#target-id> nicely explains the allowed interactions between On/Off/Any settings of target features and forms the basis of this compatibility checking algorithm.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127769/new/
https://reviews.llvm.org/D127769
More information about the Openmp-commits
mailing list