MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / LookUpCheckPoint

Method LookUpCheckPoint

tensorflow/core/profiler/internal/tfprof_show.cc:53–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53bool 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
71bool TFShow::ShouldShow(const ShowNode* node, const Options& opts,
72 int depth) const {

Callers

nothing calls this directly

Calls 6

TF_NewStatusFunction · 0.85
TF_GetCodeFunction · 0.85
TF_MessageFunction · 0.85
TF_DeleteStatusFunction · 0.85
GetTensorMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected