MCPcopy Create free account
hub / github.com/RolnickLab/climart / set_gpu

Function set_gpu

climart/utils/utils.py:171–173  ·  view source on GitHub ↗
(gpu_id)

Source from the content-addressed store, hash-verified

169
170
171def set_gpu(gpu_id):
172 os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
173 os.environ["CUDA_VISIBLE_DEVICES"] = str(gpu_id)
174
175
176def set_seed(seed, device='cuda'):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected