class_docstr: Tests the Grappler remapper optimizer.
code: def maybe_skip_test(self, mode):
      if mode == "cuda":
          # It seems the windows os cannot correctly query the cuda_version.
          # TODO(kaixih@nvidia): Remove this when it works.
          if os.name == "nt":
              self.skipTest("This test doesn't support Windows")
  
          # The cublaslt matmul with gelu epilog is only supported since cuda 11.4.
          if not test.is_gpu_available(cuda_only=True):
              self.skipTest("This test requires GPU.")
          cuda_version_str = sysconfig_lib.get_build_info().get(
              "cuda_version", "0.0"
          )
          cuda_version = tuple(
              [int(x) for x in cuda_version_str.split(".")]
          )
          if cuda_version < (11, 4):
              self.skipTest("This test requires CUDA >= 11.4.")
  
      if mode == "mkl" and not test_util.IsMklEnabled():
          self.skipTest("MKL is not enabled.")
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  from absl.testing import parameterized
  from tensorflow.core.protobuf import config_pb2
  from tensorflow.core.protobuf import rewriter_config_pb2
  from tensorflow.python.client import session
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import meta_graph
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import test_util
  from tensorflow.python.grappler import tf_optimizer
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import init_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops import random_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import sysconfig
  from tensorflow.python.platform import test
  from tensorflow.python.util import _pywrap_utils
label_desc: Use image node_id 2 for calling the RemapperTest obj's underlying member method code with example usage: obj.maybe_skip_test(mode) without return types