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

Method Update

tensorflow/core/summary/summary_db_writer.cc:692–716  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690 }
691
692 Status Update(Sqlite* db, int64 step, double computed_time, const Tensor& t,
693 const StringPiece& data, int64 rowid) {
694 const char* sql = R"sql(
695 UPDATE OR REPLACE
696 Tensors
697 SET
698 step = ?,
699 computed_time = ?,
700 dtype = ?,
701 shape = ?,
702 data = ?
703 WHERE
704 rowid = ?
705 )sql";
706 SqliteStatement stmt;
707 TF_RETURN_IF_ERROR(db->Prepare(sql, &stmt));
708 stmt.BindInt(1, step);
709 stmt.BindDouble(2, computed_time);
710 stmt.BindInt(3, t.dtype());
711 stmt.BindText(4, StringifyShape(t.shape()));
712 stmt.BindBlobUnsafe(5, data);
713 stmt.BindInt(6, rowid);
714 TF_RETURN_IF_ERROR(stmt.StepAndReset());
715 return Status::OK();
716 }
717
718 Status UpdateNdString(Sqlite* db, const Tensor& t, int64 tensor_rowid)
719 SQLITE_EXCLUSIVE_TRANSACTIONS_REQUIRED(*db) {

Callers 1

SetupTensorboardSqliteDbFunction · 0.45

Calls 9

StringifyShapeFunction · 0.85
BindIntMethod · 0.80
BindDoubleMethod · 0.80
BindTextMethod · 0.80
BindBlobUnsafeMethod · 0.80
StepAndResetMethod · 0.80
PrepareMethod · 0.45
dtypeMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected