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

Method Compute

tensorflow/core/framework/resource_mgr.h:781–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779
780template <typename T>
781void IsResourceInitialized<T>::Compute(OpKernelContext* ctx) {
782 Tensor* output;
783 OP_REQUIRES_OK(ctx, ctx->allocate_output(0, {}, &output));
784 T* object;
785 bool found;
786 if (LookupResource(ctx, HandleFromInput(ctx, 0), &object).ok()) {
787 found = true;
788 object->Unref();
789 } else {
790 found = false;
791 }
792
793 output->flat<bool>()(0) = found;
794}
795
796template <typename T>
797ResourceHandleOp<T>::ResourceHandleOp(OpKernelConstruction* context)

Callers

nothing calls this directly

Calls 11

LookupResourceFunction · 0.85
HandleFromInputFunction · 0.85
allocate_outputMethod · 0.80
set_on_hostMethod · 0.80
TensorShapeClass · 0.70
okMethod · 0.45
UnrefMethod · 0.45
allocate_tempMethod · 0.45
set_outputMethod · 0.45
loadMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected