diff --git a/tensorflow/core/framework/memory_types.cc b/tensorflow/core/framework/memory_types.cc index d27ef1da61d..208ad20c21b 100644 --- a/tensorflow/core/framework/memory_types.cc +++ b/tensorflow/core/framework/memory_types.cc @@ -161,6 +161,7 @@ Status MemoryTypesForNode(const OpRegistryInterface* op_registry, } } } + hostmem_attr.clear(); if (TryGetNodeAttr(ndef, "_output_hostmem", &hostmem_attr)) { for (int32 i : hostmem_attr) { if (0 <= i && i < out_mtypes->size()) {