ATLAS Offline Software
Loading...
Searching...
No Matches
AthCUDAServicesConfig Namespace Reference

Functions

 GPUSystemInfoSvcCfg (flags)
 HostMemoryResourceToolCfg (flags, **kwargs)
 DeviceMemoryResourceToolCfg (flags, **kwargs)
 ManagedMemoryResourceToolCfg (flags, **kwargs)

Function Documentation

◆ DeviceMemoryResourceToolCfg()

AthCUDAServicesConfig.DeviceMemoryResourceToolCfg ( flags,
** kwargs )
Default CUDA device memory resource tool to use

It makes sure that appropriate caching would be used, as allocating device
memory is relatively slow.

Definition at line 41 of file AthCUDAServicesConfig.py.

41def DeviceMemoryResourceToolCfg(flags, **kwargs):
42 '''Default CUDA device memory resource tool to use
43
44 It makes sure that appropriate caching would be used, as allocating device
45 memory is relatively slow.
46 '''
47
48 # Create an accumulator to hold the configuration.
49 result = ComponentAccumulator()
50
51 # Create the components that would collaborate to provide thread-safe
52 # caching to the "bare" memory resource.
53 deviceTool = CompFactory.AthCUDA.DeviceMemoryResourceTool(**kwargs)
54 cacheSvc = CompFactory.AthDevice.BinaryPageMemoryResourceSvc(
55 'CUDADeviceCachedMemoryResourceSvc',
56 MRTool=deviceTool)
57 result.addService(cacheSvc)
58 finalTool = CompFactory.AthDevice.MemoryResourceSvcAdaptorTool(
59 'CUDADeviceCachedMemoryResourceTool',
60 MRSvc=cacheSvc)
61 result.setPrivateTools(finalTool)
62
63 # Return the CA.
64 return result
65
66

◆ GPUSystemInfoSvcCfg()

AthCUDAServicesConfig.GPUSystemInfoSvcCfg ( flags)

Definition at line 8 of file AthCUDAServicesConfig.py.

8def GPUSystemInfoSvcCfg(flags):
9 acc = ComponentAccumulator()
10 svc = CompFactory.getComp("AthCUDA::GPUSystemInfoSvc")("GPUSystemInfoSvc")
11 acc.addService(svc)
12 return acc
13
14

◆ HostMemoryResourceToolCfg()

AthCUDAServicesConfig.HostMemoryResourceToolCfg ( flags,
** kwargs )
Default CUDA host memory resource tool to use

It makes sure that appropriate caching would be used, as allocating pinned
host memory is relatively slow.

Definition at line 15 of file AthCUDAServicesConfig.py.

15def HostMemoryResourceToolCfg(flags, **kwargs):
16 '''Default CUDA host memory resource tool to use
17
18 It makes sure that appropriate caching would be used, as allocating pinned
19 host memory is relatively slow.
20 '''
21
22 # Create an accumulator to hold the configuration.
23 result = ComponentAccumulator()
24
25 # Create the components that would collaborate to provide thread-safe
26 # caching to the "bare" memory resource.
27 hostTool = CompFactory.AthCUDA.HostMemoryResourceTool(**kwargs)
28 cacheSvc = CompFactory.AthDevice.BinaryPageMemoryResourceSvc(
29 'CUDAHostCachedMemoryResourceSvc',
30 MRTool=hostTool)
31 result.addService(cacheSvc)
32 finalTool = CompFactory.AthDevice.MemoryResourceSvcAdaptorTool(
33 'CUDAHostCachedMemoryResourceTool',
34 MRSvc=cacheSvc)
35 result.setPrivateTools(finalTool)
36
37 # Return the CA.
38 return result
39
40

◆ ManagedMemoryResourceToolCfg()

AthCUDAServicesConfig.ManagedMemoryResourceToolCfg ( flags,
** kwargs )
Default CUDA managed memory resource tool to use

It makes sure that appropriate caching would be used, as allocating managed
memory is relatively slow.

Definition at line 67 of file AthCUDAServicesConfig.py.

67def ManagedMemoryResourceToolCfg(flags, **kwargs):
68 '''Default CUDA managed memory resource tool to use
69
70 It makes sure that appropriate caching would be used, as allocating managed
71 memory is relatively slow.
72 '''
73
74 # Create an accumulator to hold the configuration.
75 result = ComponentAccumulator()
76
77 # Create the components that would collaborate to provide thread-safe
78 # caching to the "bare" memory resource.
79 managedTool = CompFactory.AthCUDA.ManagedMemoryResourceTool(**kwargs)
80 cacheSvc = CompFactory.AthDevice.BinaryPageMemoryResourceSvc(
81 'CUDAManagedCachedMemoryResourceSvc',
82 MRTool=managedTool)
83 result.addService(cacheSvc)
84 finalTool = CompFactory.AthDevice.MemoryResourceSvcAdaptorTool(
85 'CUDAManagedCachedMemoryResourceTool',
86 MRSvc=cacheSvc)
87 result.setPrivateTools(finalTool)
88
89 # Return the CA.
90 return result