CreateSessionFromArray doesn't work #21946
Labels
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
stale
issues that have not been addressed in a while; categorized by a bot
Describe the issue
I now want multiple threads to load the same model and perform inference in a data-parallel manner. To reduce memory usage, I want to avoid having each session individually read the ONNX file from disk into memory. The approach I am currently taking is to first read the ONNX file into memory and then use CreateSessionFromArray to create sessions. I referred to this issue: #8328 during this process. However, it doesn't seem to be working as expected; CreateSessionFromArray does not save memory usage.
To reproduce
you can use the python script to get the onnx file, and the use c++ code to run。
Urgency
No response
Platform
Linux
OS Version
centos8
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
onnxruntime-linux-x64-gpu-1.19.0
ONNX Runtime API
C++
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: