diff options
author | Justin Lebar <jlebar@google.com> | 2016-01-14 21:41:27 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-01-14 21:41:27 +0000 |
commit | 5001ed56f234095e3f01ac1f2057135efebda3b7 (patch) | |
tree | c3d17b2ff4c80ad8a12dd3d1f55ed87f770be137 /lib/Driver/Action.cpp | |
parent | 9c0291cdff2e9a819b7ecf0ffdfd63cd29d0a2c6 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Action.cpp')
-rw-r--r-- | lib/Driver/Action.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/Action.cpp b/lib/Driver/Action.cpp index e9490e96db..b45f290efc 100644 --- a/lib/Driver/Action.cpp +++ b/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 { |