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

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 24 08:37:12 PDT 2021


yaxunl marked an inline comment as done.
yaxunl added a comment.

In D101630#2748513 <https://reviews.llvm.org/D101630#2748513>, @tra wrote:

> How about this:
> If the user explicitly specified `--cuda-host-only` or `--cuda-device-only`, then by default only allow producing the natural output format, unless a bundled output is requested by an option. This should keep existing users working.
> If the compilation is done without explicitly requested sub-compilation(s), then bundle the output by default. This should keep the GPU-unaware tools like ccache happy as they would always get the single output they expect.
>
> WDYT?

`--cuda-host-only` always have one output, therefore there is no point of bundle its output. We only need to decide the proper behavior of `--cuda-device-only`.

How about keeping the original default behavior of not bundling if users do not specify output file, whereas bundle the output if users specifying output file. Since specifying output file indicates users requesting one output. -f[no-]hip-bundle-device-output override the default behavior.


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

https://reviews.llvm.org/D101630



More information about the cfe-commits mailing list