For reference - it works fine on my machine. Using my machine (WinXP 32 bit, CUDA 2.3, pyCUDA 0.94 latest master, 9800GT) I get: In [19]: %run dangoodman.py kernel.cu tmpxft_00000ebc_00000000-3_kernel.cudafe1.gpu tmpxft_00000ebc_00000000-8_kernel.cudafe2.gpu ptxas C:\DOCUME~1\parc\LOCALS~1\Temp/tmpxft_00000ebc_00000000-4_kernel.ptx, line 66; warning : Double is not supported. Demoting to float [ 5.26354425e-315 0.00000000e+000 0.00000000e+000 0.00000000e+000 0.00000000e+000 0.00000000e+000 0.00000000e+000 0.00000000e+000 0.00000000e+000 0.00000000e+000]
If I replace exp() with sin() then that works too (but the output in x[0] is 0 as sin(0) is 0). Noting Fabrizio's point the compiler is warning about Double in the above output. i. On 3 March 2010 16:59, Dan Goodman <dg.pyc...@thesamovar.net> wrote: > Hi all, > > I have a really weird bug that I can't explain at all. The following code > crashes: > > from numpy import zeros > from pycuda import autoinit > from pycuda import gpuarray > from pycuda import compiler > x = gpuarray.to_gpu(zeros(10)) > src = ''' > __global__ void f(double *x) > { > x[0] = exp(0.0); > } > ''' > gpu_mod = compiler.SourceModule(src) > gpu_func = gpu_mod.get_function("f") > gpu_func(x, block=(1,1,1), grid=(1,1)) > print x.get() > > Now if I replace exp(0.0) with just 0.0 it works fine. It doesn't crash with > sin(0.0) nor with expf. The output I get when I run it is: > > [ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.] > PyCUDA WARNING: a clean-up operation failed (dead context maybe?) > cuMemFree failed: unknown > PyCUDA WARNING: a clean-up operation failed (dead context maybe?) > cuModuleUnload failed: unknown > > I'm running PyCUDA 0.94. Not sure how to tell you which version exactly, but > the top line of the git log is: > > commit 9528d732e1179aea0d0eacd9a3e12423a1545728 > Merge: 955c1e5 9f26615 > Author: Andreas Kloeckner <inf...@tiker.net> > Date: Sun Jan 31 12:23:50 2010 -0500 > Merge branch 'master' of t:src/pycuda > > I'm running the CUDA 3.0 beta on a GTX 295. > > Any ideas? > > Dan > > _______________________________________________ > PyCUDA mailing list > pyc...@host304.hostmonster.com > http://host304.hostmonster.com/mailman/listinfo/pycuda_tiker.net > -- Ian Ozsvald (A.I. researcher, screencaster) i...@ianozsvald.com http://IanOzsvald.com http://morconsulting.com/ http://TheScreencastingHandbook.com http://ProCasts.co.uk/examples.html http://twitter.com/ianozsvald _______________________________________________ PyCUDA mailing list pyc...@host304.hostmonster.com http://host304.hostmonster.com/mailman/listinfo/pycuda_tiker.net