File tree 5 files changed +18
-3
lines changed
devops/scripts/benchmarks
5 files changed +18
-3
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 @@ -468,6 +468,10 @@ def validate_and_parse_env_args(env_args):
468
468
type = int ,
469
469
help = "Number of build jobs to run simultaneously" ,
470
470
default = options .build_jobs ,
471
+ "--hip_arch" ,
472
+ type = str ,
473
+ help = "HIP device architecture" ,
474
+ default = None ,
471
475
)
472
476
473
477
args = parser .parse_args ()
@@ -497,6 +501,7 @@ def validate_and_parse_env_args(env_args):
497
501
options .cublas_directory = args .cublas_directory
498
502
options .custom_results_dir = args .results_dir
499
503
options .build_jobs = args .build_jobs
504
+ options .hip_arch = args .hip_arch
500
505
501
506
if args .build_igc and args .compute_runtime is None :
502
507
parser .error ("--build-igc requires --compute-runtime to be set" )
You can’t perform that action at this time.
0 commit comments