diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2016-11-03 15:49:19 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-11-03 17:04:52 -0700 |
commit | e8ab831c63a885d3494679740dad9cae06212af6 (patch) | |
tree | af0ff68a53de85b82c70ea5b23ac3a5655bb4c08 /tensorflow/core/framework/memory_types.cc | |
parent | 717e6b485eba2bcaf1cdfb357a91c7268f93048b (diff) |
Internal cleanup.
Change: 138135876
Diffstat (limited to 'tensorflow/core/framework/memory_types.cc')
-rw-r--r-- | tensorflow/core/framework/memory_types.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tensorflow/core/framework/memory_types.cc b/tensorflow/core/framework/memory_types.cc index 923261c529..14d8d91490 100644 --- a/tensorflow/core/framework/memory_types.cc +++ b/tensorflow/core/framework/memory_types.cc @@ -116,6 +116,22 @@ Status MemoryTypesForNode(const OpRegistryInterface* op_registry, "' not found in OpDef: ", SummarizeOpDef(*op_def)); } + std::vector<int32> hostmem_attr; + if (GetNodeAttr(ndef, "_input_hostmem", &hostmem_attr).ok()) { + for (int32 i : hostmem_attr) { + if (0 <= i && i < inp_mtypes->size()) { + (*inp_mtypes)[i] = HOST_MEMORY; + } + } + } + if (GetNodeAttr(ndef, "_output_hostmem", &hostmem_attr).ok()) { + for (int32 i : hostmem_attr) { + if (0 <= i && i < out_mtypes->size()) { + (*out_mtypes)[i] = HOST_MEMORY; + } + } + } + return Status::OK(); } |