Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theano error cannot convert 'cudnnConvolutionFwdAlgo_t*' to 'cudnnConvolutionFwdAlgoPerf_t #6791

Open
drb3hn4m opened this issue Sep 4, 2022 · 0 comments

Comments

@drb3hn4m
Copy link

drb3hn4m commented Sep 4, 2022

My installed packages are:
CUDA 11.7, cudnn 8.5, theano 1.0.5
When I run the convolution network in the test file of Michael Nielsen's book on Deep Learning:

    import network3
    from network3 import Network, ConvPoolLayer, FullyConnectedLayer, SoftmaxLayer
    training_data, validation_data, test_data = network3.load_data_shared()
    mini_batch_size = 10
    net = Network([
            ConvPoolLayer(image_shape=(mini_batch_size, 1, 28, 28),filter_shape=(20, 1, 5, 5), poolsize=(2, 2)),FullyConnectedLayer(n_in=20*12*12, n_out=100),SoftmaxLayer(n_in=100, n_out=10)], mini_batch_size)
    net.SGD(training_data, 60, mini_batch_size, 0.1, 
                validation_data, test_data)   

I bump into the following error:

    Problem occurred during compilation with the command line below:
    /MYHOME/anaconda3/envs/behi/bin/x86_64-conda-linux-gnu-c++ -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -Wl,-rpath,/usr/local/cuda-11.7/lib64 -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -I/MYHOME/anaconda3/envs/behi/lib/python3.10/site-packages/pygpu -I/MYHOME/anaconda3/envs/behi/lib/python3.10/site-packages/numpy/core/include -I/MYHOME/anaconda3/envs/behi/include -I/usr/local/cuda-11.7/include -I/MYHOME/anaconda3/envs/behi/lib/python3.10/site-packages/theano/gpuarray/c_code -I/MYHOME/anaconda3/envs/behi/lib/python3.10/site-packages/numpy/core/include -I/MYHOME/anaconda3/envs/behi/include/python3.10 -I/MYHOME/anaconda3/envs/behi/lib/python3.10/site-packages/theano/gof/c_code -L/MYHOME/anaconda3/envs/behi/lib -L/usr/local/cuda-11.7/lib64 -L/MYHOME/anaconda3/envs/behi/lib -fvisibility=hidden -o /MYHOME/.theano/compiledir_Linux-5.15--generic-x86_64-with-glibc2.35-x86_64-3.10.4-64/tmpf3qvese9/mc1cd627e616bc8abc33fbfac83f3f655fef0d5f1dc7018ab317b39356ccb88a5.so /MYHOME/.theano/compiledir_Linux-5.15--generic-x86_64-with-glibc2.35-x86_64-3.10.4-64/tmpf3qvese9/mod.cpp -lgpuarray -lcudnn -lpython3.10dnn_fwd.c: In member function 'int {anonymous}::__struct_compiled_op_mc1cd627e616bc8abc33fbfac83f3f655fef0d5f1dc7018ab317b39356ccb88a5::conv_fwd_node_mc1cd627e616bc8abc33fbfac83f3f655fef0d5f1dc7018ab317b39356ccb88a5_0(PyGpuArrayObject*, PyGpuArrayObject*, PyGpuArrayObject*, cudnnConvolutionDescriptor_t, double, double, PyGpuArrayObject**, _Params_c1c8b4ff173698da406f46c90c8211df3674b0478655765dc1ebaa6eb2c3f1af_1348bc2b76f74f3ee4c82e363ec6eacd0522bb7d4a29dd246904b25b733edb4a*)':
    dnn_fwd.c:326:60: error: invalid conversion from 'size_t {aka long unsigned int}' to 'int*' [-fpermissive]
    dnn_fwd.c:326:60: error: cannot convert 'cudnnConvolutionFwdAlgo_t*' to 'cudnnConvolutionFwdAlgoPerf_t* {aka cudnnConvolutionFwdAlgoPerfStruct*}' for argument '8' to 'cudnnStatus_t cudnnGetConvolutionForwardAlgorithm_v7(cudnnHandle_t, cudnnTensorDescriptor_t, cudnnFilterDescriptor_t, cudnnConvolutionDescriptor_t, cudnnTensorDescriptor_t, int, int*, cudnnConvolutionFwdAlgoPerf_t*)'

I understand that incompatibility of packages should be the reason, however I was wondering if there is any way to resolve this by modify the module or dnn_fwd.c or the theano's config file without downgrading the packages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant