ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExCUDA
python
LinearTransformAsyncExampleConfig.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
# Copyright (C) 2002-2026 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 = 100
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())
LinearTransformAsyncExampleConfig.LinearTransformAsyncExampleAlgCfg
LinearTransformAsyncExampleAlgCfg(flags, **kwargs)
Definition
LinearTransformAsyncExampleConfig.py:20
Generated on
for ATLAS Offline Software by
1.17.0