[PATCH] D101630: [HIP] Fix device-only compilation

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 4 09:57:09 PDT 2021


tra added a comment.

In D101630#2798975 <https://reviews.llvm.org/D101630#2798975>, @yaxunl wrote:

> For sure we will need -fgpu-bundle-device-output to control bundling of intermediate files. Then adding -emit-gpu-object and -emit-gpu-bundle may be redundant and can cause confusion. What if users specify `-c -fgpu-bundle-device-output -emit-gpu-object` or `-c -fno-gpu-bundle-device-output -emit-gpu-bundle`? To me a single option -fgpu-bundle-device-output to control all device output seems cleaner.

The idea is to use `-emit-gpu-object` and `-emit-gpu-bundle` instead of the  `-f[no-]gpu-bundle-device-output`. Otherwise they'd do exactly the same thing.

I think `-emit-gpu-{object,bundle}` has a minor edge over `-f[no-]gpu-bundle-device-output` as it's similar to other -emit options for controlling clang compilation phases (and that's what we want to do here), while `-f` options are usually for tweaking code generation.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101630/new/

https://reviews.llvm.org/D101630



More information about the cfe-commits mailing list