[PATCH] D20405: [CUDA] allow sm_50,52,53 GPUs
Artem Belevich via cfe-commits
cfe-commits at lists.llvm.org
Thu May 19 10:54:12 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL270084: [CUDA] Allow sm_50,52,53 GPUs (authored by tra).
Changed prior to commit:
http://reviews.llvm.org/D20405?vs=57715&id=57822#toc
Repository:
rL LLVM
http://reviews.llvm.org/D20405
Files:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/test/CodeGen/nvptx-cpus.c
Index: cfe/trunk/lib/Driver/ToolChains.cpp
===================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp
+++ cfe/trunk/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: cfe/trunk/lib/Basic/Targets.cpp
===================================================================
--- cfe/trunk/lib/Basic/Targets.cpp
+++ cfe/trunk/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;
Index: cfe/trunk/test/CodeGen/nvptx-cpus.c
===================================================================
--- cfe/trunk/test/CodeGen/nvptx-cpus.c
+++ cfe/trunk/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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20405.57822.patch
Type: text/x-patch
Size: 2392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160519/61e25aec/attachment.bin>
More information about the cfe-commits
mailing list