From 5001ed56f234095e3f01ac1f2057135efebda3b7 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Thu, 14 Jan 2016 21:41:27 +0000 Subject: [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 --- lib/Driver/Action.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Driver/Action.cpp') 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 { -- cgit v1.2.3