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
6
2
// RUN: %{run} %t.out
7
3
// REQUIRES: target-amd
8
4
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
6
2
// RUN: %{run} %t.out
7
3
// REQUIRES: target-amd
8
4
Original file line number Diff line number Diff line change @@ -577,6 +577,13 @@ def open_check_file(file_name):
577
577
if be not in available_devices or dev not in available_devices [be ]:
578
578
lit_config .error ("Unsupported device {}" .format (d ))
579
579
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
+
580
587
if "cuda:gpu" in config .sycl_devices :
581
588
if "CUDA_PATH" not in os .environ :
582
589
if platform .system () == "Windows" :
@@ -898,10 +905,6 @@ def open_check_file(file_name):
898
905
"Cannot detect architecture for AMD HIP device, specify it explicitly"
899
906
)
900
907
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
- )
905
908
906
909
config .sycl_dev_features [sycl_device ] = features .union (config .available_features )
907
910
if is_intel_driver :
You can’t perform that action at this time.
0 commit comments