File tree Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Expand file tree Collapse file tree 3 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 1- // FIXME: the rocm include path and link path are highly platform dependent,
2- // we should set this with some variable instead.
3- // https://github.com/intel/llvm/issues/17018
4-
5- // RUN: %{run-aux} %{build} -Wno-error=deprecated-pragma -o %t.out -I%rocm_path/include -L%rocm_path/lib -lamdhip64
1+ // RUN: %{build} -Wno-error=deprecated-pragma -o %t.out -I%rocm_path/include -L%rocm_path/lib -lamdhip64
62// RUN: %{run} %t.out
73// REQUIRES: target-amd
84
Original file line number Diff line number Diff line change 1- // FIXME: the rocm include path and link path are highly platform dependent,
2- // we should set this with some variable instead.
3- // https://github.com/intel/llvm/issues/17018
4-
5- // RUN: %{run-aux} %{build} -Wno-error=deprecated-pragma -Wno-error=deprecated-declarations -o %t.out -I%rocm_path/include -L%rocm_path/lib -lamdhip64
1+ // RUN: %{build} -Wno-error=deprecated-pragma -Wno-error=deprecated-declarations -o %t.out -I%rocm_path/include -L%rocm_path/lib -lamdhip64
62// RUN: %{run} %t.out
73// REQUIRES: target-amd
84
Original file line number Diff line number Diff line change @@ -577,6 +577,13 @@ def open_check_file(file_name):
577577 if be not in available_devices or dev not in available_devices [be ]:
578578 lit_config .error ("Unsupported device {}" .format (d ))
579579
580+ # Set ROCM_PATH to help clang find the HIP installation.
581+ if "target-amd" in config .sycl_build_targets :
582+ llvm_config .with_system_environment ("ROCM_PATH" )
583+ config .substitutions .append (
584+ ("%rocm_path" , os .environ .get ("ROCM_PATH" , "/opt/rocm" ))
585+ )
586+
580587if "cuda:gpu" in config .sycl_devices :
581588 if "CUDA_PATH" not in os .environ :
582589 if platform .system () == "Windows" :
@@ -898,10 +905,6 @@ def open_check_file(file_name):
898905 "Cannot detect architecture for AMD HIP device, specify it explicitly"
899906 )
900907 config .amd_arch = arch .replace (amd_arch_prefix , "" )
901- llvm_config .with_system_environment ("ROCM_PATH" )
902- config .substitutions .append (
903- ("%rocm_path" , os .environ .get ("ROCM_PATH" , "/opt/rocm" ))
904- )
905908
906909 config .sycl_dev_features [sycl_device ] = features .union (config .available_features )
907910 if is_intel_driver :
You can’t perform that action at this time.
0 commit comments