warp.DeviceLike#
- warp.DeviceLike = warp.Device | str | None#
Annotation for arguments that Warp resolves to a
Device.A
DeviceLikevalue can be:A
Deviceobject, used as is.A device alias, such as
"cpu","cuda:0", or an alias registered withmap_cuda_device(). The alias"cuda"refers to the current CUDA device.None, which refers to the default device. Some functions may document a different meaning forNone.
get_device()returns theDevicethat a value refers to. See Devices for the available aliases and how to change the default device.