This tutorial will draw from the Policy documentation to walk through how to use ProcessGroup to set what GPUs to use for a gien function or process as well as how to do it with multiprocessing.
Policy
ProcessGroup