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

Function LookupOrCreateResource

tensorflow/core/framework/resource_mgr.h:754–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752
753template <typename T>
754Status LookupOrCreateResource(OpKernelContext* ctx, const ResourceHandle& p,
755 T** value, std::function<Status(T**)> creator) {
756 TF_RETURN_IF_ERROR(internal::ValidateDeviceAndType<T>(ctx, p));
757 return ctx->resource_manager()->LookupOrCreate(p.container(), p.name(), value,
758 creator);
759}
760
761template <typename T>
762Status LookupOrCreateResource(OpKernelContext* ctx, const ResourceHandle& p,

Callers

nothing calls this directly

Calls 5

nameMethod · 0.65
LookupOrCreateMethod · 0.45
resource_managerMethod · 0.45
containerMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected