Where can I see C++ sample to load TensorRT engine and deserialize for inference in C++?
This is in Python and I’m looking for C++ version.
with open(“sample.engine”, “wb”) as f: f.write(engine.serialize())
Read the engine from the file and deserialize:
with open(“sample.engine”, “rb”) as f, trt.Runtime(TRT_LOGGER) as runtime: engine = runtime.deserialize_cuda_engine(f.read())