Shortcuts

device

class torch.xpu.device(device)[source][source]

Context-manager that changes the selected device.

Parameters

device (torch.device or int or str) – device index to select. It’s a no-op if this argument is a negative integer or None.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources