Skip to content

Commit dfeeb87

Browse files
authored
Merge pull request #124 from RamesTheGeneric/fix_onnxruntime_EP_selection
Add GPU EP options
2 parents 0bf1362 + 35a1fe6 commit dfeeb87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

BabbleApp/babble_processor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ def __init__(
119119
self.sess = ort.InferenceSession(
120120
f"{self.default_model}/onnx/model.onnx",
121121
self.opts,
122-
providers=[provider],
123-
provider_options=[{"device_id": self.gpu_index}],
122+
providers=provider,
123+
provider_options=[{"device_id": self.gpu_index}, {"device_id": self.gpu_index}, {}], # We need a dict entry for each EP in our providers list
124124
)
125125
self.input_name = self.sess.get_inputs()[0].name
126126
self.output_name = self.sess.get_outputs()[0].name

0 commit comments

Comments
 (0)