Skip to contents

Returns the number of CUDA-capable GPUs available on this machine. Returns 0 when the package was built without CUDA support or when no CUDA-capable device is found.

Usage

cuda_device_count()

Value

Non-negative integer: number of CUDA devices detected.