I'm not very familar with cuda, thus I wld like to ask if you have any
guesses on what is leading to my on-device segfault?
I'm guessing that saving the ctx in the GPU thread class, pushing and
poping it before I run my code earlier might have caused it.
If so, is there any way I can avoid it?
On 12 May 2018 at 12:34, Andreas Kloeckner <lists(a)informa.tiker.net> wrote:
Zhangsheng Lai <dunno.noe(a)gmail.com> writes:
> I'm trying to do some updates to a state which is a binary array. gputid
> a GPU thread class (https://wiki.tiker.net/PyCuda/Examples/
> and it stores the state and the index of the array to be updated in
> class which can be accessed with gputid.mp.x_gpu and gputid.mp.neuron_gpu
> respectively. Below is my kernel that takes in the gputid and performs
> update of the state. However, it the output of the code is not consistent
> as it runs into errors and executes perfectly when i run it multiple
> The error msg makes no sense to me:
> File "/root/anaconda3/lib/python3.6/site-packages/pycuda/driver.py",
> 447, in function_prepared_call
> pycuda._driver.LogicError: cuFuncSetBlockShape failed: invalid resource
I think the right way to interpret this is that if you cause an
on-device segfault, the GPU context dies, and all the handles of objects
contained in it (including the function) become invalid.