Device

class madspace.Device

Bases: pybind11_object

Compute backend a Tensor’s storage lives on.

One instance per physical device (CPU, or a specific CUDA or HIP GPU); obtained through cpu_device(), cuda_device() or hip_device() rather than constructed directly. Every device-dependent tensor operation (allocation, copy, the elementary kernels used to train the network globals) is dispatched through this interface.