Hello,

I was wondering if the following will work:

- Main thread spins up thread B.
- Thread B creates a context, invokes a kernel, and creates an event.
- Event is saved.
- Thread B pops the context (kernel is still running at this point)
and finishes.
- Main thread join()s B and grabs the event.
- Main thread does other stuff and eventually calls .synchronize()

Does that work?  Or will trying to use an event after popping the
associated context (and from a different thread) cause problems?  My
actual use case involves a thread C that's doing other things on a
second GPU.  Maybe instead of an event, I should just have the threads
block and then use the join to indicate when the kernel is done?  Any
advice appreciated.  :)

Thanks,
Eli

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to