CMS 3D CMS Logo

TritonService_cff.py
Go to the documentation of this file.
2 
3 from Configuration.ProcessModifiers.enableSonicTriton_cff import enableSonicTriton
4 
5 _gpu_available_cached = None
6 
8  global _gpu_available_cached
9  if _gpu_available_cached is None:
10  import os
11  _gpu_available_cached = (os.system("nvidia-smi -L") == 0)
12  return _gpu_available_cached
13 
14 enableSonicTriton.toModify(TritonService,
15  fallback = dict(
16  enable = True,
17  useGPU = _gpu_available(),
18  ),
19 )