[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

Michael Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 3 09:32:41 PDT 2019


hliao marked an inline comment as done.
hliao added inline comments.


================
Comment at: clang/lib/Driver/Driver.cpp:2538
+        : CudaActionBuilderBase(C, Args, Inputs, Action::OFK_Cuda) {
+      DefaultCudaArch = CudaArch::SM_20;
+    }
----------------
tra wrote:
> This technically depends on the CUDA version.
> We do have CUDA version info in `clang/lib/Driver/ToolChains/Cuda.h`
> The default for NVCC has been sm_30 since CUDA-9.0.  In fact sm_20 is not supported at all by CUDA-9.0+ at all , so we should bump the default to sm_30 for those versions.
> 
unfortunately, when the action build is running, the CUDA is not detected yet, I probably revise the detection logic to update CUDA's default gpu arch after successful detection


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68394





More information about the cfe-commits mailing list