[PATCH] Preliminary driver changes to build and stitch together host and device-side CUDA compilation pipelines.

Eric Christopher echristo at gmail.com
Sun Mar 22 20:44:03 PDT 2015


Were we going to abandon this one in favor of the write up you're doing or
is this something else?

-eric

On Thu, Mar 19, 2015 at 2:28 PM Artem Belevich <tra at google.com> wrote:

> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150323/a2285743/attachment.html>


More information about the cfe-commits mailing list