[PATCH] Preliminary driver changes to build and stitch together host and device-side CUDA compilation pipelines.
Artem Belevich
tra at google.com
Thu Mar 19 14:28:38 PDT 2015
Hi eliben, echristo,
These are preliminary driver changes to build and combine host and device-side CUDA code.
Current patch relies on external ptxwrap tool (http://reviews.llvm.org/D8397) to generate glue
code for incorporation of device-side PTX into host-side object file. This part will be replaced.
Basic flow for CUDA compilation:
- create new InputAction(TY_CUDA_DEVICE, input.cu) for each unique --gpu-architecture <GPU> flag
- run BuildActions() on them
- for each action chain, create CudaDeviceAction to associate it with the <GPU> parameter.
During BuildJobsForActions CudaDeviceAction is handles similarly to BindArchAction -- it picks device-specific
toolchain and then proceeds with BuildJobsForActions() for the rest of the action chain.
CudaHostAction adds flags to include device-side outputs and proceeds with BuildJobsForActions() normally otherwise.
Added a test to verify driver pipeline construction.
Depends on: http://reviews.llvm.org/D8397 (ptxwrap tool).
http://reviews.llvm.org/D8463
Files:
include/clang/Driver/Action.h
include/clang/Driver/Driver.h
include/clang/Driver/Options.td
include/clang/Driver/Types.def
include/clang/Driver/Types.h
lib/Driver/Action.cpp
lib/Driver/Driver.cpp
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
lib/Driver/Tools.cpp
lib/Driver/Tools.h
lib/Driver/Types.cpp
test/Driver/cuda-options.cu
test/Index/attributes-cuda.cu
tools/libclang/CIndex.cpp
unittests/ASTMatchers/ASTMatchersTest.h
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8463.22301.patch
Type: text/x-patch
Size: 35676 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150319/3b5f711c/attachment.bin>
More information about the cfe-commits
mailing list