diff options
author | 2017-06-09 16:08:03 -0700 | |
---|---|---|
committer | 2017-06-09 16:12:06 -0700 | |
commit | 15739221f7cb59a809cb617999a0b931d4a9480f (patch) | |
tree | 36c9b183598a1a651cb38534707bec2b23152849 /tensorflow/compiler/xla/service/logical_buffer.cc | |
parent | 0a2c50a4fb7911959e5202ab7f64664ea85a2a3b (diff) |
[XLA] Add support for logical buffer coloring.
Buffers can now be assigned "color" tags. Buffers that have different colors must live in separate allocations.
PiperOrigin-RevId: 158575828
Diffstat (limited to 'tensorflow/compiler/xla/service/logical_buffer.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/logical_buffer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/logical_buffer.cc b/tensorflow/compiler/xla/service/logical_buffer.cc index 971d35727f..d24a592f46 100644 --- a/tensorflow/compiler/xla/service/logical_buffer.cc +++ b/tensorflow/compiler/xla/service/logical_buffer.cc @@ -29,7 +29,7 @@ namespace xla { string LogicalBuffer::ToString() const { return tensorflow::strings::StrCat(instruction_->FullyQualifiedName(), "[", tensorflow::str_util::Join(index_, ","), - "](#", id_, ")"); + "](#", id_, " @", color_.value(), ")"); } std::ostream& operator<<(std::ostream& out, const LogicalBuffer& buffer) { @@ -55,6 +55,7 @@ LogicalBufferProto LogicalBuffer::ToProto(const SizeFunction& size_fn) const { LogicalBufferProto::Location proto_location = ToLocationProto(*instruction_, index_); proto.mutable_defined_at()->Swap(&proto_location); + proto.set_color(color_.value()); return proto; } |