mirror of
https://github.com/qurator-spk/eynollah.git
synced 2026-07-11 22:29:29 +02:00
ModelZoo ONNX backend: log configured top provider (backend)
This commit is contained in:
parent
ef47f0ef09
commit
45168178dc
1 changed files with 6 additions and 1 deletions
|
|
@ -351,10 +351,15 @@ class EynollahModelZoo:
|
|||
# 'trt_timing_cache_enable': True,
|
||||
# ...
|
||||
})] + 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_path,
|
||||
providers=providers)
|
||||
# FIXME: notify about selected provider/device
|
||||
model_inputs = [model_input.name
|
||||
for model_input in model.get_inputs()]
|
||||
model_outputs = [model_output.name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue