[PyCUDA] releasing the GIL during init and make_context

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PyCUDA] releasing the GIL during init and make_context

Antoine Martin
Hi,

We use pycuda to access NVENC and our application (xpra) if very
sensitive to latency, unfortunately it seems that pycuda will hold the
GIL during driver.init() and driver.make_context() and those calls can
take hundreds of milliseconds to complete.
Is there any reason why this is the case?
Would you consider a change to pycuda to release the GIL?

Thanks,
Antoine
_______________________________________________
PyCUDA mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

[PyCUDA] Re: releasing the GIL during init and make_context

Andreas Kloeckner
Antoine Martin <[hidden email]> writes:
> We use pycuda to access NVENC and our application (xpra) if very
> sensitive to latency, unfortunately it seems that pycuda will hold the
> GIL during driver.init() and driver.make_context() and those calls can
> take hundreds of milliseconds to complete.
> Is there any reason why this is the case?
> Would you consider a change to pycuda to release the GIL?

No particular reason from my end. I'd be happy to consider a PR with
such a change. Should be pretty straightforward.

To help me run CI, it would be lovely if you could submit the PR here:

https://gitlab.tiker.net/inducer/pycuda

I've created an account for you.

Best,
Andreas

_______________________________________________
PyCUDA mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]

signature.asc (847 bytes) Download Attachment