yusuketomoto/chainer-fast-neuralstyle

Weird error

Opened this issue · 9 comments

Here is what I'm getting with GCC 5, ubuntu 16.04, a gtx 1080, cuda 8.0 RC, nvidia drivers 367.44

num traning images: 82783
82783 iterations, 2 epochs
Traceback (most recent call last):
File "train.py", line 111, in <module>
  gram_s = [gram_matrix(y) for y in feature_s]
File "train.py", line 26, in gram_matrix

...

return err == cudaSuccess ? cudaBindSurfaceToArray(surf, array, desc) : err;
}
#1899 "/usr/local/cuda-8.0/bin/..//include/cuda_runtime.h"
#pragma GCC diagnostic pop
#1 "<command-line>" 2
#1 "/tmp/tmpgaHPTd/kern.cu"

Any info you need, I'll find it and hand it over. I'm at a loss. I actually did find one thing where I can ignore errors but I don't see where in this code specifically I would do that and I'm pretty sure CUDA shouldn't have this problem.

Sorry out of context for this thread. What is the response time you are getting when generating (with gtx 1080, cuda 8.0 RC) an image of 1024px?

Well I wouldn't know because the CUDA isn't working as you can read in my post.

I'm getting the exact same error and i have no idea why.
Maybe it's an issue with CUDA 8.0.

Which version of Ubuntu (or otherwise) are you running and what is your output of "gcc --version" as well as "g++ --version".

I recently got it working, I may be able to save you headache.

I am running Fedora 24.
$ gcc --version
gcc (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2)
$g++ --version
g++ (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2)

Okay so your GCC version is too new and the chainer team does not test on newer versions. You'll have to switch to GCC 4.8 & G++ 4.8. This might affect how things compile and isn't recommended however.
chainer/chainer#1634

What I would advise is what I ended up doing, create a partition to install Ubuntu 14 on and it'll work like a charm.

I did what you suggested and am running Ubuntu 14 with GCC 4.8, but im getting this error:

Traceback (most recent call last):
File "generate.py", line 31, in
y = model(x)
File "/home/user/chainer-fast-neuralstyle-master/net.py", line 55, in call
h = self.b1(F.elu(self.c1(x)), test=test)
File "/usr/local/lib/python2.7/dist-packages/chainer-1.16.0-py2.7-linux-x86_64.egg/chainer/links/connection/convolution_2d.py", line 101, in call
x, self.W, self.b, self.stride, self.pad, self.use_cudnn)
File "/usr/local/lib/python2.7/dist-packages/chainer-1.16.0-py2.7-linux-x86_64.egg/chainer/functions/connection/convolution_2d.py", line 318, in convolution_2d
return func(x, W, b)
File "/usr/local/lib/python2.7/dist-packages/chainer-1.16.0-py2.7-linux-x86_64.egg/chainer/function.py", line 197, in call
outputs = self.forward(in_data)
File "/usr/local/lib/python2.7/dist-packages/chainer-1.16.0-py2.7-linux-x86_64.egg/chainer/function.py", line 309, in forward
return self.forward_gpu(inputs)
File "/usr/local/lib/python2.7/dist-packages/chainer-1.16.0-py2.7-linux-x86_64.egg/chainer/functions/connection/convolution_2d.py", line 103, in forward_gpu
(self.ph, self.pw), (self.sy, self.sx), x.dtype)
File "/usr/local/lib/python2.7/dist-packages/cupy-1.0.0-py2.7-linux-x86_64.egg/cupy/cudnn.py", line 101, in create_convolution_descriptor
desc.value, pad[0], pad[1], stride[0], stride[1], 1, 1, mode)
File "cupy/cuda/cudnn.pyx", line 348, in cupy.cuda.cudnn.setConvolution2dDescriptor (cupy/cuda/cudnn.cpp:3986)
TypeError: an integer is required

@tisawe Have you solved this issue yet? I got the exactly same error as you.

@AkerIII I did in fact solved the issue but since I have not used the chainer method in a while I have forgotten exactly how I solved the issue. I did reinstall all the reauirements: numpy, cupy, pycuda, chainer and maybe more. I'm on vacation currently and will be for over a week, so I am unable to check.