Skip to content

Commit f3f9800

Browse files
authored
Merge pull request #1216 from Swgj/fix-issue#1215
fixed a bug in AbsReranker.py for mps device support
2 parents c2a2625 + 04a9dc3 commit f3f9800

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

FlagEmbedding/abc/inference/AbsReranker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def get_target_devices(devices: Union[str, int, List[str], List[int]]) -> List[s
9696
elif is_torch_npu_available():
9797
return [f"npu:{i}" for i in range(torch.npu.device_count())]
9898
elif torch.backends.mps.is_available():
99-
return [f"mps:{i}" for i in range(torch.mps.device_count())]
99+
return ["mps"]
100100
else:
101101
return ["cpu"]
102102
elif isinstance(devices, str):

0 commit comments

Comments
 (0)