Skip to content

Commit 5fc8472

Browse files
authored
[SYCL][E2E] Use ROCM_PATH from the system environment (#18468)
For ROCm installations that aren't just in `/opt/rocm`, `clang` uses `ROCM_PATH` at runtime to find the ROCm device libraries, and this is done even in regular SYCL compilation. So this is needed for lit tests in certain configurations. This was accidentally removed in #17692 it doesn't cause any issues in the CI because the CI has ROCm installed in the standard `/opt/rocm`, but it causes issues on local setups. Also remove `--rocm-path` on Windows, this should be covered by `ROCM_PATH`.
1 parent 5372698 commit 5fc8472

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sycl/test-e2e/lit.cfg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,10 @@ def open_check_file(file_name):
541541
else:
542542
config.substitutions.append(("%hip_options", ""))
543543

544+
# Add ROCM_PATH from system environment, this is used by clang to find ROCm
545+
# libraries in non-standard installation locations.
546+
llvm_config.with_system_environment("ROCM_PATH")
547+
544548
# Check for OpenCL ICD
545549
if config.opencl_libs_dir:
546550
config.opencl_libs_dir = quote_path(config.opencl_libs_dir)

0 commit comments

Comments
 (0)