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

Method GetElementBytes

tensorflow/core/kernels/file_slice_sendrecv_ops.cc:108–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108Status FileSliceSendOp::GetElementBytes(OpKernelContext* ctx,
109 const Tensor& file_path_t,
110 uint64& element_bytes) {
111
112 if (ctx->is_input_dead()) {
113 element_bytes = 0;
114 return Status::OK();
115 }
116
117 const string& file_path = file_path_t.scalar<tstring>()();
118 Env* env = Env::Default();
119
120 if (env->FileExists(file_path) != Status::OK()) {
121 element_bytes = 0;
122 return Status::OK();
123 }
124
125 return env->GetFileSize(file_path, &element_bytes);
126}
127
128Status FileSliceSendOp::SendUInt64MetaMsg(OpKernelContext* ctx,
129 const FrameAndIter& frame_iter,

Callers

nothing calls this directly

Calls 4

DefaultFunction · 0.85
is_input_deadMethod · 0.80
FileExistsMethod · 0.45
GetFileSizeMethod · 0.45

Tested by

no test coverage detected