MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / cpu_allocator

Function cpu_allocator

tensorflow/core/framework/allocator.cc:80–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80Allocator* cpu_allocator(int numa_node) {
81 // Correctness relies on devices being created prior to the first call
82 // to cpu_allocator, if devices are ever to be created in the process.
83 // Device creation in turn triggers ProcessState creation and the availability
84 // of the correct access pointer via this function call.
85 static ProcessStateInterface* ps =
86 AllocatorFactoryRegistry::singleton()->process_state();
87 if (ps) {
88 return ps->GetCPUAllocator(numa_node);
89 } else {
90 return cpu_allocator_base();
91 }
92}
93
94Allocator* pmem_allocator() {
95 static Allocator* pmem_alloc =

Callers 15

mainFunction · 0.85
TESTFunction · 0.85
InitStarClientTagFunction · 0.85
InitStarServerTagFunction · 0.85
GetNextInternalMethod · 0.85
ParseMethod · 0.85
LogAllocationMethod · 0.85
LogDeallocationMethod · 0.85
TfLiteTensorBufferMethod · 0.85
~TfLiteTensorBufferMethod · 0.85

Calls 3

cpu_allocator_baseFunction · 0.85
process_stateMethod · 0.80
GetCPUAllocatorMethod · 0.45

Tested by 15

mainFunction · 0.68
TESTFunction · 0.68
GetAllocatorMethod · 0.68
TESTFunction · 0.68
BM_AllocationFunction · 0.68
ExpectSuccessMethod · 0.68
ExpectFailureMethod · 0.68
GetAllocatorMethod · 0.68