Skip to content

Commit 04a9dc3

Browse files
committed
fixed a bug in AbsReranker.py for mps device support
1 parent c2a2625 commit 04a9dc3

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)