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

Method ComputeAsync

tensorflow/core/kernels/batch_kernels.cc:1264–1279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1262 }
1263
1264 void ComputeAsync(OpKernelContext* c, DoneCallback done) final {
1265 UnbatchGradResource* ubr;
1266 std::function<Status(UnbatchGradResource**)> creator =
1267 [](UnbatchGradResource** r) {
1268 *r = new UnbatchGradResource();
1269 return Status::OK();
1270 };
1271 OP_REQUIRES_OK_ASYNC(c,
1272 c->resource_manager()->LookupOrCreate(
1273 container_, shared_name_, &ubr, creator),
1274 done);
1275 Status status = ubr->Compute(c, done);
1276 ubr->Unref();
1277 OP_REQUIRES_OK_ASYNC(c, status, done);
1278 // Assume ubr calls done, so nothing to do here.
1279 }
1280
1281 private:
1282 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