Exemplo n.º 1
0
 def testInvalidPbtxt(self):
     with self.assertRaisesRegex(errors.InvalidArgumentError,
                                 'Could not parse input proto'):
         mlir.convert_graph_def('some invalid proto')
Exemplo n.º 2
0
 def testImport(self):
     """Tests the basic flow of `tf.mlir.experimental.convert_graph_def`."""
     mlir_module = mlir.convert_graph_def('')
     # An empty graph should contain at least an empty main function.
     self.assertIn('func @main', mlir_module)