1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
#pragma once
/**
* GENERATED CODE - DO NOT EDIT DIRECTLY
* This file is generated by gen_diagnostics.py.
* See tools/onnx/gen_diagnostics.py for more information.
*
* Diagnostic rules for PyTorch ONNX export.
*/
namespace torch::onnx::diagnostics {
enum class Rule : uint32_t {
/**
* @brief Node is missing ONNX shape inference.
*/
kNodeMissingOnnxShapeInference,
/**
* @brief Missing symbolic function for custom PyTorch operator, cannot
* translate node to ONNX.
*/
kMissingCustomSymbolicFunction,
/**
* @brief Missing symbolic function for standard PyTorch operator, cannot
* translate node to ONNX.
*/
kMissingStandardSymbolicFunction,
/**
* @brief Operator is supported in newer opset version.
*/
kOperatorSupportedInNewerOpsetVersion,
/**
* @brief Transforms graph from FX IR to ONNX IR.
*/
kFxGraphToOnnx,
/**
* @brief Transforms an FX node to an ONNX node.
*/
kFxNodeToOnnx,
/**
* @brief FX graph transformation during ONNX export before converting from FX
* IR to ONNX IR.
*/
kFxPass,
/**
* @brief Cannot find symbolic function to convert the "call_function" FX node
* to ONNX.
*/
kNoSymbolicFunctionForCallFunction,
/**
* @brief Result from FX graph analysis to reveal unsupported FX nodes.
*/
kUnsupportedFxNodeAnalysis,
/**
* @brief Report any op level validation failure in warnings.
*/
kOpLevelDebugging,
/**
* @brief Find the OnnxFunction that matches the input/attribute dtypes by
* comparing them with their opschemas.
*/
kFindOpschemaMatchedSymbolicFunction,
/**
* @brief Determine if type promotion is required for the FX node. Insert cast
* nodes if needed.
*/
kFxNodeInsertTypePromotion,
/**
* @brief Find the list of OnnxFunction of the PyTorch operator in onnx
* registry.
*/
kFindOperatorOverloadsInOnnxRegistry,
};
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_graph_to_onnx",
"fx_node_to_onnx",
"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",
};
} // namespace torch::onnx::diagnostics
|