CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
TritonService_cff Namespace Reference

Functions

def _gpu_available
 

Variables

 _gpu_available_cached = None
 

Function Documentation

def TritonService_cff._gpu_available ( )
private

Definition at line 7 of file TritonService_cff.py.

7 
8 def _gpu_available():
9  global _gpu_available_cached
10  if _gpu_available_cached is None:
11  import os
12  _gpu_available_cached = (os.system("nvidia-smi -L") == 0)
13  return _gpu_available_cached
14 
15 enableSonicTriton.toModify(TritonService,
16  fallback = dict(
17  enable = True,
18  useGPU = _gpu_available(),
19  ),
20 )

Variable Documentation

TritonService_cff._gpu_available_cached = None

Definition at line 5 of file TritonService_cff.py.