| 51 | } |
| 52 | |
| 53 | bool TFShow::LookUpCheckPoint(const string& name, |
| 54 | std::unique_ptr<TFProfTensor>* tensor) { |
| 55 | if (name == kTFProfRoot || !ckpt_reader_ || !tensor) { |
| 56 | return false; |
| 57 | } |
| 58 | std::unique_ptr<Tensor> out_tensor; |
| 59 | TF_Status* status = TF_NewStatus(); |
| 60 | ckpt_reader_->GetTensor(name, &out_tensor, status); |
| 61 | if (TF_GetCode(status) != TF_OK) { |
| 62 | fprintf(stderr, "%s\n", TF_Message(status)); |
| 63 | TF_DeleteStatus(status); |
| 64 | return false; |
| 65 | } |
| 66 | tensor->reset(new TFProfTensor(std::move(out_tensor))); |
| 67 | TF_DeleteStatus(status); |
| 68 | return true; |
| 69 | } |
| 70 | |
| 71 | bool TFShow::ShouldShow(const ShowNode* node, const Options& opts, |
| 72 | int depth) const { |
nothing calls this directly
no test coverage detected