jhuber6 wrote:
```
std::string OffloadTargetInfo::str() const {
std::string NormalizedTriple;
// Unfortunately we need some special sauce for AMDHSA because all the
runtime
// assumes the triple to be "amdgcn/spirv64-amd-amdhsa-" (empty environment)
// instead of "amdgcn/spirv64-amd-amdhsa-unknown". It's gonna be very tricky
// to patch different layers of runtime.
if (Triple.getOS() == Triple::OSType::AMDHSA) {
NormalizedTriple = Triple.normalize(Triple::CanonicalForm::THREE_IDENT);
NormalizedTriple.push_back('-');
} else {
NormalizedTriple = Triple.normalize(Triple::CanonicalForm::FOUR_IDENT);
}
return Twine(OffloadKind + "-" + NormalizedTriple + "-" + TargetID).str();
}
```
We already hack around this non-stop. I honestly think the proper solution is
to start deprecating offload bundles wholesale. I'd prefer not to need to work
around what our toolchain already hacks around to get the same effect, the
`-llvm` triple is meaningless to the runtime.
https://github.com/llvm/llvm-project/pull/214841
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits