ATLAS Offline Software
Loading...
Searching...
No Matches
python.AthDeviceCompsConfig Namespace Reference

Functions

 HostCopyToolCfg (flags, **kwargs)
 HostMemoryResourceToolCfg (flags, **kwargs)
 DeviceMemoryResourceToolCfg (flags, **kwargs)
 SharedMemoryResourceToolCfg (flags, **kwargs)
 MemoryResourcesToolCfg (flags, **kwargs)
 CopyToolCfg (flags, **kwargs)
 CopiesToolCfg (flags, **kwargs)

Function Documentation

◆ CopiesToolCfg()

python.AthDeviceCompsConfig.CopiesToolCfg ( flags,
** kwargs )
Default tool providing the ICopiesTool interface for the selected backend

Definition at line 138 of file AthDeviceCompsConfig.py.

138def CopiesToolCfg(flags, **kwargs):
139 '''Default tool providing the ICopiesTool interface for the selected backend
140 '''
141
142 # Create an accumulator to hold the configuration.
143 result = ComponentAccumulator()
144
145 # Make a decision based on the selected backend.
146 if flags.Device.Backend == DeviceBackend.CUDA:
147 from AthCUDAServices.AthCUDAServicesConfig \
148 import CopiesToolCfg as CUDACopiesToolCfg
149 result.setPrivateTools(result.popToolsAndMerge(
150 CUDACopiesToolCfg(flags, **kwargs)))
151 else:
152 raise RuntimeError('No copies tool is available for the selected '
153 'backend: {}'.format(flags.Device.Backend))
154
155 # Return the CA.
156 return result

◆ CopyToolCfg()

python.AthDeviceCompsConfig.CopyToolCfg ( flags,
** kwargs )
Default tool providing the ICopyTool interface for the selected backend

Definition at line 117 of file AthDeviceCompsConfig.py.

117def CopyToolCfg(flags, **kwargs):
118 '''Default tool providing the ICopyTool interface for the selected backend
119 '''
120
121 # Create an accumulator to hold the configuration.
122 result = ComponentAccumulator()
123
124 # Make a decision based on the selected backend.
125 if flags.Device.Backend == DeviceBackend.CUDA:
126 from AthCUDAServices.AthCUDAServicesConfig \
127 import CopyToolCfg as CUDACopyToolCfg
128 result.setPrivateTools(result.popToolsAndMerge(
129 CUDACopyToolCfg(flags, **kwargs)))
130 else:
131 raise RuntimeError('No copy tool is available for the selected '
132 'backend: {}'.format(flags.Device.Backend))
133
134 # Return the CA.
135 return result
136
137

◆ DeviceMemoryResourceToolCfg()

python.AthDeviceCompsConfig.DeviceMemoryResourceToolCfg ( flags,
** kwargs )
Default "device side" memory resource provider tool

Definition at line 49 of file AthDeviceCompsConfig.py.

49def DeviceMemoryResourceToolCfg(flags, **kwargs):
50 '''Default "device side" memory resource provider tool
51 '''
52
53 # Create an accumulator to hold the configuration.
54 result = ComponentAccumulator()
55
56 # Make a decision based on the selected backend.
57 if flags.Device.Backend == DeviceBackend.CUDA:
58 from AthCUDAServices.AthCUDAServicesConfig \
59 import DeviceMemoryResourceToolCfg as \
60 CUDADeviceMemoryResourceToolCfg
61 result.setPrivateTools(result.popToolsAndMerge(
62 CUDADeviceMemoryResourceToolCfg(flags, **kwargs)))
63 else:
64 raise RuntimeError('No device memory resource tool is available for '
65 'the selected backend: {}'.format(
66 flags.Device.Backend))
67
68 # Return the CA.
69 return result
70
71

◆ HostCopyToolCfg()

python.AthDeviceCompsConfig.HostCopyToolCfg ( flags,
** kwargs )
Default "host side" copy object provider tool

