[llvm] [Offload][AMDGPU] accept generic target (PR #118919)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 09:44:51 PST 2024
================
@@ -205,13 +205,16 @@ Expected<std::string> getTargetTripleAndFeatures(hsa_agent_t Agent) {
return Status;
llvm::StringRef TripleTarget(ISAName.begin(), Length);
- if (TripleTarget.consume_front("amdgcn-amd-amdhsa"))
- Target = TripleTarget.ltrim('-').rtrim('\0').str();
- return HSA_STATUS_INFO_BREAK;
+ if (TripleTarget.consume_front("amdgcn-amd-amdhsa")) {
+ auto Target = TripleTarget.ltrim('-').rtrim('\0').str();
+ if (Target.find("generic") != std::string::npos)
+ Targets.push_back(Target);
+ else
+ Targets[0] = Target;
----------------
hidekisaito wrote:
If you are in the camp of "leaving the rest to PluginManager to handle" for the foreseeable future, that would be the case. I'm not in that camp at this point and thus am seeking whether there is a good away to address that soon enough.
https://github.com/llvm/llvm-project/pull/118919
More information about the llvm-commits
mailing list