Unhandled exception in NvInfer.h in Visual Studio

Hello,
I am fairly new to GPU Programming and I have been encountered with the following error while using cuDNN.

This is the exception returned by Visual Studio:
Unhandled exception at 0x00007FFC862FDF51 (cudnn64_8.dll) in LibraryTest.exe: Fatal program exit requested.

This is where the exception occurs (NvInfer.h):

nvinfer1::IHostMemory* buildSerializedNetwork(INetworkDefinition& network, IBuilderConfig& config) noexcept
    {
        return mImpl->buildSerializedNetwork(network, config);
    }

I have also installed TensorRT according to the documentation of NVIDIA.

CUDA version: 11.6
TensorRT version: 8.5.2.2
OS: WIndows 10
GPU: NVIDIA Quadro M1000M

If anyone could help bring light to the situation, it would be great.
Thank you so much in advance!

Hi @simona.simoni ,
Can you please check on the installation guide of cudnn and verify if it is installed correctly?
Thanks

Hello @AakankshaS ,

yes, the installation is done correctly.

Hi @simona.simoni s,
can you check if you have zlib available in your environment?
This was a new dependency introduced first in cuDNN 8.3.0. See the following guide for getting zlib

Thanks