diff options
author | Derek Murray <mrry@google.com> | 2018-01-18 12:18:49 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-01-18 12:22:39 -0800 |
commit | 07ee0c74226d641419e7ef4543817fb400a8b146 (patch) | |
tree | 67480022e05481db70d9b49e38e039caebee4209 /tensorflow/core/kernels/data/scan_dataset_op.cc | |
parent | 09a6446b4e61f5fc8aa8fcf3f5824ef6660e7fc2 (diff) |
[tf.data] Further simplify the `CapturedFunction::Run*()` interfaces.
All users of these interfaces had to use the same boilerplate to create a
`FunctionLibraryRuntime::Options`. This change moves that boilerplate inside
the `CapturedFunction` implementation.
PiperOrigin-RevId: 182418501
Diffstat (limited to 'tensorflow/core/kernels/data/scan_dataset_op.cc')
-rw-r--r-- | tensorflow/core/kernels/data/scan_dataset_op.cc | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tensorflow/core/kernels/data/scan_dataset_op.cc b/tensorflow/core/kernels/data/scan_dataset_op.cc index 05cd63d361..5dd6ff848e 100644 --- a/tensorflow/core/kernels/data/scan_dataset_op.cc +++ b/tensorflow/core/kernels/data/scan_dataset_op.cc @@ -170,19 +170,11 @@ class ScanDatasetOp : public UnaryDatasetOpKernel { std::copy(next_element.begin(), next_element.end(), std::back_inserter(args)); - FunctionLibraryRuntime::Options opts; - opts.step_id = CapturedFunction::generate_step_id(); - ScopedStepContainer step_container(opts.step_id, [ctx](const string& - name) { - ctx->lib()->device()->resource_manager()->Cleanup(name).IgnoreError(); - }); - opts.step_container = &step_container; - opts.runner = ctx->runner(); std::vector<Tensor> state_and_output; state_and_output.reserve(dataset()->state_types_.size() + output_dtypes().size()); - Status s = dataset()->captured_func_->Run(ctx, opts, std::move(args), + Status s = dataset()->captured_func_->Run(ctx, std::move(args), &state_and_output); if (s.ok()) { state_.clear(); |