[PATCH] Preliminary driver changes to build and stitch together host and device-side CUDA compilation pipelines.
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).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 35676 bytes
Desc: not available
More information about the cfe-commits