class_docstr: Tests for auto-compilation on CPU/GPU devices.
docstr: Tests that JIT computations can ignore formal parameters.
docstr_tok: ["Tests","that","JIT","computations","can","ignore","formal","parameters","."]
code: def testIgnoredArguments(self):
      """Tests that JIT computations can ignore formal parameters."""
  
      with self.session(config=NoRewriteSessionConfig()) as sess:
          x = array_ops.placeholder(dtypes.int32)
          y = array_ops.placeholder(dtypes.int32)
          with jit_scope():
              z = math_ops.add(x, x)
              w = math_ops.add(y, y)
              # Pulls 'w' into the same compilation via control dependencies.
              with ops.control_dependencies([w]):
                  n = control_flow_ops.no_op()
              with ops.control_dependencies([n]):
                  t = math_ops.add(z, z)
  
          run_metadata = config_pb2.RunMetadata()
          out = test_utils.RunWithWarmup(
              sess,
              t,
              {x: np.int32(7), y: np.int32(404)},
              run_metadata=run_metadata,
              options=config_pb2.RunOptions(
                  trace_level=config_pb2.RunOptions.FULL_TRACE
              ),
          )
          self.assertTrue(MetadataHasXlaRunOp(run_metadata))
          self.assertAllClose(28, out)
  
imports: import os
  import numpy
  from tensorflow.compiler.tests import test_utils
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.compiler.xla import jit
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import function
  from tensorflow.python.framework import ops
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import cond
  from tensorflow.python.ops import control_flow_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import while_loop
  from tensorflow.python.platform import test
label_desc: Use image node_id 2 for calling the XlaCompilationTest obj's underlying member method code with example usage: obj.testIgnoredArguments() without return types