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
75 result = ComponentAccumulator()
76
77
78
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
90 return result