Skip to content

Commit eb5f30d

Browse files
authored
[Embedding] Log error when EV has been initialized in EV Import OP. (#971)
Signed-off-by: chenbangduo.cbd <[email protected]>
1 parent 70b32df commit eb5f30d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: tensorflow/core/kernels/kv_variable_restore_ops.cc

+6
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,12 @@ class KvResourceImportV3Op: public AsyncOpKernel {
373373

374374
core::ScopedUnref unref_me(ev);
375375

376+
// EV should not be initialized at this time.
377+
if (ev->IsInitialized()) {
378+
LOG(ERROR) << "Import parameter for EV (" << name_string
379+
<< ") failed, this EV has already been initialized.";
380+
}
381+
376382
auto do_compute = [this, context, file_name_string, ev,
377383
name_string, done] () {
378384
BundleReader reader(Env::Default(), file_name_string);

0 commit comments

Comments
 (0)