Zhangsheng Lai
2018-05-12 05:22:19 UTC
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?
Many thanks,
Zhangsheng
on-device segfault, the GPU context dies, and all the handles of objects
contained in it (including the function) become invalid.
HTH,
Andreas
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?
Many thanks,
Zhangsheng
Hi,
I'm trying to do some updates to a state which is a binary array. gputid
isI'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/
MultipleThreads)and it stores the state and the index of the array to be updated in
anotherclass 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
therespectively. 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
times.as it runs into errors and executes perfectly when i run it multiple
File "/root/anaconda3/lib/python3.6/site-packages/pycuda/driver.py",
line447, in function_prepared_call
func._set_block_shape(*block)
pycuda._driver.LogicError: cuFuncSetBlockShape failed: invalid resource
handle
I think the right way to interpret this is that if you cause anfunc._set_block_shape(*block)
pycuda._driver.LogicError: cuFuncSetBlockShape failed: invalid resource
handle
on-device segfault, the GPU context dies, and all the handles of objects
contained in it (including the function) become invalid.
HTH,
Andreas