mirror of
https://github.com/qurator-spk/eynollah.git
synced 2026-07-12 06:39:31 +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,
|
# '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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue