Set newly created context as current (#431)
Some checks are pending
ZLUDA / Build (Linux) (push) Waiting to run
ZLUDA / Build (Windows) (push) Waiting to run
ZLUDA / Build AMD GPU unit tests (push) Waiting to run
ZLUDA / Run AMD GPU unit tests (push) Blocked by required conditions

This commit is contained in:
Andrzej Janik 2025-07-24 20:05:04 +02:00 committed by GitHub
commit e8e20294a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -188,6 +188,8 @@ pub(crate) unsafe fn create_v2(
dev: cuda_types::cuda::CUdevice,
) -> CUresult {
let handle = Context::wrap(Context::new(dev));
// TODO: optimize
set_current(handle)?;
*ctx = handle;
Ok(())
}