Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
HeterogeneousCore
SonicTriton
python
TritonService_cff.py
Go to the documentation of this file.
1
from
HeterogeneousCore.SonicTriton.TritonService_cfi
import
*
2
3
from
Configuration.ProcessModifiers.enableSonicTriton_cff
import
enableSonicTriton
4
5
_gpu_available_cached =
None
6
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
)
TritonService_cfi
TritonService_cff._gpu_available
def _gpu_available
Definition:
TritonService_cff.py:7
Generated for CMSSW Reference Manual by
1.8.5