[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-04-12 Thread Harald van Dijk via Phabricator via cfe-commits
hvdijk added a comment.

In D140315#4077611 , @scchan wrote:

> In D140315#4076614 , @mgorny wrote:
>
>> I'm sorry for reporting it this late (clang's been broken for over two 
>> weeks, so we couldn't periodically test it) but this change is causing test 
>> regressions on Gentoo/amd64:
>
> Thanks for reporting the issue.  I'm working on a patch to fix the test.

I don't think it's actually the test that was at fault, it doesn't look right 
that this diff uses `CLANG_INSTALL_LIBDIR_BASENAME` for an unrelated purpose to 
determining the basename of the libdir, especially considering the comments 
continue to say clang looks in `lib/amdgcn/bitcode` rather than 
`/amdgcn/bitcode`, and your original test specifically assumed that it 
would always be `lib`. Should the code perhaps just be updated to hardcode 
`"lib"` as it did before?

Either way, the test can still fail after D142506 
, `CLANG_INSTALL_LIBDIR_BASENAME` may be any 
arbitrary string and cannot be assumed to be either `lib` or `lib64`. With 
Debian-style multiarch I have `CLANG_INSTALL_LIBDIR=lib/x86_64-linux-gnu`, so 
after updating from Clang 15 to Clang 16 I am now also seeing this test fail.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

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


[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-24 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan added a comment.

In D140315#4076614 , @mgorny wrote:

> I'm sorry for reporting it this late (clang's been broken for over two weeks, 
> so we couldn't periodically test it) but this change is causing test 
> regressions on Gentoo/amd64:

Thanks for reporting the issue.  I'm working on a patch to fix the test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

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


[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments.



Comment at: clang/test/Driver/hip-device-libs.hip:206
+
+// RESDIR-SAME: "-mlink-builtin-bitcode" 
"[[DEVICELIB_DIR:[^"]+(/|)rocm_resource_dir(/|)lib(/|)amdgcn(/|).*]]hip.bc"
+// ROCMDIR-SAME: "-mlink-builtin-bitcode" 
"[[DEVICELIB_DIR:[^"]+(/|)rocm(/|)amdgcn(/|).*]]hip.bc"

this might be fixed by (lib|lib64)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

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


