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

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 12:35:43 PST 2024


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

`SmallString` is std::string with a template argument for the size of the SSO buffer. I would recommend we choose a number we expect to always fit the string so we don't need to malloc it.

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


More information about the llvm-commits mailing list