================
@@ -1,13 +1,15 @@
 // Check CUID generated by hash.
 // The same CUID is generated for the same file with the same options.
 
+// RUN: cd %S
+
 // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu 
--no-offload-new-driver \
 // RUN:   --offload-arch=gfx906 -c -nogpuinc -nogpulib -fuse-cuid=hash \
-// RUN:   %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1
----------------
yxsamliu wrote:

CUID generated by hashing not only hashes file path, but also original options 
passed to clang driver. This is to differentiate the situation that one file is 
compiled with different options to generate different object files (e.g. rccl). 
Therefore, adding `--offload-host-only` will change the CUID generated by 
hashing.

This lit test compares the CUID generated by hashing for host and device and 
makes sure they are the same. We just do not check the literal value of the 
CUID since it is affected by platform-specific options. If we use `-cuid=`, the 
CUID will be the specified value and not generated by hashing.

https://github.com/llvm/llvm-project/pull/111885
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to