class_docstr: Test d9m-unimplemented exceptions from SparseTensorDenseMatmulOp.
  
  Test that tf.errors.UnimplementedError is thrown, as appropriate, by the
  GPU-specific code-paths through SparseTensorDenseMatmulOp when deterministic
  ops are enabled.
  
  This test assumes that sparse_tensor_dense_matmul_op_test.py runs equivalent
  test cases when deterministic ops are not enabled and will therefore detect
  erroneous exception throwing in those cases.
code: def testExceptionThrowing(self):
      with self.session(), test_util.force_gpu():
          for data_type in [
              np.float16,
              np.float32,
              np.float64,
              np.complex64,
              np.complex128,
          ]:
              sparse_input, dense_input = _gen_data(
                  m=5,
                  k=10,
                  n=7,
                  nnz=20,
                  row_occupied_rate=0.9,
                  data_type=data_type,
                  seed=456,
              )
              with self.assertRaisesRegex(
                  errors.UnimplementedError,
                  "A deterministic GPU implementation of SparseTensorDenseMatmulOp"
                  + " is not currently available.",
              ):
                  result = sparse_ops.sparse_tensor_dense_matmul(
                      sparse_input, dense_input
                  )
                  self.evaluate(result)
  
file_path: tensorflow-upstream/tensorflow/python/kernel_tests/sparse_ops/sparse_tensor_dense_matmul_op_d9m_test.py
imports: import random
  import numpy
  from tensorflow.python.framework import config
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import sparse_ops
  from tensorflow.python.platform import test
label_desc: Use image node_id 1 for calling the SparseTensorDenseMatmulOpDeterminismExceptionsTest obj's underlying member method code with example usage: obj.testExceptionThrowing() without return types