remove unused cpu allocator factory

This commit is contained in:
liu.guangcong 2017-08-25 09:32:10 +08:00 committed by Martin Wicke
parent cf81d8e607
commit 0f726c6b71

View File

@ -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()) {