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

Reply via email to