Replies: 1 comment 3 replies
-
You can find more information here: https://onnxruntime.ai/docs/get-started/with-c.html. onnxruntime allocates memory and manages it on its own. It can be three independant buffers or one buffer used by three sessions. In that case, the memory peak usage is lower but sessions do not share pointers. The shared allocator usually reduces memory fragmentation. In your case, if it is the same model, the session supports multithreading, the same session should work for inference from three different threads. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I run the code with share allocator, and notice that the memory will increase. May I ask which part of the memory is shared by the share allocator?
Test Examle Code :
`
//TEST
The command top shows the memory :
one session, 18.2m
VmHWM: 21536 kB
VmRSS: 18624 kB
RssAnon: 12688 kB
RssFile: 5936 kB
RssShmem: 0 kB
two session, 29.3m
VmHWM: 29976 kB
VmRSS: 29976 kB
RssAnon: 24040 kB
RssFile: 5936 kB
RssShmem: 0 kB
three session, 36.5m
VmHWM: 37368 kB
VmRSS: 37368 kB
RssAnon: 31428 kB
RssFile: 5940 kB
RssShmem: 0 kB
Beta Was this translation helpful? Give feedback.
All reactions