Comments (3)
I see. But by default
If a session is created using an input byte array containing the ORT format model data, by default we will copy the model bytes at the time of session creation to ensure the model bytes buffer is valid.
The api with_model_from_memory should be consistent with with_model_from_file. And ort::session::InMemorySession
should be created with another api, e.g. with_model_from_memory_directly
.
from ort.
And the C API does not mention that we have to keep model_bytes
alive while using Session
. Session
should parse the model_bytes
and keep the parsed params and graph in memory so it can outlive the model_bytes
.
from ort.
Session
should parse the model_bytes and keep the parsed params and graph in memory so it can outlive themodel_bytes
.
Not always, For .ort
models, we enable session.use_ort_model_bytes_directly
:
You may also enable the option to use the model bytes directly by setting the SessionOptions config entry
session.use_ort_model_bytes_directly
to1
. This may reduce the peak memory usage of ONNX Runtime Mobile, but you will need to guarantee that the model bytes are valid throughout the lifespan of the ORT session.
https://onnxruntime.ai/docs/performance/model-optimizations/ort-format-models.html
from ort.
Related Issues (20)
- Error importing CUDAExecutionProviderOptions and TensorRTExecutionProviderOptions HOT 1
- (exit code: 0xc0000139, STATUS_ENTRYPOINT_NOT_FOUND) HOT 3
- error: could not find native static library `nsync_cpp`, perhaps an -L flag is missing?
- CoreML on Arm64 compilation error HOT 6
- Cannot inference model with EP: TensorRT on [email protected] HOT 2
- Build failure with `tvm` flag HOT 2
- Linker Error: Unresolved External Symbols in `libort_sys` and `absl (Abseil)` on Windows HOT 1
- The requested API version [18] is not available, only API versions [1, 16] are supported in this build. HOT 6
- WASM fails on rc3 with encoding issue HOT 3
- ONNX Runtime with CUDA: LoadLibrary failed with error 126 HOT 1
- `cargo test` requires manually copying the DLL to `target\debug\deps` HOT 1
- Downloads libonnxruntime.so.1.17.3 from pyke cache, but tries to load 1.18.1 HOT 8
- Prebuilt binaries for common combination of CUDA 12 & cudnn8, in addition to 12 & cudnn9 HOT 8
- TensorRTExecutionProvider: Attempt to use DefaultLogger but none has been registered HOT 2
- How to Compile to Obtain `onnxruntime.lib` HOT 1
- How to compile for `aarch64-unknown-linux-gnu` ? HOT 4
- Cannot build ort-2.0.0-rc.2 on Windows Server 2019 HOT 7
- Linking with `link.exe` failed HOT 4
- `rc.4` linker error HOT 2
- Hot swapping weights for certain layers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ort.