Skip to content

Commit 77be06b

Browse files
authored
disable ROCm wheels (#54)
1 parent 57178fb commit 77be06b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

light_the_torch/_patch.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,15 @@ def patch_candidate_selection(computation_backends):
240240
r"^/whl/(?P<computation_backend>(cpu|cu\d+))/"
241241
)
242242

243+
def preprocessing(input):
244+
input.candidates = [
245+
candidate
246+
for candidate in input.candidates
247+
if candidate.version.local is not None
248+
and "rocm" not in candidate.version.local
249+
]
250+
return input
251+
243252
def postprocessing(
244253
input, output: List[InstallationCandidate]
245254
) -> List[InstallationCandidate]:
@@ -274,6 +283,7 @@ def sort_key(candidate_evaluator, candidate):
274283
"package_finder",
275284
"CandidateEvaluator",
276285
"get_applicable_candidates",
286+
preprocessing=preprocessing,
277287
postprocessing=postprocessing,
278288
):
279289
with unittest.mock.patch.object(CandidateEvaluator, "_sort_key", new=sort_key):

0 commit comments

Comments
 (0)