cudnnCreate() error

Hi

I’m tryng to execute a simple convolution in a dual gpu environment with cuda 12.2 and cudnn v. 8.9.

I’m trying to generate a single cudnnHandle_t contest for each gpu with this code:

cudaGetDeviceCount(&n_gpus);
cudnnHandle_t* cudnn = new cudnnHandle_t[n_gpus];
cudnnTensorDescriptor_t* input_descriptor = new cudnnTensorDescriptor_t[n_gpus];
cudnnTensorDescriptor_t* output_descriptor = new cudnnTensorDescriptor_t[n_gpus];
cudnnFilterDescriptor_t* kernel_descriptor = new cudnnFilterDescriptor_t[n_gpus];
cudnnConvolutionFwdAlgoPerf_t convolution_algorithm;
cudnnConvolutionDescriptor_t* convolution_descriptor= new cudnnConvolutionDescriptor_t[n_gpus];

for (k=0; k<n_gpus; k++) {
inputSize = image[k].cols * image[k].rows;
outputSize = output[k].cols * output[k].rows;
cudaSetDevice(k);
checkCUDNN(cudnnCreate(&cudnn[k]));

}

The code compiles without errors but when I run it I get this error:
Error on line 590: CUDNN_STATUS_INTERNAL_ERROR at the line with

checkCUDNN(cudnnCreate(&cudnn[k]));

Where am I doing wrong? Is there anyone who can help me?

Thank you very much

bye

Hi @antonello.cioffi ,
Apologies for the delay. Can you please share the api logs with us?

Thanks