ModelZoo ONNX backend: log configured top provider (backend)

This commit is contained in:
Robert Sachunsky 2026-06-26 02:13:39 +02:00
parent ef47f0ef09
commit 45168178dc

View file

@ -351,10 +351,15 @@ class EynollahModelZoo:
# 'trt_timing_cache_enable': True, # 'trt_timing_cache_enable': True,
# ... # ...
})] + providers })] + providers
provider0 = providers[0]
if isinstance(provider0, tuple):
provider0 = provider0[0]
self.logger.info("using %s with ONNX provider %s for model %s",
"GPU %d" % gpu if gpu >= 0 else "CPU",
provider0[:-17], model_category)
model = ort.InferenceSession( model = ort.InferenceSession(
model_path, model_path,
providers=providers) providers=providers)
# FIXME: notify about selected provider/device
model_inputs = [model_input.name model_inputs = [model_input.name
for model_input in model.get_inputs()] for model_input in model.get_inputs()]
model_outputs = [model_output.name model_outputs = [model_output.name