Skip to content

Commit

Permalink
Add compile_model config arg
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
  • Loading branch information
glenn-jocher committed Feb 20, 2024
1 parent 5f52ed3 commit 5477165
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ultralytics/nn/autobackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ def __init__(
batch_dim = get_batch(ov_model)
if batch_dim.is_static:
batch_size = batch_dim.get_length()
ov_compiled_model = core.compile_model(ov_model, device_name="AUTO") # AUTO selects best available device
ov_compiled_model = core.compile_model(
ov_model,
device_name="AUTO", # AUTO selects best available device
config={"PERFORMANCE_HINT": "THROUGHPUT"},
)
metadata = w.parent / "metadata.yaml"
elif engine: # TensorRT
LOGGER.info(f"Loading {w} for TensorRT inference...")
Expand Down

0 comments on commit 5477165

Please sign in to comment.