class_docstr: Benchmarks for reductions.
class_docstr_tok: ["Benchmarks","for","reductions","."]
code: def benchmark_reduce_sum_grad_graph(self):
      config = config_pb2.ConfigProto(
          graph_options=config_pb2.GraphOptions(
              optimizer_options=config_pb2.OptimizerOptions(
                  opt_level=config_pb2.OptimizerOptions.L0
              )
          )
      )
      with ops.Graph().as_default(), session.Session(
          config=config
      ) as sess:
          tensor = constant_op.constant(
              np.zeros([100, 1000], dtype=np.float32)
          )
          reduction = math_ops.reduce_sum(tensor)
          (grad,) = gradients_impl.gradients(reduction, tensor)
  
          def fn():
              self.evaluate(grad.op)
  
          self._run(fn, 10000)
  
file_path: tensorflow/tensorflow/python/kernel_tests/math_ops/reduce_benchmark_test.py
imports: import time
  import numpy
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 4 for calling the ReduceBenchmarks obj's underlying member method code with example usage: obj.benchmark_reduce_sum_grad_graph() without return types