Rate this Page

torch.cpu.is_available#

torch.cpu.is_available()[source]#

Returns a bool indicating if CPU is currently available.

N.B. This function only exists to facilitate device-agnostic code

Return type

bool