parameters: (module, saved_model_dir: Optional[str] = None, **kwargs)
docstring: Compiles a tf.Module to an IREE binary (by saving to disk).
  
    Args:
      module: The tf.Module instance to convert to MLIR
      saved_model_dir: Optional path to save the tf.Module to. The module will not
        be persisted on disk outside of this call if this is not provided.
      **kwargs: Keyword args corresponding to ImportOptions or CompilerOptions.
    Returns:
      Same as compile_saved_model().
docstring_summary: Compiles a tf.Module to an IREE binary (by saving to disk).
docstring_tokens: Compiles a tf . Module to an IREE binary ( by saving to disk ) .
function: def compile_module(module, saved_model_dir: Optional[str] = None, **kwargs):
    """Compiles a tf.Module to an IREE binary (by saving to disk).
  
    Args:
      module: The tf.Module instance to convert to MLIR
      saved_model_dir: Optional path to save the tf.Module to. The module will not
        be persisted on disk outside of this call if this is not provided.
      **kwargs: Keyword args corresponding to ImportOptions or CompilerOptions.
    Returns:
      Same as compile_saved_model().
    """
    with TempFileSaver.implicit() as tfs:
  
      def do_it(saved_model_dir):
        import tensorflow as tf
        options = tf.saved_model.SaveOptions(save_debug_info=True)
        tf.saved_model.save(module, saved_model_dir, options=options)
        return compile_saved_model(saved_model_dir, **kwargs)
  
      if saved_model_dir:
        return do_it(saved_model_dir)
      else:
        with tempfile.TemporaryDirectory(suffix=".sm") as td:
          return do_it(td)
function_tokens: def compile_module ( module , saved_model_dir : Optional [ str ] = None , * * kwargs ) : with TempFileSaver . implicit ( ) as tfs : def do_it ( saved_model_dir ) : import tensorflow as tf options = tf . saved_model . SaveOptions ( save_debug_info = True ) tf . saved_model . save ( module , saved_model_dir , options = options ) return compile_saved_model ( saved_model_dir , * * kwargs ) if saved_model_dir : return do_it ( saved_model_dir ) else : with tempfile . TemporaryDirectory ( suffix = ".sm" ) as td : return do_it ( td )