w...@synchroverge.com writes: > Hi everyone, > > This has been causing me problems for a few weeks now, and I'm hoping > someone would be able to shed some light on it. I need to run some > CPU-intensive tasks in the background while launching GPU kernels in the > main loop of a project I'm working on, so I've been trying to offload to > a multiprocessing process. But it seems what whenever I try to launch a > kernel while the background process is active, the kernel fails to get > the correct results (does not throw any errors). Once the kernel > returns wrong results once, it continues to fail for the remainder of > the run, even if the background process has already finished and joined. > > I've put together a small code sample to demonstrate this [attached]. > > Is this known behaviour, and if so, is there any workaround I can use? > Or am I doing something completely wrong?
Forking a process that has an active CUDA context is undefined behavior. Andreas
pgp0r8IB4wdBH.pgp
Description: PGP signature
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda