[Mlir-commits] [mlir] [mlir][Target] Support Fatbin target for static nvptxcompiler (PR #118044)

Christian Ulmann llvmlistbot at llvm.org
Fri Nov 29 01:24:13 PST 2024


================
@@ -486,6 +498,11 @@ NVPTXSerializer::compileToBinaryNVPTX(const std::string &ptxCode) {
       targetOptions.tokenizeCmdOptions();
   cmdOpts.second.append(
       {"-arch", getTarget().getChip().data(), "--opt-level", optLevel.c_str()});
+  bool useFatbin32 = false;
+  for (const char *option : cmdOpts.second) {
+    if (StringRef(option) == "-32")
+      useFatbin32 = true;
+  }
----------------
Dinistro wrote:

Nit: Use `llvm::any_of` 

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


More information about the Mlir-commits mailing list