[PATCH] D16082: [CUDA] Invoke ptxas and fatbinary during compilation.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 13:20:13 PST 2016


jlebar created this revision.
jlebar added reviewers: tra, echristo.
jlebar added subscribers: jhen, cfe-commits.

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.

http://reviews.llvm.org/D16082

Files:
  include/clang/Driver/Action.h
  include/clang/Driver/Options.td
  include/clang/Driver/Types.def
  lib/CodeGen/CGCUDANV.cpp
  lib/Driver/Action.cpp
  lib/Driver/Driver.cpp
  lib/Driver/ToolChains.cpp
  lib/Driver/ToolChains.h
  lib/Driver/Tools.cpp
  lib/Driver/Tools.h
  lib/Driver/Types.cpp
  test/Driver/Inputs/CUDA/usr/local/cuda/bin/.keep
  test/Driver/cuda-external-tools.cu
  test/Driver/cuda-options.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16082.44543.patch
Type: text/x-patch
Size: 22501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160111/a46646c7/attachment-0001.bin>


More information about the cfe-commits mailing list