[PATCH] D52377: [HIP] Support early finalization of device code

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 21 14:02:31 PDT 2018


tra added a comment.

Overall the patch look OK. I'll take a closer look on Monday.

Which mode do you expect will be most commonly used for HIP by default? With this patch we'll have two different ways to do similar things in HIP vs. CUDA.
E.g. by default CUDA compiles GPU code in each TU in a complete executable and requires -fcuda-rdc to compile to GPU object file.
HIP defaults to object-file compilation and requires --hip-early-finalize to match CUDA's default behavior.

I wonder if it would make sense to provide a single way to control this behavior. E.g. `--fgpu-rdc` (an alias for -cuda-rdc, perhaps?) would default to true in HIP, but disabled in CUDA. `-fno-gpu-rdc` would force 'whole GPU executable per TU' mode.


https://reviews.llvm.org/D52377





More information about the cfe-commits mailing list