CUDA error when upgraded deepstream 5.1

• Hardware Platform (Jetson / GPU): Jetson Xavier NX
• DeepStream Version: 5.1
• Language: Python
• Issue Type( questions, new requirements, bugs): Question

I’ve just updated my Deepstream from 5.0.1 to 5.1, and keep receiving this error on all python_apps:

ERROR: [TRT]: ../rtSafe/cuda/caskConvolutionRunner.cpp (317) - Cuda Error in allocateContextResources: 700 (an illegal memory access was encountered)
ERROR: [TRT]: FAILED_EXECUTION: std::exception
ERROR: Failed to enqueue inference batch
ERROR: Infer context enqueue buffer failed, nvinfer error:NVDSINFER_TENSORRT_ERROR
0:00:14.231465240 15632     0x3d67d8f0 WARN                 nvinfer gstnvinfer.cpp:1225:gst_nvinfer_input_queue_loop:<primary-inference> error: Failed to queue input batch for inferencing
Error: gst-stream-error-quark: Failed to queue input batch for inferencing (1): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(1225): gst_nvinfer_input_queue_loop (): /GstPipeline:pipeline0/GstNvInfer:primary-inference
ERROR: Failed to make stream wait on event, cuda err_no:77, err_str:cudaErrorIllegalAddress
ERROR: Preprocessor transform input data failed., nvinfer error:NVDSINFER_CUDA_ERROR

All sample apps, as well as my own, were working just fine on Deepstream 5.0. I updated to 5.1 following the indications on this link (Method 4: Using the apt-server)

Thanks in advance!

DS5.1 must work on Jetpack4.5.1, so please make sure your Jetpack version is 4.5.1.