File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ def run(
31
31
verbose = False ,
32
32
cmake_opts = "" ,
33
33
target_cuda = None ,
34
+ target_hip = None ,
34
35
):
35
36
build_system = None
36
37
@@ -75,6 +76,14 @@ def run(
75
76
cmake_args += [
76
77
f"-DDPCTL_TARGET_CUDA={ target_cuda } " ,
77
78
]
79
+ if target_hip is not None :
80
+ if not target_hip .strip ():
81
+ raise ValueError (
82
+ "--target-hip requires an architecture (e.g., gfx90a)"
83
+ )
84
+ cmake_args += [
85
+ f"-DDPCTL_TARGET_HIP={ target_hip } " ,
86
+ ]
78
87
subprocess .check_call (
79
88
cmake_args , shell = False , cwd = setup_dir , env = os .environ
80
89
)
@@ -150,6 +159,13 @@ def run(
150
159
default = None ,
151
160
type = str ,
152
161
)
162
+ driver .add_argument (
163
+ "--target-hip" ,
164
+ required = False ,
165
+ help = "Enable HIP target for build. "
166
+ "Must specify HIP architecture (e.g., --target-hip=gfx90a)" ,
167
+ type = str ,
168
+ )
153
169
args = parser .parse_args ()
154
170
155
171
args_to_validate = [
@@ -206,4 +222,5 @@ def run(
206
222
verbose = args .verbose ,
207
223
cmake_opts = args .cmake_opts ,
208
224
target_cuda = args .target_cuda ,
225
+ target_hip = args .target_hip ,
209
226
)
You can’t perform that action at this time.
0 commit comments