benchopt.helpers.requires_gpu.gpu_available#
- benchopt.helpers.requires_gpu.gpu_available(solver)#
Whether the runs of
solverwill have a GPU.Use it in
Solver.skipto check this consistently across backends from the machine runningbenchopt run. Withsubmitit, a GPU is requested bygresor agpus*option. Withdask, workers are assumed to have one.- Parameters:
- solverbenchopt.BaseSolver
The solver whose runs are checked.
- Returns:
- availablebool
True if the runs of
solverwill have a GPU.