torch.accelerator¶
This package introduces support for the current accelerator in python.
device_count |
Return the number of current accelerator available. |
is_available |
Check if there is an available accelerator. |
current_accelerator |
Return the device of the current accelerator. |
set_device_index |
Set the current device index to a given device. |
set_device_idx |
Set the current device index to a given device. |
current_device_index |
Return the index of a currently selected device for the current accelerator. |
current_device_idx |
Return the index of a currently selected device for the current accelerator. |
set_stream |
Set the current stream to a given stream. |
current_stream |
Return the currently selected stream for a given device. |
synchronize |
Wait for all kernels in all streams on the given device to complete. |