File tree Expand file tree Collapse file tree 5 files changed +22
-5
lines changed
devops/scripts/benchmarks Expand file tree Collapse file tree 5 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ def benchmarks(self) -> list[Benchmark]:
117117 if options .sycl is None :
118118 return []
119119
120- if options .ur_adapter == "cuda" :
120+ if options .ur_adapter == "cuda" or options . ur_adapter == "hip" :
121121 return []
122122
123123 benches = []
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def benchmarks(self) -> list[Benchmark]:
8282 if options .sycl is None :
8383 return []
8484
85- if options .ur_adapter == "cuda" :
85+ if options .ur_adapter == "cuda" or options . ur_adapter == "hip" :
8686 return []
8787
8888 return [LlamaBench (self )]
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ def setup(self):
5656 f"-DCMAKE_CXX_FLAGS=-fsycl -fsycl-targets=nvptx64-nvidia-cuda"
5757 ]
5858
59+ if options .ur_adapter == "hip" :
60+ configure_command += [
61+ f"-DCMAKE_CXX_FLAGS=-fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch={ options .hip_arch } "
62+ ]
63+
5964 run (configure_command , add_sycl = True )
6065 run (f"cmake --build { build_path } -j { options .build_jobs } " , add_sycl = True )
6166
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def benchmarks(self) -> list[Benchmark]:
4747 if options .sycl is None :
4848 return []
4949
50- if options .ur_adapter == "cuda" :
50+ if options .ur_adapter == "cuda" or options . ur_adapter == "hip" :
5151 return [
5252 Hashtable (self ),
5353 Bitcracker (self ),
@@ -83,6 +83,11 @@ def download_deps(self):
8383 def extra_cmake_args (self ) -> list [str ]:
8484 if options .ur_adapter == "cuda" :
8585 return [f"-DUSE_NVIDIA_BACKEND=YES" , f"-DUSE_SM=80" ]
86+ if options .ur_adapter == "hip" :
87+ return [
88+ f"-DUSE_AMD_BACKEND=YES" ,
89+ f"-DUSE_AMDHIP_BACKEND={ options .hip_arch } " ,
90+ ]
8691 return []
8792
8893 def ld_libraries (self ) -> list [str ]:
Original file line number Diff line number Diff line change @@ -454,13 +454,13 @@ def validate_and_parse_env_args(env_args):
454454 default = options .current_run_name ,
455455 )
456456 parser .add_argument (
457- "--cudnn_directory " ,
457+ "--cudnn-directory " ,
458458 type = str ,
459459 help = "Directory for cudnn library" ,
460460 default = None ,
461461 )
462462 parser .add_argument (
463- "--cublas_directory " ,
463+ "--cublas-directory " ,
464464 type = str ,
465465 help = "Directory for cublas library" ,
466466 default = None ,
@@ -484,6 +484,12 @@ def validate_and_parse_env_args(env_args):
484484 help = "Number of build jobs to run simultaneously" ,
485485 default = options .build_jobs ,
486486 )
487+ parser .add_argument (
488+ "--hip-arch" ,
489+ type = str ,
490+ help = "HIP device architecture" ,
491+ default = None ,
492+ )
487493
488494 args = parser .parse_args ()
489495 additional_env_vars = validate_and_parse_env_args (args .env )
@@ -512,6 +518,7 @@ def validate_and_parse_env_args(env_args):
512518 options .preset = args .preset
513519 options .custom_results_dir = args .results_dir
514520 options .build_jobs = args .build_jobs
521+ options .hip_arch = args .hip_arch
515522
516523 if args .build_igc and args .compute_runtime is None :
517524 parser .error ("--build-igc requires --compute-runtime to be set" )
You can’t perform that action at this time.
0 commit comments