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

Method Compute

tensorflow/core/kernels/data/iterator_ops.cc:419–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

417}
418
419void DeleteIteratorOp::Compute(OpKernelContext* ctx) {
420 ResourceHandle handle = ctx->input(0).flat<ResourceHandle>()(0);
421 // The iterator resource is guaranteed to exist because the variant tensor
422 // wrapping the deleter is provided as an unused input to this op, which
423 // guarantees that it has not run yet.
424 Status s = ctx->resource_manager()->Delete(handle);
425 if (errors::IsNotFound(s)) {
426 // TODO(b/135948230): Investigate why is the above statement not true and
427 // then get rid of the special case.
428 ctx->SetStatus(Status::OK());
429 return;
430 }
431 ctx->SetStatus(s);
432}
433
434namespace {
435

Callers

nothing calls this directly

Calls 15

LookupResourceFunction · 0.85
HandleFromInputFunction · 0.85
InvalidArgumentFunction · 0.85
VerifyTypesMatchFunction · 0.85
VerifyShapesCompatibleFunction · 0.85
allocate_outputMethod · 0.80
nameMethod · 0.65
IsScalarFunction · 0.50
TensorShapeClass · 0.50
inputMethod · 0.45
DeleteMethod · 0.45
resource_managerMethod · 0.45

Tested by

no test coverage detected