[llvm] [Offload][AMDGPU] accept generic target (PR #118919)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 6 09:51:38 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)
----------------
hidekisaito wrote:
Yes, this code is called per agent. One potential scenario for having more than one specific ISAs enumerated per agent would be expressing backward compatibility that way. Do we need to provision the code those kinds of scenarios? Given how generic is defined today, I think that would be an overkill. Will upload the revised code.
https://github.com/llvm/llvm-project/pull/118919
More information about the llvm-commits
mailing list