yaxunl added inline comments.

================
Comment at: clang/test/Driver/hip-output-file-name.hip:13-15
+// RUN: %clang -### -E -target x86_64-linux-gnu \
+// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
+// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s
----------------
tra wrote:
> What does it mean for `-E` to be used when we compile for host and multiple 
> devices. I believe for CUDA clang errors out unless there's only one 
> sub-compilation. What does HIP do when it's run with `-E -o -` ?
> 
> Looks like CUDA (and, maybe HIP, too) has a bug there. `-E` will run 
> preprocess on all subcompilations. `-E -o -` will error out claiming that you 
> can't use `-o` for multiple output files, even though `-###` shows the same 
> `-o -` in all subcompilations in both cases.
> 
> 
> 
> 
HIP will emit a clang-offload-bundler file in textual format. Clang is able to 
consume this file by unbundling it. I think ccache uses it to generate a hash 
to check if a file and its dependent header files have changed. Since this 
bundled file is in text format, ccache is able to use it to generate a hash 
which covers both host dependence and device dependence.


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

https://reviews.llvm.org/D88730

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

Reply via email to