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

Method Compute

tensorflow/core/kernels/work_queue_ops.cc:274–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272 explicit WorkQueueSizeOp(OpKernelConstruction* ctx) : OpKernel(ctx) {}
273
274 void Compute(OpKernelContext* ctx) override {
275 WorkQueue* work_queue;
276 OP_REQUIRES_OK(ctx,
277 LookupResource(ctx, HandleFromInput(ctx, 0), &work_queue));
278 Tensor* size;
279 OP_REQUIRES_OK(ctx, ctx->allocate_output(0, TensorShape({}), &size));
280 OP_REQUIRES_OK(ctx, work_queue->GetSize(size));
281 }
282};
283
284REGISTER_KERNEL_BUILDER(Name("WorkQueueSize").Device(DEVICE_CPU),

Callers

nothing calls this directly

Calls 5

LookupResourceFunction · 0.85
HandleFromInputFunction · 0.85
allocate_outputMethod · 0.80
TensorShapeClass · 0.50
GetSizeMethod · 0.45

Tested by

no test coverage detected