Merge pull request #40089 from tg-at-google:patch-12

PiperOrigin-RevId: 314562794
Change-Id: I4ee281e9f5d4fee17ba33fbebe64f50472fd18c2
This commit is contained in:
TensorFlower Gardener 2020-06-03 11:18:37 -07:00
commit 68744f8673

View File

@ -113,7 +113,7 @@ SubAllocator* AllocatorFactoryRegistry::GetSubAllocator(int numa_node) {
CHECK_LE(numa_node, port::NUMANumNodes());
index = 1 + numa_node;
}
if (best_entry->sub_allocators.size() < (index + 1)) {
if (best_entry->sub_allocators.size() < static_cast<size_t>(index + 1)) {
best_entry->sub_allocators.resize(index + 1);
}
if (!best_entry->sub_allocators[index].get()) {