-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Performance] Some allocations perform even after many Run() invocations on fixed inputs #17758
Comments
I've got the model which has such problem: Silero VAD v3 |
If you do not want to see absl data structures in the callstack, you might build the code with "--cmake_extra_defines onnxruntime_DISABLE_ABSEIL=ON" which could make a difference. |
Small vectors are likely created for shape manipulation happened |
@snnn
@wschin
|
This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details. |
Describe the issue
Prerequisites
I use onnxruntime model with audio processing which performs best without any non-determined time operations. Thus many practitioners say to remove 1)allocations, 2)blocking, 3)sleeping, etc.
In my algorithm I use onnx model every single chunk of input signal with 100Hz frequency.
So i need running such onnx model without additional allocations over time.
I've seen #14960 but it doesn't seem to help.
Problem description
I use onnxruntime with c++ api. Here is how I configured running model:
session_
with env and options aboveOrt::Value::CreateTensor
for each data vector and remembered them toOrt::Value
vector.Things I point:
Memory profiling
Then I started using
gperftools
with theirtcmalloc
. I compared then difference with two profile snapshots (at 100seconds and 120seconds of runtime):And I found that onnxruntime still uses some allocations/deallocations:
Don't pay attention to percentage, it is just not only onnxruntime doing some allocations.
What I expect: all onnxruntime entities do not alloc/dealloc
To reproduce
I think I need to share some minimal model, but I don't have available. Then I need to create one and provide how-to guide. But I believe that problem might be described more and solved by explanation above if anyone knows about such behavior
Urgency
No response
Platform
Mac
OS Version
12.3.1
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.14.1
ONNX Runtime API
C++
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
Model File
No response
Is this a quantized model?
No
The text was updated successfully, but these errors were encountered: