summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Action.cpp
diff options
context:
space:
mode:
authorJustin Lebar <jlebar@google.com>2016-01-14 21:41:27 +0000
committerJustin Lebar <jlebar@google.com>2016-01-14 21:41:27 +0000
commit21e5d4fcfa4c8a2a198a968af5b7db1884b801b9 (patch)
tree678dba0dd9353eac0609f6eaaf55c43dbb6fc3cc /clang/lib/Driver/Action.cpp
parentb44f6fed4da5bc1d2983887f6ac933dd90f5c854 (diff)
downloadbcm5719-llvm-21e5d4fcfa4c8a2a198a968af5b7db1884b801b9.tar.gz
bcm5719-llvm-21e5d4fcfa4c8a2a198a968af5b7db1884b801b9.zip
[CUDA] Invoke ptxas and fatbinary during compilation.
Summary: Previously we compiled CUDA device code to PTX assembly and embedded that asm as text in our host binary. Now we compile to PTX assembly and then invoke ptxas to assemble the PTX into a cubin file. We gather the ptx and cubin files for each of our --cuda-gpu-archs and combine them using fatbinary, and then embed that into the host binary. Adds two new command-line flags, -Xcuda_ptxas and -Xcuda_fatbinary, which pass args down to the external tools. Reviewers: tra, echristo Subscribers: cfe-commits, jhen Differential Revision: http://reviews.llvm.org/D16082 llvm-svn: 257809
Diffstat (limited to 'clang/lib/Driver/Action.cpp')
-rw-r--r--clang/lib/Driver/Action.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/Action.cpp b/clang/lib/Driver/Action.cpp
index e9490e96db8..b45f290efc1 100644
--- a/clang/lib/Driver/Action.cpp
+++ b/clang/lib/Driver/Action.cpp
@@ -75,7 +75,7 @@ CudaDeviceAction::CudaDeviceAction(Action *Input, const char *ArchName,
bool AtTopLevel)
: Action(CudaDeviceClass, Input), GpuArchName(ArchName),
AtTopLevel(AtTopLevel) {
- assert(IsValidGpuArchName(GpuArchName));
+ assert(!GpuArchName || IsValidGpuArchName(GpuArchName));
}
const char *CudaDeviceAction::getComputeArchName() const {
OpenPOWER on IntegriCloud