File tree 5 files changed +22
-5
lines changed
devops/scripts/benchmarks
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]:
117
117
if options .sycl is None :
118
118
return []
119
119
120
- if options .ur_adapter == "cuda" :
120
+ if options .ur_adapter == "cuda" or options . ur_adapter == "hip" :
121
121
return []
122
122
123
123
benches = []
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def benchmarks(self) -> list[Benchmark]:
82
82
if options .sycl is None :
83
83
return []
84
84
85
- if options .ur_adapter == "cuda" :
85
+ if options .ur_adapter == "cuda" or options . ur_adapter == "hip" :
86
86
return []
87
87
88
88
return [LlamaBench (self )]
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ def setup(self):
56
56
f"-DCMAKE_CXX_FLAGS=-fsycl -fsycl-targets=nvptx64-nvidia-cuda"
57
57
]
58
58
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
+
59
64
run (configure_command , add_sycl = True )
60
65
run (f"cmake --build { build_path } -j { options .build_jobs } " , add_sycl = True )
61
66
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def benchmarks(self) -> list[Benchmark]:
47
47
if options .sycl is None :
48
48
return []
49
49
50
- if options .ur_adapter == "cuda" :
50
+ if options .ur_adapter == "cuda" or options . ur_adapter == "hip" :
51
51
return [
52
52
Hashtable (self ),
53
53
Bitcracker (self ),
@@ -83,6 +83,11 @@ def download_deps(self):
83
83
def extra_cmake_args (self ) -> list [str ]:
84
84
if options .ur_adapter == "cuda" :
85
85
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
+ ]
86
91
return []
87
92
88
93
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):
454
454
default = options .current_run_name ,
455
455
)
456
456
parser .add_argument (
457
- "--cudnn_directory " ,
457
+ "--cudnn-directory " ,
458
458
type = str ,
459
459
help = "Directory for cudnn library" ,
460
460
default = None ,
461
461
)
462
462
parser .add_argument (
463
- "--cublas_directory " ,
463
+ "--cublas-directory " ,
464
464
type = str ,
465
465
help = "Directory for cublas library" ,
466
466
default = None ,
@@ -484,6 +484,12 @@ def validate_and_parse_env_args(env_args):
484
484
help = "Number of build jobs to run simultaneously" ,
485
485
default = options .build_jobs ,
486
486
)
487
+ parser .add_argument (
488
+ "--hip-arch" ,
489
+ type = str ,
490
+ help = "HIP device architecture" ,
491
+ default = None ,
492
+ )
487
493
488
494
args = parser .parse_args ()
489
495
additional_env_vars = validate_and_parse_env_args (args .env )
@@ -512,6 +518,7 @@ def validate_and_parse_env_args(env_args):
512
518
options .preset = args .preset
513
519
options .custom_results_dir = args .results_dir
514
520
options .build_jobs = args .build_jobs
521
+ options .hip_arch = args .hip_arch
515
522
516
523
if args .build_igc and args .compute_runtime is None :
517
524
parser .error ("--build-igc requires --compute-runtime to be set" )
You can’t perform that action at this time.
0 commit comments