This revision was automatically updated to reflect the committed changes.
Closed by commit rL373634: [HIP] Enable specifying different default gpu arch
for HIP/CUDA. (authored by hliao, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to
tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/Driver/Driver.cpp:2538
+: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_Cuda) {
+ DefaultCudaArch = CudaArch::SM_20;
+}
yaxunl added inline comments.
Comment at: clang/lib/Driver/Driver.cpp:2655
+: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) {
+ DefaultCudaArch = CudaArch::GFX600;
+}
hliao wrote:
> Sam, could you let me know which reasonable default
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
tra added inline comments.
Comment at: clang/lib/Driver/Driver.cpp:2538
+: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_Cuda) {
+ DefaultCudaArch = CudaArch::SM_20;
+}
This technically depends on the CUDA version.
We do have CUDA version
hliao marked an inline comment as done.
hliao added inline comments.
Comment at: clang/lib/Driver/Driver.cpp:2655
+: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) {
+ DefaultCudaArch = CudaArch::GFX600;
+}
Sam, could you let me know
hliao created this revision.
hliao added reviewers: tra, yaxunl.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D68394
Files:
clang/lib/Driver/Driver.cpp
clang/test/Driver/hip-default-gpu-arch.hip