Code

Retrieving All Available GPUs Function

A utility function can be defined to return a list of all available GPUs. If no GPUs exist on the system, the function should return a list containing only the CPU device. This is useful for distributing workloads across all available hardware.

0

1

Updated 2026-05-09

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L