diff --git a/onnx/defs/operator_sets.h b/onnx/defs/operator_sets.h index 9b5e5b7a74c..89a94abca45 100644 --- a/onnx/defs/operator_sets.h +++ b/onnx/defs/operator_sets.h @@ -1025,6 +1025,16 @@ class OpSet_Onnx_ver16 { fn(GetOpSchema()); } }; + +// Forward declarations for ai.onnx version 17 + +// Iterate over schema from ai.onnx version 17 +class OpSet_Onnx_ver17 { + public: + static void ForEachSchema(std::function fn) { + } +}; + inline void RegisterOnnxOperatorSetSchema() { RegisterOpSetSchema(); RegisterOpSetSchema(); @@ -1042,6 +1052,7 @@ inline void RegisterOnnxOperatorSetSchema() { RegisterOpSetSchema(); RegisterOpSetSchema(); RegisterOpSetSchema(); + RegisterOpSetSchema(); // 0 means all versions of ONNX schema have been loaded OpSchemaRegistry::Instance()->SetLoadedSchemaVersion(0); } @@ -1049,6 +1060,7 @@ inline void RegisterOnnxOperatorSetSchema() { inline void RegisterOnnxOperatorSetSchema(int target_version) { // Update here if opset_version bumps // These calls for schema registration here are required to be in descending order for this to work correctly + RegisterOpSetSchema(target_version); RegisterOpSetSchema(target_version); RegisterOpSetSchema(target_version); RegisterOpSetSchema(target_version); diff --git a/onnx/defs/schema.h b/onnx/defs/schema.h index 47598b4c8a6..61710320ba5 100644 --- a/onnx/defs/schema.h +++ b/onnx/defs/schema.h @@ -994,7 +994,7 @@ class OpSchemaRegistry final : public ISchemaRegistry { // Increase the highest version when you make BC-breaking changes to the // operator schema on specific domain. Update the lowest version when it's // determined to remove too old version history. - map_[ONNX_DOMAIN] = std::make_pair(1, 16); + map_[ONNX_DOMAIN] = std::make_pair(1, 17); map_[AI_ONNX_ML_DOMAIN] = std::make_pair(1, 3); map_[AI_ONNX_TRAINING_DOMAIN] = std::make_pair(1, 1); // ONNX's preview domain contains operators subject to change, so