Skip to content

Commit

Permalink
[ONNX] Clean up diagnostic rules (#107653)
Browse files Browse the repository at this point in the history
Summary:

- Remove experimental rules that were never used.
- Fill in detailed rule descriptions.
Pull Request resolved: #107653
Approved by: https://github.com/justinchuby, https://github.com/titaiwangms
ghstack dependencies: #107408, #107409
  • Loading branch information
BowenBao authored and pytorchmergebot committed Aug 23, 2023
1 parent c3c1b68 commit bb1852f
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 673 deletions.
63 changes: 6 additions & 57 deletions torch/csrc/onnx/diagnostics/generated/rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,56 +36,18 @@ enum class Rule : uint32_t {
kOperatorSupportedInNewerOpsetVersion,

/**
* @brief FX Tracer succeeded.
* @brief Transforms graph from FX IR to ONNX IR.
*/
kFxTracerSuccess,
kFxGraphToOnnx,

/**
* @brief FX Tracer failed.
*/
kFxTracerFailure,

/**
* @brief FX Tracer succeeded.
*/
kFxFrontendAotautograd,

/**
* @brief FX pass converting torch.neg to torch.sigmoid.
*/
kFxPassConvertNegToSigmoid,

/**
* @brief ToDo, experimenting diagnostics, placeholder text.
*/
kFxIrAddNode,

/**
* @brief Op level tracking. ToDo, experimenting diagnostics, placeholder
* text.
*/
kAtenlibSymbolicFunction,

/**
* @brief Graph level tracking. Each op is a step. ToDo, experimenting
* diagnostics, placeholder text.
*/
kAtenlibFxToOnnx,

/**
* @brief Node level tracking. ToDo, experimenting diagnostics, placeholder
* text.
* @brief Transforms an FX node to an ONNX node.
*/
kFxNodeToOnnx,

/**
* @brief The make_fx + decomposition pass on fx graph produced from Dynamo,
* before ONNX export.
*/
kFxFrontendDynamoMakeFx,

/**
* @brief FX graph transformation before ONNX export.
* @brief FX graph transformation during ONNX export before converting from FX
* IR to ONNX IR.
*/
kFxPass,

Expand Down Expand Up @@ -122,35 +84,22 @@ enum class Rule : uint32_t {
* registry.
*/
kFindOperatorOverloadsInOnnxRegistry,

/**
* @brief The formatted str for argument to display is too verbose.
*/
kArgFormatTooVerbose,
};

static constexpr const char* const kPyRuleNames[] = {
"node_missing_onnx_shape_inference",
"missing_custom_symbolic_function",
"missing_standard_symbolic_function",
"operator_supported_in_newer_opset_version",
"fx_tracer_success",
"fx_tracer_failure",
"fx_frontend_aotautograd",
"fx_pass_convert_neg_to_sigmoid",
"fx_ir_add_node",
"atenlib_symbolic_function",
"atenlib_fx_to_onnx",
"fx_graph_to_onnx",
"fx_node_to_onnx",
"fx_frontend_dynamo_make_fx",
"fx_pass",
"no_symbolic_function_for_call_function",
"unsupported_fx_node_analysis",
"op_level_debugging",
"find_opschema_matched_symbolic_function",
"fx_node_insert_type_promotion",
"find_operator_overloads_in_onnx_registry",
"arg_format_too_verbose",
};

} // namespace diagnostics
Expand Down

0 comments on commit bb1852f

Please sign in to comment.