yaxunl added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:286
+
+    // FIXME: Should this use the default mode based on the target? How do we
+    // deal with multiple --cuda-gpu-arch?
----------------
If there are multiple --cuda-gpu-arch, driver will create separate JobAction 
for launching separate `clang -cc1` command for each arch. This function is 
called for each JobAction and  getOffloadingArch contains the single arch. 
Therefore there is no issue for multiple --cuda-gpu-arch and this comment can 
be removed.


================
Comment at: clang/test/Driver/cuda-flush-denormals-to-zero.cu:27
+// Test multiple offload archs with different defaults.
+// RUN: %clang -x hip -no-canonical-prefixes -### -target x86_64-linux-gnu -c 
-march=haswell --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 -nocudainc 
-nogpulib %s 2>&1 | FileCheck -check-prefix=MIXED-DEFAULT-MODE %s
+// RUN: %clang -x hip -no-canonical-prefixes -### -target x86_64-linux-gnu -c 
-march=haswell -fcuda-flush-denormals-to-zero --cuda-gpu-arch=gfx803 
--cuda-gpu-arch=gfx900 -nocudainc -nogpulib %s 2>&1 | FileCheck 
-check-prefix=FTZX2 %s
----------------
this will result in multiple clang -cc1 commands, each one corresponding to an 
arch. You need to check each arch.


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

https://reviews.llvm.org/D78019



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to