You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SYCL][CUDA] Fix context setup for device infos (#8124)
Extend the `ScopedContext` to work with just a device, in that case it
will simply use the primary context.
This is helpful for entry points that only have a `pi_device` and no
`pi_context` but that still need some cuda calls that require an active
context, such as for the device infos.
This addresses a bug where getting the amount of free memory before
creating any queues or context, would simply crash.
This was partially solved in a previous PR
(#7906), however the previous PR was
releasing the primary context, but leaving it active on the current
thread, so getting the device info twice in a row would end up crashing
again since it would just use the active but released primary context.
This should address: #8117
0 commit comments