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

Method GetTensorInfo

tensorflow/core/util/tensor_bundle/tensor_bundle.cc:1165–1175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1163}
1164
1165Status BundleReader::GetTensorInfo(
1166 StringPiece key, int64* size,
1167 std::unique_ptr<RandomAccessFile>* file, int64* offset) {
1168 BundleEntryProto entry;
1169 TF_RETURN_IF_ERROR(GetBundleEntryProto(key, &entry));
1170 TF_RETURN_IF_ERROR(env_->NewRandomAccessFile(
1171 DataFilename(prefix_, entry.shard_id(), num_shards_), file));
1172 *size = entry.size();
1173 *offset = entry.offset();
1174 return Status::OK();
1175}
1176
1177Status BundleReader::ReadCurrent(Tensor* val) {
1178 CHECK(val != nullptr);

Callers 1

BeginMethod · 0.80

Calls 4

DataFilenameFunction · 0.85
NewRandomAccessFileMethod · 0.45
sizeMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected