[XLA] Deprecate BufferValue::color.

PiperOrigin-RevId: 318895000
Change-Id: I8ea6f18ffcb55a41a13180c84bbd0637d5a6e06f
This commit is contained in:
Berkin Ilbeyi 2020-06-29 14:32:00 -07:00 committed by TensorFlower Gardener
parent 1e1ce81457
commit 0e21ee9a48

View File

@ -108,18 +108,21 @@ class BufferValue {
// Return the color of the BufferValue. Differently colored buffers can not be
// parts of the same allocation.
ABSL_DEPRECATED("Use Layout::memory_space instead.")
Color color() const {
CHECK_NE(color_, kInvalidColor)
<< "Should not query the color of a buffer that was never colored";
return color_;
}
ABSL_DEPRECATED("Use Layout::memory_space instead.")
void set_color(Color color) {
CHECK_NE(color, kInvalidColor)
<< "Should not set the color of a buffer to the invalid color";
color_ = color;
}
ABSL_DEPRECATED("Use Layout::memory_space instead.")
bool has_color() const { return color_ != kInvalidColor; }
// Return the shape of the buffer. This reference points into the shape field