mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
disable mem arena in options for cpu only
This commit is contained in:
parent
6c70e56059
commit
8002e59031
@ -20,7 +20,7 @@ def get_ort_providers(
|
|||||||
["CPUExecutionProvider"],
|
["CPUExecutionProvider"],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"arena_extend_strategy": "kSameAsRequested",
|
"enable_cpu_mem_arena": False,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -53,7 +53,7 @@ def get_ort_providers(
|
|||||||
providers.append(provider)
|
providers.append(provider)
|
||||||
options.append(
|
options.append(
|
||||||
{
|
{
|
||||||
"arena_extend_strategy": "kSameAsRequested",
|
"enable_cpu_mem_arena": False,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@ -85,12 +85,8 @@ class ONNXModelRunner:
|
|||||||
else:
|
else:
|
||||||
# Use ONNXRuntime
|
# Use ONNXRuntime
|
||||||
self.type = "ort"
|
self.type = "ort"
|
||||||
options = ort.SessionOptions()
|
|
||||||
if device == "CPU":
|
|
||||||
options.enable_cpu_mem_arena = False
|
|
||||||
self.ort = ort.InferenceSession(
|
self.ort = ort.InferenceSession(
|
||||||
model_path,
|
model_path,
|
||||||
sess_options=options,
|
|
||||||
providers=providers,
|
providers=providers,
|
||||||
provider_options=options,
|
provider_options=options,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user