An initialization error could be raised e.g. if you are trying to create multiple CUDA context objects.
In your case it seems as if a delete method might be running into it. Could you check dmesg for xid error messages and see, if e.g. the driver was crashing etc.?