Assign a device alias to a CUDA context.
This function can be used to create a wp.Device for an external CUDA context.
If a wp.Device already exists for the given context, it’s alias will change to the given value.
- Parameters:
alias (str) – A unique string to identify the device.
context (c_void_p | None) – A CUDA context pointer (CUcontext). If None, the currently bound CUDA context will be used.
- Returns:
The associated wp.Device.
- Return type:
Device