On Thu, 29 Aug 2013 08:51:44 -0400 Lev Givon <[email protected]> wrote:
> Received from Jerome Kieffer on Thu, Aug 29, 2013 at 08:05:41AM EDT: > > On Thu, 29 Aug 2013 07:26:40 -0400 > > Ahmed Fasih <[email protected]> wrote: > > > > > Since PyCUDA is just a wrapper to the CUDA C library (with >99.9% > > > coverage), anything CUDA supports, PyCUDA should support. More directly, > > > PyCUDA and K20 work fine for me. > > > > I am running PyCuda on a debian6 computer with a GeForce Titan. Driver is > > 319.32 and Cuda 4.2. > > My only problem is when I try to use scikit.cuda (for CuFFT) where sm_35 is > > not recognized. > > The issue is probably located around the old version of cuda. > > Feel free to submit a bug report on GitHub re the scikits.cuda problem and I > can > take a look. It looks more like a in pycuda ... The computer is running a Titan GPU on a debian6 where Cuda5.5 cannot be installed (due to libstdc++ too old) This command runs without problem: nvcc --preprocess -arch sm_21 -I/usr/lib/python2.6/dist-packages/pycuda/../../../../include/pycuda /tmp/tmpG4rJ5O.cu --compiler-options -P but nvcc --preprocess -arch sm_35 -I/usr/lib/python2.6/dist-packages/pycuda/../../../../include/pycuda /tmp/tmpG4rJ5O.cu --compiler-options -P crashes. One should limit the compute capabilities to the min of the hardware and the software, I guess. This is defined in compiler.py around lines 230 ... Here is a short code to show the bug: In [1]: import pycuda, pycuda.autoinit, pycuda.gpuarray In [2]: shape = (512,512,512);a = pycuda.gpuarray.empty(shape,dtype="complex64") In [3]: a.fill(0) --------------------------------------------------------------------------- CompileError Traceback (most recent call last) /home/kieffer/<ipython-input-3-93e2f28e0a31> in <module>() ----> 1 a.fill(0) /usr/lib/python2.6/dist-packages/pycuda/gpuarray.pyc in fill(self, value, stream) 489 def fill(self, value, stream=None): 490 """fills the array with the specified value""" --> 491 func = elementwise.get_fill_kernel(self.dtype) 492 func.prepared_async_call(self._grid, self._block, stream, 493 value, self.gpudata, self.mem_size) /home/kieffer/<string> in get_fill_kernel(dtype) /usr/lib/python2.6/dist-packages/pycuda/tools.pyc in context_dependent_memoize(func, *args) 402 context_dependent_memoized_functions.append(func) 403 arg_dict = ctx_dict.setdefault(cur_ctx, {}) --> 404 result = func(*args) 405 arg_dict[args] = result 406 return result /usr/lib/python2.6/dist-packages/pycuda/elementwise.pyc in get_fill_kernel(dtype) 481 }, 482 "z[i] = a", --> 483 "fill") 484 485 @context_dependent_memoize /usr/lib/python2.6/dist-packages/pycuda/elementwise.pyc in get_elwise_kernel(arguments, operation, name, keep, options, **kwargs) 163 """ 164 func, arguments = get_elwise_kernel_and_types( --> 165 arguments, operation, name, keep, options, **kwargs) 166 167 return func /usr/lib/python2.6/dist-packages/pycuda/elementwise.pyc in get_elwise_kernel_and_types(arguments, operation, name, keep, options, use_range, **kwargs) 149 150 mod = module_builder(arguments, operation, name, --> 151 keep, options, **kwargs) 152 153 from pycuda.tools import get_arg_type /usr/lib/python2.6/dist-packages/pycuda/elementwise.pyc in get_elwise_module(arguments, operation, name, keep, options, preamble, loop_prep, after_loop) 73 "after_loop": after_loop, 74 }, ---> 75 options=options, keep=keep) 76 77 /usr/lib/python2.6/dist-packages/pycuda/compiler.pyc in __init__(self, source, nvcc, options, keep, no_extern_c, arch, code, cache_dir, include_dirs) 280 281 cubin = compile(source, nvcc, options, keep, no_extern_c, --> 282 arch, code, cache_dir, include_dirs) 283 284 from pycuda.driver import module_from_buffer /usr/lib/python2.6/dist-packages/pycuda/compiler.pyc in compile(source, nvcc, options, keep, no_extern_c, arch, code, cache_dir, include_dirs) 270 options.append("-I"+i) 271 --> 272 return compile_plain(source, options, keep, nvcc, cache_dir) 273 274 /usr/lib/python2.6/dist-packages/pycuda/compiler.pyc in compile_plain(source, options, keep, nvcc, cache_dir) 75 76 if '#include' in source: ---> 77 checksum.update(preprocess_source(source, options, nvcc)) 78 else: 79 checksum.update(source) /usr/lib/python2.6/dist-packages/pycuda/compiler.pyc in preprocess_source(source, options, nvcc) 53 from pycuda.driver import CompileError 54 raise CompileError("nvcc preprocessing of %s failed" % source_path, ---> 55 cmdline, stderr=stderr) 56 57 # sanity check CompileError: nvcc preprocessing of /tmp/tmpuzni5x.cu failed [command: nvcc --preprocess -arch sm_35 -I/usr/lib/python2.6/dist-packages/pycuda/../../../../include/pycuda /tmp/tmpuzni5x.cu --compiler-options -P] [stderr: nvcc fatal : Value 'sm_35' is not defined for option 'gpu-architecture' ] Do you have any idea on how to fix this ? Thanks for your ideas. Cheers, -- Jérôme Kieffer On-Line Data analysis / Software Group ISDD / ESRF tel +33 476 882 445 _______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
