I have encrypted engine file by adding watermark. Also I have decrypted (above generated encrypted) file in function
TrtModelBuilder::deserializeEngine(const std::string& path, int dla)
{
//my decryption code
}
The above function is inside file (/opt/nvidia/deepstream/deepstream-5.1/sources/libs/nvdsinfer/nvdsinfer_model_builder.cpp)
Now, that decrypted file is not working with deepstream-app.
Error:
ERROR: [TRT]: INVALID_STATE: std::exception
ERROR: [TRT]: INVALID_CONFIG: Deserialize the cuda engine failed.
ERROR: Deserialize engine failed from file: /opt/nvidia/deepstream/deepstream-5.1/samples/models/Primary_Detector_Nano/Encrypted.engine
Also, if i write any print statement, then its not working.
NOTE:
I have generated model engine file successfully, also able to run generated file with deepstream-app.
Thanks