[llvm] [Offload][AMDGPU] accept generic target (PR #118919)

via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 21:40:19 PST 2024


================
@@ -190,8 +190,9 @@ Error asyncMemCopy(bool UseMultipleSdmaEngines, void *Dst, hsa_agent_t DstAgent,
 #endif
 }
 
-Expected<std::string> getTargetTripleAndFeatures(hsa_agent_t Agent) {
-  std::string Target;
+Expected<StringRef>
+getTargetTripleAndFeatures(hsa_agent_t Agent, SmallVector<StringRef> &Targets) {
+  StringRef SpecificTarget;
----------------
hidekisaito wrote:

If you really hate to see it and make it gate landing the patch, I can remove it. As I wrote upfront, I'd like to ensure actual code execution to prioritize specific ISA over generic ones, and thus knowing which is the specific ISA is the starting point in doing so.  Also, it helps in marking XNACK enabled w/o iterating over all ISAs one more time. So, it's not like that is totally useless code. Here, I'm assuming that specific ISA is a superset of generic ISAs. Let me know if that's not the case.

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


More information about the llvm-commits mailing list