yaxunl added a comment.

In https://reviews.llvm.org/D52377#1242547, @tra wrote:

> 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.


Agree that --fgpu-rdc and -fno-gpu-rdc are better names of the options. I will 
make changes to use these options.

For the default option, we will use -fno-gpu-rdc to be consistent with 
cuda-clang.


https://reviews.llvm.org/D52377



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to