Definition at line 11 of file AthDeviceCompsConfig.py.

11def HostCopyToolCfg(flags, **kwargs):
12 '''Default "host side" copy object provider tool
13 '''
14
15 # Create an accumulator to hold the configuration.
16 result = ComponentAccumulator()
17
18 # Create the tool in a simple way.
19 result.setPrivateTools(CompFactory.AthDevice.HostCopyTool(**kwargs))
20
21 # Return the CA.
22 return result
23
24

◆ HostMemoryResourceToolCfg()

python.AthDeviceCompsConfig.HostMemoryResourceToolCfg ( flags,
** kwargs )
Default "host side" memory resource provider tool

Definition at line 25 of file AthDeviceCompsConfig.py.

25def HostMemoryResourceToolCfg(flags, **kwargs):
26 '''Default "host side" memory resource provider tool
27 '''
28
29 # Create an accumulator to hold the configuration.
30 result = ComponentAccumulator()
31
32 # Make a decision based on the selected backend.
33 if flags.Device.Backend == DeviceBackend.CUDA:
34 from AthCUDAServices.AthCUDAServicesConfig \
35 import HostMemoryResourceToolCfg as CUDAHostMemoryResourceToolCfg
36 result.setPrivateTools(result.popToolsAndMerge(
37 CUDAHostMemoryResourceToolCfg(flags, **kwargs)))
38 else:
39 # For an unknown backend, we just fall back on the generic host memory
40 # resource tool.
41 result.setPrivateTools(
42 CompFactory.AthDevice.HostMemoryResourceTool(**kwargs))
43 pass
44
45 # Return the CA.
46 return result
47
48

◆ MemoryResourcesToolCfg()

python.AthDeviceCompsConfig.MemoryResourcesToolCfg ( flags,
** kwargs )
Default tool providing the IMemoryResourcesTool interface for the
   selected backend

Definition at line 95 of file AthDeviceCompsConfig.py.

95def MemoryResourcesToolCfg(flags, **kwargs):
96 '''Default tool providing the IMemoryResourcesTool interface for the
97 selected backend
98 '''
99
100 # Create an accumulator to hold the configuration.
101 result = ComponentAccumulator()
102
103 # Make a decision based on the selected backend.
104 if flags.Device.Backend == DeviceBackend.CUDA:
105 from AthCUDAServices.AthCUDAServicesConfig \
106 import MemoryResourcesToolCfg as CUDAMemoryResourcesToolCfg
107 result.setPrivateTools(result.popToolsAndMerge(
108 CUDAMemoryResourcesToolCfg(flags, **kwargs)))
109 else:
110 raise RuntimeError('No memory resources tool is available for the '
111 'selected backend: {}'.format(flags.Device.Backend))
112
113 # Return the CA.
114 return result
115
116

◆ SharedMemoryResourceToolCfg()

python.AthDeviceCompsConfig.SharedMemoryResourceToolCfg ( flags,
** kwargs )
Default "host/device shared" memory resource provider tool

Definition at line 72 of file AthDeviceCompsConfig.py.

72def SharedMemoryResourceToolCfg(flags, **kwargs):
73 '''Default "host/device shared" memory resource provider tool
74 '''
75
76 # Create an accumulator to hold the configuration.
77 result = ComponentAccumulator()
78
79 # Make a decision based on the selected backend.
80 if flags.Device.Backend == DeviceBackend.CUDA:
81 from AthCUDAServices.AthCUDAServicesConfig \
82 import ManagedMemoryResourceToolCfg as \
83 CUDAManagedMemoryResourceToolCfg
84 result.setPrivateTools(result.popToolsAndMerge(
85 CUDAManagedMemoryResourceToolCfg(flags, **kwargs)))
86 else:
87 raise RuntimeError('No shared memory resource tool is available for '
88 'the selected backend: {}'.format(
89 flags.Device.Backend))
90
91 # Return the CA.
92 return result
93
94