mlx.core.device_count

Contents

mlx.core.device_count#

device_count(device_type: mlx.core.DeviceType) int#

Get the number of available devices for the given device type.

Parameters:

device_type (DeviceType) – The type of device to query (cpu or gpu).

Returns:

Number of devices.

Return type:

int