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

Exception: ("We can't determine the cudnn version as it is not available", #18

Open
lawlite19 opened this issue Jan 8, 2018 · 4 comments

Comments

@lawlite19
Copy link

I have installed cuda and cudnn, and I run THEANO_FLAGS='device=cpu, floatX=float32, nvcc.fastmath=True' /usr/bin/python iGAN_main.py --model_name outdoor_64, the error message is:

Traceback (most recent call last):
  File "iGAN_main.py", line 41, in <module>
    model = model_class.Model(model_name=args.model_name, model_file=args.model_file)
  File "/root/iGAN/model_def/dcgan_theano.py", line 27, in __init__
    self._gen = self.def_gen(self.gen_params, self.gen_batchnorm, n_layers=self.n_layers, n_f=self.n_f, nc=self.nc)
  File "/root/iGAN/model_def/dcgan_theano.py", line 40, in def_gen
    gx = gen_test(z, gen_params, gen_pl, n_layers=n_layers, n_f=n_f, nc=nc, use_tanh=False)
  File "/root/iGAN/model_def/dcgan_theano.py", line 227, in gen_test
    hout = relu(batchnorm(deconv(hin, w, subsample=(2, 2), border_mode=(2, 2)), u=u, s=s, g=g, b=b))
  File "/root/iGAN/lib/ops.py", line 95, in deconv
    d_img = GpuDnnConvGradI()(kerns, img, out, desc)
  File "/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/dnn.py", line 838, in __init__
    if version() < (4000, 4000):
  File "/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/__init__.py", line 407, in dnn_version
    dnn_available.msg)
Exception: ("We can't determine the cudnn version as it is not available", "Can not compile with cuDNN. We got this error:\nnvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).\n/usr/bin/ld: cannot find -lcudnn\ncollect2: error: ld returned 1 exit status\n")

Theano (0.8.2)
cuda (8.0)
cudnn(5.1)

image

envionment variable:
image

Thank you!

@lawlite19
Copy link
Author

When I run: THEANO_FLAGS='device=gpu0, floatX=float32, nvcc.fastmath=True' /usr/bin/python iGAN_main.py --model_name outdoor_64

Using gpu device 0: Tesla P100-PCIE-16GB (CNMeM is enabled with initial size: 50.0% of memory, cuDNN not available)
[n_iters] = 40
[top_k] = 16
[average] = False
[morph_steps] = 16
[model_file] = ./models/outdoor_64.dcgan_theano
[d_weight] = 0.0
[interp] = linear
[batch_size] = 64
[framework] = theano
[model_type] = dcgan_theano
[shadow] = False
[model_name] = outdoor_64
[win_size] = 384
LOADING...
('n_layers=', 3)
load model from ./models/outdoor_64.dcgan_theano
3.81 seconds to load theano models
Traceback (most recent call last):
  File "iGAN_main.py", line 41, in <module>
    model = model_class.Model(model_name=args.model_name, model_file=args.model_file)
  File "/root/iGAN/model_def/dcgan_theano.py", line 27, in __init__
    self._gen = self.def_gen(self.gen_params, self.gen_batchnorm, n_layers=self.n_layers, n_f=self.n_f, nc=self.nc)
  File "/root/iGAN/model_def/dcgan_theano.py", line 40, in def_gen
    gx = gen_test(z, gen_params, gen_pl, n_layers=n_layers, n_f=n_f, nc=nc, use_tanh=False)
  File "/root/iGAN/model_def/dcgan_theano.py", line 227, in gen_test
    hout = relu(batchnorm(deconv(hin, w, subsample=(2, 2), border_mode=(2, 2)), u=u, s=s, g=g, b=b))
  File "/root/iGAN/lib/ops.py", line 95, in deconv
    d_img = GpuDnnConvGradI()(kerns, img, out, desc)
  File "/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/dnn.py", line 838, in __init__
    if version() < (4000, 4000):
  File "/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/__init__.py", line 407, in dnn_version
    dnn_available.msg)
Exception: ("We can't determine the cudnn version as it is not available", "Can not compile with cuDNN. We got this error:\nnvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).\n/usr/bin/ld: cannot find -lcudnn\ncollect2: error: ld returned 1 exit status\n")

@junyanz
Copy link
Owner

junyanz commented Jan 15, 2018

The code is only tested with an older Theano version as well as old GPUs and CUDNN. Could you run other Theano demo code such as this one?

@alanhzh
Copy link

alanhzh commented Mar 27, 2018

mine is similar, I am on windows and i have this problem:

[model_file] = ./models/outdoor_64.dcgan_theano
[shadow] = False
[top_k] = 16
[n_iters] = 40
[framework] = theano
[interp] = linear
[win_size] = 384
[model_type] = dcgan_theano
[morph_steps] = 16
[batch_size] = 64
[model_name] = outdoor_64
[d_weight] = 0.0
[average] = False
LOADING...
n_layers= 3
load model from ./models/outdoor_64.dcgan_theano
3.09 seconds to load theano models
Traceback (most recent call last):
  File "iGAN_main.py", line 41, in <module>
    model = model_class.Model(model_name=args.model_name, model_file=args.model_file)
  File "C:\Users\Alan\Desktop\gits\iGAN\model_def\dcgan_theano.py", line 27, in __init__
    self._gen = self.def_gen(self.gen_params, self.gen_batchnorm, n_layers=self.n_layers, n_f=self.n_f, nc=self.nc)
  File "C:\Users\Alan\Desktop\gits\iGAN\model_def\dcgan_theano.py", line 40, in def_gen
    gx = gen_test(z, gen_params, gen_pl, n_layers=n_layers, n_f=n_f, nc=nc, use_tanh=False)
  File "C:\Users\Alan\Desktop\gits\iGAN\model_def\dcgan_theano.py", line 227, in gen_test
    hout = relu(batchnorm(deconv(hin, w, subsample=(2, 2), border_mode=(2, 2)), u=u, s=s, g=g, b=b))
  File "C:\Users\Alan\Desktop\gits\iGAN\lib\ops.py", line 95, in deconv
    d_img = GpuDnnConvGradI()(kerns, img, out, desc)
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\sandbox\cuda\dnn.py", line 859, in __init__
    if version() < (5000, 5000):
  File "C:\ProgramData\Anaconda3\lib\site-packages\theano\sandbox\cuda\__init__.py", line 424, in dnn_version
    dnn_available.msg)
Exception: ("We can't determine the cudnn version as it is not available", 'CUDA not available')

@junyanz
Copy link
Owner

junyanz commented Mar 27, 2018

The code was developed around 2015. I am pretty sure it doesn't work with cudnn 5.1. See here for the Theano version.

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

3 participants