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

Function SaveHashTable

tensorflow/core/kernels/save_restore_tensor.cc:382–401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382Status SaveHashTable(
383 BundleWriter* writer, HashTable* table,
384 const std::vector<TensibleVariable*>& tensibles,
385 const string& table_name, const std::vector<string>& tensibles_name,
386 int64 slice_beg, int64 slice_length, int64 slice_size) {
387 LOG(INFO) << "Save";
388 std::vector<std::pair<int64, int64>> snapshot;
389 CoalescedHashTable* coalesced_table =
390 dynamic_cast<CoalescedHashTable*>(table);
391 if (coalesced_table == nullptr) {
392 snapshot = table->Snapshot();
393 } else {
394 TF_RETURN_IF_ERROR(coalesced_table->ChildSnapshot(table_name, &snapshot));
395 }
396 TF_RETURN_IF_ERROR(SaveHashTableHelper(
397 writer, snapshot, tensibles, table_name, tensibles_name,
398 slice_beg, slice_length, slice_size));
399 LOG(INFO) << "Save Done";
400 return Status::OK();
401}
402
403namespace {
404struct RestoreHashTableSlice {

Callers 2

ComputeMethod · 0.85
ComputeMethod · 0.85

Calls 3

SaveHashTableHelperFunction · 0.85
ChildSnapshotMethod · 0.80
SnapshotMethod · 0.45

Tested by

no test coverage detected