Skip to content

Commit

Permalink
fix: manually set nb_threads for GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdinand Mom committed Feb 17, 2023
1 parent f6dde83 commit 8ddb0f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformer_deploy/backends/ort_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def create_model_for_provider(
provider_to_use = [provider_to_use]
if provider_to_use == ["CPUExecutionProvider"]:
options.execution_mode = ExecutionMode.ORT_SEQUENTIAL
options.intra_op_num_threads = nb_threads
options.intra_op_num_threads = nb_threads
return InferenceSession(path, options, providers=provider_to_use)


Expand Down

0 comments on commit 8ddb0f4

Please sign in to comment.