Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel ICX Compiler , Intel® DPC++ Compatibility Tool, and GDB*
583 Discussions

dpct giving SIGSEGV while converting cuda code

Shukla__Gagandeep
742 Views

Hi,

I am trying to convert CUDA-Winograd usinf dpct but I am getting SIGSEGV error for all the files.Sample error for Kernel256_winograd.cu is:

c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master>dpct --cuda-include-path="C:\nvcc\include" --out-root=dpct Kernel256_winograd.cu
Processing: c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:11:1: warning: DPCT1037:0: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
#include "cudnn.h"
^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:273:32: warning: format specifies type 'int' but the argument has type 'unsigned long long' [-Wformat]
        printf("TotalTime = %d us\n", nT2-nT1);
                            ~~        ^~~~~~~
                            %llu
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:400:38: warning: format specifies type 'int' but the argument has type 'unsigned long long' [-Wformat]
        printf("cuDNN TotalTime = %d us\n", nT2_cudnn-nT1_cudnn);
                                  ~~        ^~~~~~~~~~~~~~~~~~~
                                  %llu
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:275:6: warning: DPCT1003:1: Migrated API does not return error code. (*, 0) is inserted. You may need to rewrite this code.
        s = cudaMemcpy(tmp, output, nOutput<<2, cudaMemcpyDeviceToHost);
            ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:276:17: warning: DPCT1009:2: SYCL uses exceptions to report errors and does not use the error codes. The original code was commented out and a warning string was inserted. You need to rewrite this code.
        printf("%s\n", cudaGetErrorName(s));
                       ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:321:2: warning: DPCT1037:3: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        cudnnStatus_t status;
        ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:325:2: warning: DPCT1037:4: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        cudnnHandle_t handle;
        ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:326:11: warning: DPCT1037:5: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnCreate(&handle);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:327:16: warning: DPCT1037:6: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed1\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:329:2: warning: DPCT1037:7: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        cudnnTensorDescriptor_t xdesc, ydesc, bdesc;
        ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:330:2: warning: DPCT1037:8: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        cudnnFilterDescriptor_t wdesc; // CUDNN_TENSOR_NHWC, CUDNN_TENSOR_NCHW
        ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:331:11: warning: DPCT1037:9: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnCreateTensorDescriptor(&xdesc);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:332:16: warning: DPCT1037:10: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed2\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:333:11: warning: DPCT1037:11: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnSetTensor4dDescriptor(xdesc, CUDNN_TENSOR_NHWC, CUDNN_DATA_FLOAT, 1, 256, 16, 16);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:334:16: warning: DPCT1037:12: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed3\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:335:11: warning: DPCT1037:13: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnCreateTensorDescriptor(&ydesc);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:336:16: warning: DPCT1037:14: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed4\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:337:11: warning: DPCT1037:15: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnSetTensor4dDescriptor(ydesc, CUDNN_TENSOR_NHWC, CUDNN_DATA_FLOAT, 1, 256, 14, 14);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:338:16: warning: DPCT1037:16: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed5\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:339:11: warning: DPCT1037:17: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnCreateFilterDescriptor(&wdesc);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:340:16: warning: DPCT1037:18: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed6\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:341:11: warning: DPCT1037:19: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnSetFilter4dDescriptor(wdesc, CUDNN_DATA_FLOAT, CUDNN_TENSOR_NCHW, 256, 256, 3, 3);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:342:16: warning: DPCT1037:20: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed7\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:343:11: warning: DPCT1037:21: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnCreateTensorDescriptor(&bdesc);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:344:16: warning: DPCT1037:22: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed8\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:345:11: warning: DPCT1037:23: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnSetTensor4dDescriptor(bdesc, CUDNN_TENSOR_NHWC, CUDNN_DATA_FLOAT, 1, 256, 1, 1);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:346:16: warning: DPCT1037:24: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed9\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:347:2: warning: DPCT1037:25: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        cudnnConvolutionDescriptor_t conv_desc;
        ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:348:11: warning: DPCT1037:26: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnCreateConvolutionDescriptor(&conv_desc);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:349:16: warning: DPCT1037:27: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed10\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:350:11: warning: DPCT1037:28: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnSetConvolution2dDescriptor(conv_desc, 0,0, 1,1,1,1, CUDNN_CROSS_CORRELATION, CUDNN_DATA_FLOAT); //CUDNN_CONVOLUTION
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:351:16: warning: DPCT1037:29: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed11\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:353:2: warning: DPCT1037:30: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        cudnnActivationDescriptor_t act_desc;
        ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:354:11: warning: DPCT1037:31: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnCreateActivationDescriptor(&act_desc);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:355:16: warning: DPCT1037:32: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed12\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:356:11: warning: DPCT1037:33: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnSetActivationDescriptor(act_desc, CUDNN_ACTIVATION_RELU, CUDNN_NOT_PROPAGATE_NAN, 0);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:357:16: warning: DPCT1037:34: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed13\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:359:2: warning: DPCT1037:35: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        cudnnTensorDescriptor_t bnScaleBiasMeanVarDesc;
        ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:360:11: warning: DPCT1037:36: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnCreateTensorDescriptor(&bnScaleBiasMeanVarDesc);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:361:16: warning: DPCT1037:37: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed14\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:362:11: warning: DPCT1037:38: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        status = cudnnSetTensor4dDescriptor(bnScaleBiasMeanVarDesc, CUDNN_TENSOR_NCHW, CUDNN_DATA_FLOAT, 1, 256, 1, 1);
                 ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:363:16: warning: DPCT1037:39: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        if (status != CUDNN_STATUS_SUCCESS) printf("failed15\n");
                      ^
c:\Users\intel\Downloads\cuda code\CUDA-Winograd-master\Kernel256_winograd.cu:365:2: warning: DPCT1037:40: Rewrite this code using Intel(R) oneAPI Deep Neural Network Library (oneDNN) with DPC++.
        cudnnConvolutionFwdAlgo_t algo = (cudnnConvolutionFwdAlgo_t)6;
        ^

Meet signal:SIGSEGV
Intel(R) DPC++ Compatibility Tool tries to give analysis reports and terminates...

I am getting same SIGSEGV error for /Kernel128_one.cuKernel128_winograd.cu and Kernel256_one.cu files too (though warnings are different)

compile_commands.json is also attached but I am getting same error with or without compile_commands.json.

Regards,
Gagan

 

0 Kudos
2 Replies
GouthamK_Intel
Moderator
742 Views

Hi Gagandeep,

Thanks for reaching out to us.!

We are able to reproduce the error on our side. 

We have escalated this query to the concerned.

 

 

Thanks & Regards

Goutham

0 Kudos
Sravani_K_Intel
Moderator
684 Views

Hi Gagandeep,

 

The issue can no longer be reproduced with Beta08. Could you please verify at your end?

 

 

0 Kudos
Reply