Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool to convert TF SavedModel to StableHLO #66123

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Apr 20, 2024

Tool to convert TF SavedModel to StableHLO

Here is the signature of the provide API:

// Converts a TensorFlow model (either from a SavedModel or an MLIR module) to a
// StableHLO MLIR module.
//
// Args:
//  input_path: The path to the input TensorFlow SavedModel or MLIR module.
//  context: The MLIR context to use for parsing or creating the MLIR module.
//  exported_model_signatures: A comma-separated list of exported model
//    signatures (functions) to convert.
//  tag_names: A comma-separated list of tag names used for loading SavedModel.
//  input_arg_shapes_str: A string representation of input argument shapes.
//    Shapes for different tensors are separated by ':', and dimension sizes for
//    the same tensor are separated by ','. For example,
//    'input-arg-shapes=1,2::1,?' expresses input arguments with shapes [1,2],
//    [] and [1,?].
//  is_input_mlir_module: If true, `input_path` is treated as an MLIR
//    module instead of a SavedModel.
//
// Returns:
//   An absl::StatusOr containing the converted StableHLO MLIR module on
//   success, or an absl::Status with an error message on failure.
absl::StatusOr<OwningOpRef<ModuleOp>> TfToStablehlo(
    absl::string_view input_path, MLIRContext* context,
    absl::string_view exported_model_signatures, absl::string_view tag_names,
    absl::string_view input_arg_shapes_str, bool is_input_mlir_module = false);

@copybara-service copybara-service bot force-pushed the exported_pr_625351420 branch 5 times, most recently from f67804f to 5cf3f1c Compare April 24, 2024 11:59
@copybara-service copybara-service bot closed this Apr 24, 2024
@copybara-service copybara-service bot deleted the exported_pr_625351420 branch April 24, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant