Skip to main content

NDArray::setDevice

public static function setDevice(int $deviceId): void;

Specifies which GPU device to use by ID. By default, all operations are performed on GPU id = 0.

Use the dumpDevices method if you want to check the ID in a multi-GPU environment.