CMS 3D CMS Logo

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

Functions

def _gpu_available ()
 

Variables

 _gpu_available_cached
 

Function Documentation

◆ _gpu_available()

def TritonService_cff._gpu_available ( )
private

Definition at line 7 of file TritonService_cff.py.

7 def _gpu_available():
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 )
20 

Variable Documentation

◆ _gpu_available_cached

TritonService_cff._gpu_available_cached
private

Definition at line 5 of file TritonService_cff.py.