[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-24 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment.

In D140315#4077193 , @yaxunl wrote:

> @scchan the test expects CLANG_INSTALL_LIBDIR_BASENAME to be `lib`. Maybe in 
> the failed test it was not true.

`CMAKE_INSTALL_LIBDIR=lib64`, so I guess `_BASENAME` is that as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

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


[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment.

@scchan the test expects CLANG_INSTALL_LIBDIR_BASENAME to be `lib`. Maybe in 
the failed test it was not true.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

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


[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-24 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment.

I'm sorry for reporting it this late (clang's been broken for over two weeks, 
so we couldn't periodically test it) but this change is causing test 
regressions on Gentoo/amd64:

  FAIL: Clang :: Driver/hip-device-libs.hip (9304 of 17486)
   TEST 'Clang :: Driver/hip-device-libs.hip' FAILED 

  [...]
  + : 'RUN: at line 92'
  + 
/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/x/y/clang-abi_x86_64.amd64/bin/clang
 -### --target=x86_64-linux-gnu --offload-arch=gfx803 -nogpuinc 
-resource-dir=/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/Inputs/rocm_resource_dir
 
/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/Inputs/hip_multiple_inputs/b.hip
  + /usr/lib/llvm/16/bin/FileCheck 
/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/hip-device-libs.hip
 --check-prefixes=ALL,FLUSHD,RESDIR
  
/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/hip-device-libs.hip:203:13:
 error: ALL-NOT: excluded string found in input
  // ALL-NOT: error:
  ^
  :5:11: note: found here
  clang-16: error: cannot find ROCm device library; provide its path via 
'--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without 
ROCm device library
^~
  
  Input file: 
  Check file: 
/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/hip-device-libs.hip
  
  -dump-input=help explains the following input dump.
  
  Input was:
  <<
   1: clang version 16.0.0 
   2: Target: x86_64-unknown-linux-gnu 
   3: Thread model: posix 
   4: InstalledDir: 
/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/x/y/clang-abi_x86_64.amd64/bin
 
   5: clang-16: error: cannot find ROCm device library; provide its 
path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to 
build without ROCm device library 
  not:203   !~  

  error: no match expected
   6:  
"/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/x/y/clang-abi_x86_64.amd64/bin/clang-16"
 "-cc1" "-triple" "amdgcn-amd-amdhsa" "-aux-triple" "x86_64-unknown-linux-gnu" 
"-emit-obj" "-mrelax-all" "-disable-free" "-clear-ast-before-backend" 
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "b.hip" 
"-mrelocation-model" "pic" "-pic-level" "1" "-fhalf-no-semantic-interposition" 
"-mframe-pointer=all" "-fdenormal-fp-math-f32=preserve-sign,preserve-sign" 
"-fno-rounding-math" "-mconstructor-aliases" "-aux-target-cpu" "x86-64" 
"-fcuda-is-device" "-mllvm" "-amdgpu-internalize-symbols" 
"-fcuda-allow-variadic-functions" "-fvisibility=hidden" 
"-fapply-global-visibility-to-externs" "-target-cpu" "gfx803" "-mllvm" 
"-treat-scalable-fixed-error-as-warning" "-debugger-tuning=gdb" "-resource-dir" 
"/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/Inputs/rocm_resource_dir"
 "-internal-isystem" 
"/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/Inputs/rocm_resource_dir"
 "-internal-isystem" "/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12" 
"-internal-isystem" 
"/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/x86_64-pc-linux-gnu" 
"-internal-isystem" 
"/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/backward" 
"-internal-isystem" "/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12" 
"-internal-isystem" 
"/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/x86_64-pc-linux-gnu" 
"-internal-isystem" 
"/usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/backward" 
"-internal-isystem" 
"/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/Inputs/rocm_resource_dir/include"
 "-internal-isystem" "/usr/local/include" "-internal-isystem" 
"/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/include" 
"-internal-externc-isystem" "/include" "-internal-externc-isystem" 
"/usr/include" "-internal-isystem" 
"/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/clang/test/Driver/Inputs/rocm_resource_dir/include"
 "-internal-isystem" "/usr/local/include" "-internal-isystem" 
"/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/include" 
"-internal-externc-isystem" "/include" "-internal-externc-isystem" 
"/usr/include" "-fdeprecated-macro" "-fno-autolink" 
"-fdebug-compilation-dir=/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/work/x/y/clang-abi_x86_64.amd64/test/Driver"
 "-ferror-limit" "19" "-fhip-new-launch-api" "-fgnuc-version=4.2.1" 
"-fcxx-exceptions" "-fexceptions" "-cuid=baca1261ad77b3c1" 
"-fcuda-allow-variadic-functions" "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=1" 
"-o" 
"/var/tmp/portage/sys-devel/clang-16.0.0_pre20230124/temp/b-aed965/b-gfx803.o" 
"-x" "hip" 

[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-11 Thread Siu Chi Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa18fe67b9fcf: [AMDGCN] Update search path for device 
libraries (authored by scchan).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

Files:
  clang/lib/Driver/ToolChains/AMDGPU.cpp
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/asanrtl.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/hip.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/ockl.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_abi_version_400.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_abi_version_500.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_daz_opt_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_daz_opt_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_finite_only_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_finite_only_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1010.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1011.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1012.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_803.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_900.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_908.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_unsafe_math_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_unsafe_math_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_wavefrontsize64_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_wavefrontsize64_on.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/ocml.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/opencl.bc
  clang/test/Driver/hip-device-libs.hip

Index: clang/test/Driver/hip-device-libs.hip
===
--- clang/test/Driver/hip-device-libs.hip
+++ clang/test/Driver/hip-device-libs.hip
@@ -9,7 +9,7 @@
 // RUN:  --cuda-gpu-arch=gfx803 \
 // RUN:  --rocm-path=%S/Inputs/rocm   \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD,ROCMDIR
 
 
 // Test subtarget with flushing off by ddefault.
@@ -17,7 +17,7 @@
 // RUN:  --cuda-gpu-arch=gfx900 \
 // RUN:  --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD,ROCMDIR
 
 
 // Test explicit flag, opposite of target default.
@@ -26,7 +26,7 @@
 // RUN:   -fgpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD,ROCMDIR
 
 
 // Test explicit flag, opposite of target default.
@@ -35,7 +35,7 @@
 // RUN:   -fno-gpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD,ROCMDIR
 
 
 // Test explicit flag, same as target default.
@@ -44,7 +44,7 @@
 // RUN:   -fno-gpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD,ROCMDIR
 
 
 // Test explicit flag, same as target default.
@@ -53,7 +53,7 @@
 // RUN:   -fgpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD,ROCMDIR
 
 
 // Test last flag wins, not flushing
@@ -62,7 +62,7 @@
 // RUN:   -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD,ROCMDIR
 
 
 // RUN: %clang -### --target=x86_64-linux-gnu \
@@ -70,7 +70,7 @@
 // RUN:   -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \
 // 

[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-10 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision.
yaxunl added a comment.
This revision is now accepted and ready to land.

LGTM. Thanks.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

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


[PATCH] D140315: [AMDGCN] Update search path for device libraries

2022-12-22 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan added a comment.

In D140315#4011440 , @yaxunl wrote:

> files under 
> clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver seem 
> not used.

removed


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

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


[PATCH] D140315: [AMDGCN] Update search path for device libraries

2022-12-22 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan updated this revision to Diff 484945.
scchan added a comment.

Remove unused bitcode files


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

Files:
  clang/lib/Driver/ToolChains/AMDGPU.cpp
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/asanrtl.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/hip.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/ockl.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_abi_version_400.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_abi_version_500.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_daz_opt_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_daz_opt_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_finite_only_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_finite_only_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1010.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1011.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1012.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_803.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_900.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_908.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_unsafe_math_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_unsafe_math_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_wavefrontsize64_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_wavefrontsize64_on.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/ocml.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/opencl.bc
  clang/test/Driver/hip-device-libs.hip

Index: clang/test/Driver/hip-device-libs.hip
===
--- clang/test/Driver/hip-device-libs.hip
+++ clang/test/Driver/hip-device-libs.hip
@@ -9,7 +9,7 @@
 // RUN:  --cuda-gpu-arch=gfx803 \
 // RUN:  --rocm-path=%S/Inputs/rocm   \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD,ROCMDIR
 
 
 // Test subtarget with flushing off by ddefault.
@@ -17,7 +17,7 @@
 // RUN:  --cuda-gpu-arch=gfx900 \
 // RUN:  --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD,ROCMDIR
 
 
 // Test explicit flag, opposite of target default.
@@ -26,7 +26,7 @@
 // RUN:   -fgpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD,ROCMDIR
 
 
 // Test explicit flag, opposite of target default.
@@ -35,7 +35,7 @@
 // RUN:   -fno-gpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD,ROCMDIR
 
 
 // Test explicit flag, same as target default.
@@ -44,7 +44,7 @@
 // RUN:   -fno-gpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD,ROCMDIR
 
 
 // Test explicit flag, same as target default.
@@ -53,7 +53,7 @@
 // RUN:   -fgpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,FLUSHD,ROCMDIR
 
 
 // Test last flag wins, not flushing
@@ -62,7 +62,7 @@
 // RUN:   -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip \
-// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD
+// RUN: 2>&1 | FileCheck %s --check-prefixes=ALL,NOFLUSHD,ROCMDIR
 
 
 // RUN: %clang -### --target=x86_64-linux-gnu \
@@ -70,7 +70,7 @@
 // RUN:   -fgpu-flush-denormals-to-zero -fno-gpu-flush-denormals-to-zero \
 // RUN:   --rocm-path=%S/Inputs/rocm   \
 // RUN:   

[PATCH] D140315: [AMDGCN] Update search path for device libraries

2022-12-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment.

files under 
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver seem 
not used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140315

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


[PATCH] D140315: [AMDGCN] Update search path for device libraries

2022-12-19 Thread Siu Chi Chan via Phabricator via cfe-commits
scchan created this revision.
scchan added a reviewer: yaxunl.
Herald added subscribers: kosarev, kerbowa, jvesely.
Herald added a project: All.
scchan requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

- Add support for finding device libraries in new ROCm directory

structure

- Simplify and remove the handling of legacy ROCm directory structure

Change-Id: I04da3bc9da85ced4b56b0225efb6b94448b8c5a1


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140315

Files:
  clang/lib/Driver/ToolChains/AMDGPU.cpp
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/asanrtl.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/hip.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/ockl.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_correctly_rounded_sqrt_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_daz_opt_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_daz_opt_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_finite_only_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_finite_only_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_isa_version_1010.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_isa_version_1011.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_isa_version_1012.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_isa_version_803.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_isa_version_900.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_isa_version_908.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_unsafe_math_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_unsafe_math_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_wavefrontsize64_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/oclc_wavefrontsize64_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/ocml.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode-no-abi-ver/opencl.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/asanrtl.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/hip.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/ockl.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_abi_version_400.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_abi_version_500.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_correctly_rounded_sqrt_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_daz_opt_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_daz_opt_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_finite_only_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_finite_only_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1010.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1011.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_1012.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_803.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_900.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_isa_version_908.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_unsafe_math_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_unsafe_math_on.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_wavefrontsize64_off.bc
  
clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/oclc_wavefrontsize64_on.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/ocml.bc
  clang/test/Driver/Inputs/rocm_resource_dir/lib/amdgcn/bitcode/opencl.bc
  clang/test/Driver/hip-device-libs.hip

Index: clang/test/Driver/hip-device-libs.hip
===
--- clang/test/Driver/hip-device-libs.hip
+++ clang/test/Driver/hip-device-libs.hip
@@ -9,7 +9,7 @@
 // RUN:  --cuda-gpu-arch=gfx803 \
 // RUN:  --rocm-path=%S/Inputs/rocm   \
 // RUN:   %S/Inputs/hip_multiple_inputs/b.hip