[PATCH] D139045: [HIP] support --offload-arch=native

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 12 14:37:22 PST 2022


tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Driver/Driver.cpp:3058
       // Collect all offload arch parameters, removing duplicates.
+      const StringRef NativeArchStr = "native";
       std::set<StringRef> GpuArchs;
----------------
Nit: It's used only once. May as well compare with "native" directly.


================
Comment at: clang/lib/Driver/Driver.cpp:3076
+            SmallVector<std::string, 1> GPUs;
+            auto Err = TC->detectSystemGPUs(Args, GPUs);
+            if (!Err) {
----------------
Does it guarantee that a returned list of architectures contains only canonical names?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139045/new/

https://reviews.llvm.org/D139045



More information about the cfe-commits mailing list