diff --git a/tensorflow/core/kernels/data/experimental/parse_example_dataset_op.cc b/tensorflow/core/kernels/data/experimental/parse_example_dataset_op.cc index 6eace17c7e4..151f6fd474b 100644 --- a/tensorflow/core/kernels/data/experimental/parse_example_dataset_op.cc +++ b/tensorflow/core/kernels/data/experimental/parse_example_dataset_op.cc @@ -75,9 +75,10 @@ class ParseExampleDatasetOp : public UnaryDatasetOpKernel { int64 num_parallel_calls = 0; OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, "num_parallel_calls", &num_parallel_calls)); - OP_REQUIRES(ctx, num_parallel_calls > 0, - errors::InvalidArgument( - "num_parallel_calls must be greater than zero.")); + OP_REQUIRES( + ctx, num_parallel_calls > 0 || num_parallel_calls == model::kAutoTune, + errors::InvalidArgument( + "num_parallel_calls must be greater than zero.")); OpInputList dense_default_tensors; OP_REQUIRES_OK(ctx,