ATLAS Offline Software
Loading...
Searching...
No Matches
CUDAConfigFlags.py
Go to the documentation of this file.
1# Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
2
3# Project import(s).
4from AthenaConfiguration.AthConfigFlags import AthConfigFlags
5from AthenaConfiguration.Enums import FlagEnum
6
7
8class CUDAStream(FlagEnum):
9 '''Enum for the strategy to select/provide a CUDA stream to algorithms/tools
10 that need to run operations on a CUDA device.
11 '''
12 # Use a single stream for the entire job, for all components.
13 Single = 'Single'
14 # Use one stream per event/slot.
15 PerEvent = 'PerEvent'
16 # Use one stream per component (algorithm/tool/service).
17 PerComponent = 'PerComponent'
18 # Use one stream per component and event/slot.
19 PerEventAndComponent = 'PerEventAndComponent'
20
21
23 '''Function to create the flags for using CUDA devices/GPUs in Athena
24 '''
25
26 # Create the flags container.
27 result = AthConfigFlags()
28
29 # Memory (resource) management flags.
30 result.addFlag('CUDA.Stream', CUDAStream.Single, type=CUDAStream,
31 help='Strategy for selecting/providing a CUDA stream')
32
33 # Return the container.
34 return result