On Mon, 20 Jun 2011 14:55:46 -0700, Scott Biersdorff <[email protected]> 
wrote:
> Traceback (most recent call last):
>   File "demo.py", line 44, in <module>
>     a_doubled = (2*a_gpu).get()
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/gpuarray.py",
>  line 285, in __rmul__
>     return self._axpbz(scalar, 0, result)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/gpuarray.py",
>  line 160, in _axpbz
>     func = elementwise.get_axpbz_kernel(self.dtype)
>   File "<string>", line 2, in get_axpbz_kernel
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/tools.py",
>  line 485, in context_dependent_memoize
>     result = func(*args)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/elementwise.py",
>  line 323, in get_axpbz_kernel
>     "axpb")
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/elementwise.py",
>  line 99, in get_elwise_kernel
>     arguments, operation, name, keep, options, **kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/elementwise.py",
>  line 85, in get_elwise_kernel_and_types
>     keep, options, **kwargs)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/elementwise.py",
>  line 74, in get_elwise_module
>     options=options, keep=keep)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/compiler.py",
>  line 239, in __init__
>     arch, code, cache_dir, include_dirs)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/compiler.py",
>  line 229, in compile
>     return compile_plain(source, options, keep, nvcc, cache_dir)
>   File
> "/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/compiler.py",
>  line 108, in compile_plain
>     cmdline, stdout=stdout, stderr=stderr)
> pycuda.driver.CompileError: nvcc compilation of /tmp/tmpoQTLvI/kernel.cu
> failed
> [command: nvcc --cubin -arch sm_12
> -I/usr/local/lib/python2.7/dist-packages/pycuda-0.94.2-py2.7-linux-x86_64.egg/pycuda/../include/pycuda
>  kernel.cu]
> [stderr:
> In file included
> from /usr/local/cuda/bin/../include/cuda_runtime.h:59:0,
>                  from <command-line>:0:
> /usr/local/cuda/bin/../include/host_config.h:82:2: error: #error --
> unsupported GNU version! gcc 4.5 and up are not supported!
> 
> I'm I reading this right? Is the kernel being compiled twice?

No. The evidence is in your stack trace, actually. The failing
compilation is trying to compile a kernel for an array operation (the
2*a in your case). I suppose we should add a way to pass options to nvcc
for behind-your-back compilations? A global variable maybe (shudder)?

Andreas

Attachment: pgpnmqJOuclAK.pgp
Description: PGP signature

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to