ATLAS Offline Software
Control
AthenaExamples
AthExCUDA
python
LinearTransformAsyncExampleConfig.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
#
4
# Simple ComponentAccumulator configuration for running
5
# AthCUDAExamples::LinearTransformAsyncExampleAlg#
6
7
# Core import(s).
8
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
9
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
10
from
AthenaConfiguration.ComponentFactory
import
CompFactory
11
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
12
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
13
14
# I/O import(s).
15
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
16
17
# System import(s).
18
import
sys
19
20
def
LinearTransformAsyncExampleAlgCfg
(flags, **kwargs):
21
'''Configure the example algorithm for running on a CUDA device.
22
'''
23
# Create an accumulator to hold the configuration.
24
result =
ComponentAccumulator
()
25
# Create the example algorithm.
26
alg = CompFactory.AthCUDAExamples.LinearTransformAsyncExampleAlg(**kwargs)
27
result.addEventAlgo(alg)
28
# Return the result to the caller.
29
return
result
30
31
if
__name__ ==
'__main__'
:
32
33
# Set up the job's flags.
34
flags =
initConfigFlags
()
35
flags.Concurrency.NumOffloadThreads = 2
36
flags.Exec.MaxEvents = 10000
37
flags.Input.Files = defaultTestFiles.AOD_RUN3_DATA
38
flags.fillFromArgs()
39
flags.lock()
40
41
# Set up the main services.
42
acc =
MainServicesCfg
(flags)
43
44
# Set up the input file reading.
45
acc.merge(
PoolReadCfg
(flags))
46
47
# Set up the example algorithm.
48
acc.merge(
LinearTransformAsyncExampleAlgCfg
(flags))
49
50
# Run the configuration.
51
sys.exit(acc.run().isFailure())
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition:
JetAnalysisCommon.py:302
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition:
MainServicesConfig.py:312
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition:
AllConfigFlags.py:19
python.LinearTransformAsyncExampleConfig.LinearTransformAsyncExampleAlgCfg
def LinearTransformAsyncExampleAlgCfg(flags, **kwargs)
Definition:
LinearTransformAsyncExampleConfig.py:20
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition:
PoolReadConfig.py:71
Generated on Mon Sep 29 2025 21:14:09 for ATLAS Offline Software by
1.8.18