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

Method ComputeAsync

tensorflow/core/kernels/queue_op.cc:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 : AsyncOpKernel(context) {}
52
53void QueueOpKernel::ComputeAsync(OpKernelContext* ctx, DoneCallback callback) {
54 QueueInterface* queue;
55 if (ctx->input_dtype(0) == DT_RESOURCE) {
56 OP_REQUIRES_OK_ASYNC(
57 ctx, LookupResource(ctx, HandleFromInput(ctx, 0), &queue), callback);
58 } else {
59 OP_REQUIRES_OK_ASYNC(ctx, GetResourceFromContext(ctx, "handle", &queue),
60 callback);
61 }
62 ComputeAsync(ctx, queue, [callback, queue]() {
63 queue->Unref();
64 callback();
65 });
66}
67
68QueueAccessOpKernel::QueueAccessOpKernel(OpKernelConstruction* context)
69 : QueueOpKernel(context) {

Callers

nothing calls this directly

Calls 15

LookupResourceFunction · 0.85
HandleFromInputFunction · 0.85
GetResourceFromContextFunction · 0.85
callbackFunction · 0.85
InvalidArgumentFunction · 0.85
MatchSignatureMethod · 0.80
output_listMethod · 0.80
allocate_outputMethod · 0.80
is_closedMethod · 0.80
TensorShapeClass · 0.50
input_dtypeMethod · 0.45
UnrefMethod · 0.45

Tested by

no test coverage detected