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

Method ComputeAsync

tensorflow/core/kernels/batch_kernels.cc:1078–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1076 }
1077
1078 void ComputeAsync(OpKernelContext* c, DoneCallback done) final {
1079 UnbatchResource* ubr;
1080 std::function<Status(UnbatchResource**)> creator =
1081 [this](UnbatchResource** r) {
1082 *r = new UnbatchResource(timeout_micros_);
1083 return Status::OK();
1084 };
1085 OP_REQUIRES_OK_ASYNC(c,
1086 c->resource_manager()->LookupOrCreate(
1087 container_, shared_name_, &ubr, creator),
1088 done);
1089 auto status = ubr->Compute(c, done);
1090 ubr->Unref();
1091 OP_REQUIRES_OK_ASYNC(c, status, done);
1092 // Assume ubr calls done, so nothing to do here.
1093 }
1094
1095 private:
1096 string container_;

Callers

nothing calls this directly

Calls 4

LookupOrCreateMethod · 0.45
resource_managerMethod · 0.45
ComputeMethod · 0.45
UnrefMethod · 0.45

Tested by

no test coverage detected