Skip to content

Commit

Permalink
Merge pull request #26 from provos/metal-support
Browse files Browse the repository at this point in the history
  • Loading branch information
ebursztein authored Dec 22, 2024
2 parents 4ef52b7 + d5315ee commit e5a4f3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions unisim/backend/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def cosine_similarity(query_embeddings: BatchEmbeddings, index_embeddings: Batch
avail_providers = get_available_providers()
if "CUDAExecutionProvider" in avail_providers:
_providers = ["CUDAExecutionProvider", "CPUExecutionProvider"]
elif "CoreMLExecutionProvider" in avail_providers:
_providers = ["CoreMLExecutionProvider", "CPUExecutionProvider"]
else:
_providers = ["CPUExecutionProvider"]

Expand Down

0 comments on commit e5a4f3d

Please sign in to comment.