| 18 | namespace tensorflow { |
| 19 | namespace tfprof { |
| 20 | void TFProfTensor::Display(string* formatted_str, |
| 21 | TFProfTensorProto* tfprof_tensor_pb) { |
| 22 | if (formatted_str) { |
| 23 | if (formatted_str_.length() >= kTFProfTenosrMaxDisplayLen) { |
| 24 | *formatted_str = |
| 25 | strings::StrCat(formatted_str_, "...omitted from display\n\n"); |
| 26 | } else { |
| 27 | *formatted_str = formatted_str_; |
| 28 | } |
| 29 | } |
| 30 | if (tfprof_tensor_pb) { |
| 31 | tfprof_tensor_pb->MergeFrom(tfprof_tensor_pb_); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | void TFProfTensor::Build() { |
| 36 | tfprof_tensor_pb_.set_dtype(tensor_->dtype()); |
no test coverage detected