Return false instead of crashing in Tensor::SharesBufferWith if neither tensor...
Return false instead of crashing in Tensor::SharesBufferWith if neither tensor has a buffer assigned yet, since that is a valid state. Returning buf_ != nullptr && b.buf_ != nullptr && buf_->root_buffer() == b.buf_->root_buffer(); still satisfies the contract in the header, i.e. "True iff the two tensors use the same underlying refcounted storage." PiperOrigin-RevId: 185431574
Loading
Please sign in to comment