[PATCH] D20405: [CUDA] allow sm_50,52,53 GPUs
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Wed May 18 17:16:49 PDT 2016
tra created this revision.
tra added a reviewer: jlebar.
tra added a subscriber: cfe-commits.
LLVM accepts them since r233575.
http://reviews.llvm.org/D20405
Files:
lib/Basic/Targets.cpp
lib/Driver/ToolChains.cpp
test/CodeGen/nvptx-cpus.c
Index: test/CodeGen/nvptx-cpus.c
===================================================================
--- test/CodeGen/nvptx-cpus.c
+++ test/CodeGen/nvptx-cpus.c
@@ -3,6 +3,9 @@
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_30 -O3 -S -o %t %s -emit-llvm
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_35 -O3 -S -o %t %s -emit-llvm
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_37 -O3 -S -o %t %s -emit-llvm
+// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_50 -O3 -S -o %t %s -emit-llvm
+// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_52 -O3 -S -o %t %s -emit-llvm
+// RUN: %clang_cc1 -triple nvptx-unknown-unknown -target-cpu sm_53 -O3 -S -o %t %s -emit-llvm
// Make sure clang accepts all supported architectures.
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp
+++ lib/Driver/ToolChains.cpp
@@ -1750,6 +1750,10 @@
} else if (GpuArch == "compute_35") {
CudaLibDeviceMap["sm_35"] = FilePath;
CudaLibDeviceMap["sm_37"] = FilePath;
+ } else if (GpuArch == "compute_50") {
+ CudaLibDeviceMap["sm_50"] = FilePath;
+ CudaLibDeviceMap["sm_52"] = FilePath;
+ CudaLibDeviceMap["sm_53"] = FilePath;
}
}
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -1689,6 +1689,9 @@
GK_SM30,
GK_SM35,
GK_SM37,
+ GK_SM50,
+ GK_SM52,
+ GK_SM53,
} GPU;
public:
@@ -1787,6 +1790,15 @@
case GK_SM37:
CUDAArchCode = "370";
break;
+ case GK_SM50:
+ CUDAArchCode = "500";
+ break;
+ case GK_SM52:
+ CUDAArchCode = "520";
+ break;
+ case GK_SM53:
+ CUDAArchCode = "530";
+ break;
default:
llvm_unreachable("Unhandled target CPU");
}
@@ -1836,6 +1848,9 @@
.Case("sm_30", GK_SM30)
.Case("sm_35", GK_SM35)
.Case("sm_37", GK_SM37)
+ .Case("sm_50", GK_SM50)
+ .Case("sm_52", GK_SM52)
+ .Case("sm_53", GK_SM53)
.Default(GK_NONE);
return GPU != GK_NONE;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20405.57715.patch
Type: text/x-patch
Size: 2302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160519/f42c4e83/attachment.bin>
More information about the cfe-commits
mailing list