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

Method Produce

tensorflow/core/kernels/hash_ops/tensible_variable_ops.cc:135–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void TensorProducerImpl::Produce(const TensorGenerator::Consumer& consumer) {
136 TensorProducerContext* ctx = new TensorProducerContext;
137 ctx->frame.reset(new TensorProducerCallFrame);
138 ctx->f_opts.reset(new FunctionLibraryRuntime::Options);
139 ctx->step_container.reset(new ScopedStepContainer(
140 ctx->f_opts->step_id, [this](const string& name) {
141 lib_->device()->resource_manager()->Cleanup(name).IgnoreError();
142 }));
143 ctx->f_opts->step_container = ctx->step_container.get();
144 ctx->f_opts->runner = &runner_;
145 ctx->cancellation_manager.reset(new CancellationManager);
146 ctx->f_opts->cancellation_manager = ctx->cancellation_manager.get();
147 CancellationManager c_mgr;
148 ctx->f_opts->cancellation_manager = &c_mgr;
149
150 Ref();
151 lib_->Run(*ctx->f_opts, f_handle_, ctx->frame.get(),
152 [this, ctx, consumer] (const Status& st) {
153 consumer(st, ctx->frame->GetRet());
154 delete ctx;
155 Unref();
156 });
157}
158
159} // namespace
160

Callers 2

ProduceMethod · 0.45
ComputeAsyncMethod · 0.45

Calls 8

GetRetMethod · 0.80
resetMethod · 0.45
IgnoreErrorMethod · 0.45
CleanupMethod · 0.45
resource_managerMethod · 0.45
deviceMethod · 0.45
getMethod · 0.45
RunMethod · 0.45

Tested by

no test coverage detected