You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can onnxruntime support directly loading *.engine or *.trt to initialize the session when using TensorRT EP?
Describe scenario use case
Currently using TensorRT EP, in order to ensure the initialization speed, the *.engine is written to the hard disk when using the cache. In my production environment, I want *.engine to be encrypted. And they can be directly loaded in the following way.
//Decrypt model to byte
byte=Decryptor.read("./encrypted_model.engine");
//Initialize to session
session = Ort::Session(env, byte.data(), byte.size(), session_options);
The text was updated successfully, but these errors were encountered:
@lnotgm
The "model" input to Ort::Session() should be ONNX format regardless of file path or byte stream.
TensorRT EP provides the feature of using an embedded engine model, similar to your request, it's just that the input model is a wrapper of engine (still an ONNX file). This can also fulfill your request of almost directly loading the *.engine to reduce session initialization time.
Please see the detail of using "Embedded engine model / EPContext model": https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html#tensorrt-ep-caches
Describe the feature request
Can onnxruntime support directly loading *.engine or *.trt to initialize the session when using TensorRT EP?
Describe scenario use case
Currently using TensorRT EP, in order to ensure the initialization speed, the *.engine is written to the hard disk when using the cache. In my production environment, I want *.engine to be encrypted. And they can be directly loaded in the following way.
//Decrypt model to byte
byte=Decryptor.read("./encrypted_model.engine");
//Initialize to session
session = Ort::Session(env, byte.data(), byte.size(), session_options);
The text was updated successfully, but these errors were encountered: