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

Method ComputeAsync

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

Source from the content-addressed store, hash-verified

399}
400
401void MakeIteratorOp::ComputeAsync(OpKernelContext* ctx, DoneCallback done) {
402 DatasetBase* dataset;
403 OP_REQUIRES_OK(ctx, GetDatasetFromVariantTensor(ctx->input(0), &dataset));
404 IteratorResource* iterator_resource;
405 OP_REQUIRES_OK(
406 ctx, LookupResource(ctx, HandleFromInput(ctx, 1), &iterator_resource));
407 background_worker_.Schedule(std::bind(
408 [ctx, iterator_resource, dataset](DoneCallback done) {
409 Status s = iterator_resource->SetIteratorFromDataset(ctx, dataset);
410 iterator_resource->Unref();
411 if (!s.ok()) {
412 ctx->SetStatus(s);
413 }
414 done();
415 },
416 std::move(done)));
417}
418
419void DeleteIteratorOp::Compute(OpKernelContext* ctx) {
420 ResourceHandle handle = ctx->input(0).flat<ResourceHandle>()(0);

Callers

nothing calls this directly

Calls 15

LookupResourceFunction · 0.85
HandleFromInputFunction · 0.85
InvalidArgumentFunction · 0.85
DataTypeStringFunction · 0.50
inputMethod · 0.45
ScheduleMethod · 0.45
UnrefMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected