remove unused cpu allocator factory
This commit is contained in:
parent
cf81d8e607
commit
0f726c6b71
@ -117,16 +117,6 @@ class CPUAllocator : public Allocator {
|
|||||||
TF_DISALLOW_COPY_AND_ASSIGN(CPUAllocator);
|
TF_DISALLOW_COPY_AND_ASSIGN(CPUAllocator);
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace {
|
|
||||||
Allocator* MakeCpuAllocator() {
|
|
||||||
Allocator* allocator = new CPUAllocator;
|
|
||||||
if (cpu_allocator_collect_full_stats || LogMemory::IsEnabled()) {
|
|
||||||
allocator = new TrackingAllocator(allocator, true);
|
|
||||||
}
|
|
||||||
return allocator;
|
|
||||||
}
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
Allocator* cpu_allocator() {
|
Allocator* cpu_allocator() {
|
||||||
static Allocator* cpu_alloc = AllocatorRegistry::Global()->GetAllocator();
|
static Allocator* cpu_alloc = AllocatorRegistry::Global()->GetAllocator();
|
||||||
if (cpu_allocator_collect_full_stats && !cpu_alloc->TracksAllocationSizes()) {
|
if (cpu_allocator_collect_full_stats && !cpu_alloc->TracksAllocationSizes()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user