Fix setting out_mtypes in MemoryTypesForNode

Clear hostmem_attr vector before populating it with indices from "_output_hostmem" attribute so that it doesn't contain indices from "_input_hostmem" attribute.
This commit is contained in:
Krzysztof Laskowski 2020-07-20 14:19:13 +02:00 committed by GitHub
parent 8ee14cf0ff
commit 6fe5847c19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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