def testInvalidPbtxt(self): with self.assertRaisesRegex(errors.InvalidArgumentError, 'Could not parse input proto'): mlir.convert_graph_def('some invalid proto')
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)