Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Fehlner <[email protected]>
  • Loading branch information
andife committed Aug 24, 2024
1 parent ba2285c commit 6888456
Show file tree
Hide file tree
Showing 77 changed files with 379 additions and 51 deletions.
2 changes: 2 additions & 0 deletions onnx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"IR_VERSION_2020_5_8",
"IR_VERSION_2021_7_30",
"IR_VERSION_2023_5_5",
"IR_VERSION_2024_3_25",
"EXPERIMENTAL",
"STABLE",
# Modules
Expand Down Expand Up @@ -95,6 +96,7 @@
IR_VERSION_2020_5_8,
IR_VERSION_2021_7_30,
IR_VERSION_2023_5_5,
IR_VERSION_2024_3_25,
ModelProto,
NodeProto,
OperatorSetIdProto,
Expand Down
6 changes: 6 additions & 0 deletions onnx/_custom_element_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
#: than its onnx size.
int4 = np.dtype((np.int8, {"int4": (np.int8, 0)}))

#: Defines float 4 e2m1 type, see See :ref:`onnx-detail-float4` for technical details.
#: Do note that one integer is stored using a byte and therefore is twice bigger
#: than its onnx size.
float4e2m1 = np.dtype((np.uint8, {"float4e2m1": (np.uint8, 0)}))

mapping_name_to_data_type = {
"bfloat16": onnx.TensorProto.BFLOAT16,
"e4m3fn": onnx.TensorProto.FLOAT8E4M3FN,
Expand All @@ -60,4 +65,5 @@
"e5m2fnuz": onnx.TensorProto.FLOAT8E5M2FNUZ,
"int4": onnx.TensorProto.INT4,
"uint4": onnx.TensorProto.UINT4,
"float4e2m1": onnx.TensorProto.FLOAT4E2M1,
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ByJ���@D{,@�#@��@�8@��&@w�@��8@[m=@ @�22@*�@�@>;@���?ZT�?~/?�5@�81@Վ7@�P>@&�2@��@�d1@\<�?�N&@}2�?�G<@�6@�@���?��0@�@��@��?j[$@��#@sK$@>9<@o�)@��@��@+@V�?4�(@a�(@յ�?'ճ?�V@�k@��@\@��>@�^�?��?O��?�n'@��?<<@YZ�?
ByJ���@D{,@�#@��@�8@��&@w�@��8@Zm=@ @�22@*�@�@>;@���?ZT�?~/?�5@�81@Վ7@�P>@%�2@��@�d1@\<�?�N&@~2�?�G<@�6@�@���?��0@�@��@��?j[$@��#@sK$@>9<@o�)@��@��@+@V�?5�(@a�(@յ�?(ճ?�V@�k@��@\@��>@�^�?��?O��?�n'@��?<<@YZ�?
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ByJ�ø?OL?(�%?�?���>��3?J��>���?8s�?l{�>��i?�? �?�_�?���=ت�=�<��{?"Hd?��?���?fm?C��>E@e?[��=��1?M>`H�?T� ?���>��>Z�b?%��>$�?c�<tm*?�(?3*?��?B@?{H�>]��>k�E?9�v=:�:?p-<?�Y>�c>N�>X��>�S?/x�>L��?)Z�=�yW>��%>�06?�>a�>��|>
ByJ�ĸ?PL?*�%?�?���>��3?J��>���?8s�?l{�>��i?�? �?�_�?���=ت�=�<��{?#Hd?��?���?fm?C��>F@e?[��=��1?M>`H�?T� ?���>��>Z�b?%��>$�?c�<um*?�(?3*?��?D@?{H�>]��>k�E?9�v=;�:?q-<?�Y>�c>N�>X��>�S?/x�>L��?)Z�=�yW>��%>�06?�>a�>��|>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ByJ�ɚ�?���>%�]?,��?(��?�~]��{X?ng��ӽ'��>��>���?A�3?b��=�c�>�ѧ><��?��P�ȝ>!<F��Wտ�??>H?��/��q�?�����\;=�>�V=�?��?� >AG�>�L�����\����t>!��?M=�?���v����Pj��$��P馿��?����J�پ�P��� 7?LϠ�D<X��4N�4u�>cQ��-s����漎�>� �=���>���ߵ�
ByJ�ɚ�?���>%�]?,��?)��?�~]��{X?ng��ӽ'��>��>���?A�3?b��=�c�>�ѧ><��?��P�ȝ>!<F��Wտ�??>H?��/��q�?�����\;=�>�W=�?��?� >@G�>�L�����\����t>!��?M=�?���v����Pj��$��Q馿��?����I�پ�P��� 7?LϠ�D<X��4N�4u�>bQ��-s����漎�>� �=���>���ߵ�
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ByJ�#�?��>�OF?V�?�"�?�F�܂B?~��p�ҽ�z�>4~>|�w?��&?���=���>��>� {?�4O��W�>=�4��F���3?{6?�r#�z�?m�w��K;=�{=�}#~?�%y?j>��>��9�98���l����>�fc?0�`?�3���N��� O�u��4���m�?jS�fӾH�e�c.)?���d�V�A�:�(�>Q��&8^����s3�>��=�b�>ٵ�t*��
ByJ�#�?~��>�OF?V�?�"�?�F�܂B?~��p�ҽ�z�>4~>|�w?��&?���=���>��>� {?�4O��W�>=�4��F���3?{6?�r#�z�?m�w��K;=�{=�}#~?�%y?j>��>��9�:8���l����>�fc?0�`?�3���N��� O�u��4���m�?jS�fӾH�e�c.)?���d�V�B�:�(�>Q��'8^����s3�>��=�b�>ٵ�t*��
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ByJ���?q�e?̍2?eo?�~�>+�D?�@�>B�?�W�?���>���?�?�%?/9�?0��=��=զ�<�*�?5�?���?C�@�R�?���>��?w]�=�B?��>
��??1?���>���>��?!�>;,%?��<Ξ8?W6?�T8?ܸ�?;U?��>���>��\?��v=�N?��O?��Z>h�>'3�>�&�>)�%?��>��$@���=�Y>�&>��G?��>T^?�v>
ByJ���?q�e?̍2?eo?�~�>+�D?�@�>B�?�W�?���>���?�?�%?/9�?0��=��=Ԧ�<�*�?5�?���?C�@�R�?���>��?w]�=�B?��>
��??1?���>���>��?!�>;,%?��<Ϟ8?W6?�T8?۸�?;U?��>���>��\?��v=�N?��O?��Z>g�>(3�>�&�>)�%?��>��$@���=�Y>�&>��G?��>T^?�v>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ByJ��<@@�b�?B\�?!!�@'T@�%�?�?�?x�?���?9�?�T�?gz@1�?��?;ь?)1�?��@��?�R�?>��?���@LT�?��?]�?^|�@w}@P"�?�?�?U@�r@%��?C�?ص?�]l@@Ӈ?S��?@��?q9�?ظ�?��?��?� @�6@G�e@���?�z�?�J�?��?2'@Q�?^׶?T��?��?��?�?/�?�H�?l�?_��?���?
ByJ��<@@�b�?C\�?!!�@'T@�%�?�?�?x�?���?9�?�T�?gz@1�?��?<ь?)1�?��@��?�R�??��?���@LT�?��?]�?_|�@w}@P"�?�?�?U@�r@&��?C�?ص?�]l@@Ӈ?S��?@��?q9�?ٸ�?��?��?� @�6@H�e@���?�z�?�J�?��?2'@P�?^׶?T��?��?��?�?/�?�H�?l�?_��?���?
Expand Down
Binary file not shown.
Binary file modified onnx/backend/test/data/node/test_dft/test_data_set_0/output_0.pb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ByJ��?�K�>��Q?A�@t��?
V$���I?�W��uB���>�d�=��?VQ?V��=q��>�~W>�Q�?�x�G>e�+�8^_�$��>�o2?�.�ޓ@�3ٽxD�<+7����?п�?24�=I�z>kL*��'A������=D�?D�?��
�|��
��B⽁���KR�?h@�:U�Z����?S��;%��<�)����>�f�����a�J�>�s=��?>��*�S �
ByJ��?�K�>��Q?A�@t��? V$���I?�W��uB���>�d�=��?VQ?V��=q��>�~W>�Q�?�x�G>d�+�8^_�$��>�o2?�.�ޓ@�3ٽxD�<+7����?п�?24�=I�z>jL*��'A������=D�?D�?��
�|��
��B����KR�?h@�:U�Z����?T��;%��;�)����>�f�����a�J�>�s=��?>��*�S �
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ByJ��?�K�>��Q?A�@t��?
V$���I?�W��uB���>�d�=��?VQ?V��=q��>�~W>�Q�?�x�G>e�+�8^_�$��>�o2?�.�ޓ@�3ٽxD�<+7����?п�?24�=I�z>kL*��'A������=D�?D�?��
�|��
��B⽁���KR�?h@�:U�Z����?S��;%��<�)����>�f�����a�J�>�s=��?>��*�S �
ByJ��?�K�>��Q?A�@t��? V$���I?�W��uB���>�d�=��?VQ?V��=q��>�~W>�Q�?�x�G>d�+�8^_�$��>�o2?�.�ޓ@�3ٽxD�<+7����?п�?24�=I�z>jL*��'A������=D�?D�?��
�|��
��B����KR�?h@�:U�Z����?T��;%��;�)����>�f�����a�J�>�s=��?>��*�S �
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

ByJ(C�=�iF>)��>��E?��x?��x?��E?$��>�iF>C�=
ByJ(@�=�iF>*��>��E?��x?��x?��E?"��>�iF>@�=
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

ByJ(C�=�iF>)��>��E?��x?��x?��E?$��>�iF>C�=
ByJ(@�=�iF>*��>��E?��x?��x?��E?"��>�iF>@�=
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ByJ����?��?aK@��&@���?�q�?̌s?;�)>vU�>�5�>5�?;��?8C?���>���>�?3h�?B�>7.^?�g%@�L$@%sy?TK�?�@i@')�?�@>�P�?k/�?�&�?���>|w@���?U]�>���? /�?˙�?���>GG�?Dv�?/�?X@�,�?�?���?�;�?��?���?qBf?�>k?�z?]�?"�?�S�>P��>�i�>(?��+?�4?I�4?��U?�h�?}t�>���?�>�?rr?mHh?p�:?��:?��? ��?ܟ?�p:?�h~?��r?��?hӟ>%�?�E�?w�p?�r�?��?Cd
@�^@��?�E�?6`�?tp�?|R�?��?E�z?2~?,O<?
ByJ����?��?aK@��&@���?�q�?̌s?;�)>wU�>�5�>5�?;��?8C?���>���>�?3h�?B�>8.^?�g%@�L$@&sy?TK�?�@i@')�?�@>�P�?k/�?�&�?���>|w@���?V]�>���?/�?˙�?���>GG�?Dv�?/�?X@�,�?�?���?�;�?��?���?qBf?�>k?�z?]�?"�?�S�>Q��>�i�>(?��+?�4?I�4?��U?�h�?~t�>���?�>�?rr?mHh?p�:?��:?��? ��?ܟ?�p:?�h~?��r?��?hӟ>%�?�E�?w�p?�r�?��?Cd
@�^@��?�E�?6`�?tp�?|R�?��?E�z?2~?,O<?
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BYJl�d�?�;�>:�ſr����d���>D��>6nQ?��[?:���#rc�vyH�E3U?> ����,?�UD?�Pi?�ҿ�o����?��>�2�?�ϗ?��m����=msþ���
BYJl�d�?�;�>:�ſr����d���>D��>6nQ?��[?:���#rc�vyH�G3U?? ����,?�UD?�Pi?�ҿ�o����?��>�2�?�ϗ?��m����=msþ���
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BYJl�d�?�;�>:�ſr����d���>D��>6nQ?��[?:���#rc�vyH�E3U?> ����,?�UD?�Pi?�ҿ�o����?��>�2�?�ϗ?��m����=msþ���
BYJl�d�?�;�>:�ſr����d���>D��>6nQ?��[?:���#rc�vyH�G3U?? ����,?�UD?�Pi?�ҿ�o����?��>�2�?�ϗ?��m����=msþ���
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BYJl�d�?�;�>:�ſr����d���>D��>6nQ?��[?:���#rc�vyH�E3U?> ����,?�UD?�Pi?�ҿ�o����?��>�2�?�ϗ?��m����=msþ���
BYJl�d�?�;�>:�ſr����d���>D��>6nQ?��[?:���#rc�vyH�G3U?? ����,?�UD?�Pi?�ҿ�o����?��>�2�?�ϗ?��m����=msþ���
Binary file modified onnx/backend/test/data/node/test_pow/test_data_set_0/output_0.pb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
 BreducedJ0�eMIz�@�&~X@{��U��忎c;��^@n6���"@��
 BreducedJ0�eMIz�@�&~X@}��U��忎c;��^@n6���"@��
�1�?
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
 BreducedJ0�eMIz�@�&~X@{��U��忎c;��^@n6���"@��
 BreducedJ0�eMIz�@�&~X@}��U��忎c;��^@n6���"@��
�1�?
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
 BreducedJ0�eMIz�@�&~X@{��U��忎c;��^@n6���"@��
 BreducedJ0�eMIz�@�&~X@}��U��忎c;��^@n6���"@��
�1�?
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
 BreducedJ0�eMIz�@�&~X@{��U��忎c;��^@n6���"@��
 BreducedJ0�eMIz�@�&~X@}��U��忎c;��^@n6���"@��
�1�?
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
 BreducedJ0�eMIz�@�&~X@{��U��忎c;��^@n6���"@��
 BreducedJ0�eMIz�@�&~X@}��U��忎c;��^@n6���"@��
�1�?
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
 BreducedJ0�eMIz�@�&~X@{��U��忎c;��^@n6���"@��
 BreducedJ0�eMIz�@�&~X@}��U��忎c;��^@n6���"@��
�1�?
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ByJ�%E5@hd�>�B�?͹�@�,J@����6��?����ӽ�.�>�>��@./V?F��=E��>w�>�b@�S��>�7v�H��a3?��y?6�O��-�@��~;=,�@�uH@W�@DM>cD�>�)����c����"� >0R�?_��?�N˾�%��`2���O��ru*��\@f1����ݸͿ��[?�W�6~[�\�����>��¼�>����>�S�=�<�>V-��ҽ�
ByJ�$E5@gd�>�B�?̹�@�,J@����6��?����ӽ�.�>�>��@//V?F��=E��>w�>�b@�S��>�7v�H��a3?��y?6�O��-�@��~;=,�@�uH@W�@DM>cD�>�)����c����"� >0R�?^��?�N˾�%��`2���O��ru*��\@g1����ݸͿ��[?�W�5~[�\�����>��¼�>����>�S�=�<�>V-��ҽ�
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ByJ�R������>�R�?=����JQ�f�����?-/�k%ԽF��>��>��A[�s?pm�=�u�>5z�>&PAzU����>s꒿��*?�D?!�?��j��I�����̎;=]�A��T�A�0A��>�h�>�P��P@@!���6k!>��4@��%@��оD����e޿������@�> �7���RmB���{?Y~�Ap1]��Ο�̛�>pw�ԟ������>�m�=�ğ>xZ<�~
ByJ�R������>�R�?=����JQ�f�����?-/�j%ԽF��>�>��A[�s?pm�=�u�>5z�>&PAzU����>s꒿��*?�D? �?��j��I�����̎;=]�A��T�A�0A��>�h�>�P��Q@@!���6k!>��4@��%@��оD����e޿������@�> �7���RmB���{?Y~�Ap1]��Ο�͛�>pw�՟������>�m�=�ğ>xZ<�
Expand Down
2 changes: 1 addition & 1 deletion onnx/common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
namespace ONNX_NAMESPACE {

// Represents the most recent release version. Updated with every release.
constexpr const char* LAST_RELEASE_VERSION = "1.16.2";
constexpr const char* LAST_RELEASE_VERSION = "1.17.0";

} // namespace ONNX_NAMESPACE
11 changes: 11 additions & 0 deletions onnx/defs/operator_sets.h
Original file line number Diff line number Diff line change
Expand Up @@ -1290,6 +1290,15 @@ class OpSet_Onnx_ver22 {
}
};

// Iterate over schema from ai.onnx version 23
class OpSet_Onnx_ver23 {
public:
static void ForEachSchema(std::function<void(OpSchema&&)> fn) {
// TODO: Remove after introducing the first schema to opset 23
(void)fn;
}
};

inline void RegisterOnnxOperatorSetSchema() {
RegisterOpSetSchema<OpSet_Onnx_ver1>();
RegisterOpSetSchema<OpSet_Onnx_ver2>();
Expand All @@ -1313,6 +1322,7 @@ inline void RegisterOnnxOperatorSetSchema() {
RegisterOpSetSchema<OpSet_Onnx_ver20>();
RegisterOpSetSchema<OpSet_Onnx_ver21>();
RegisterOpSetSchema<OpSet_Onnx_ver22>();
RegisterOpSetSchema<OpSet_Onnx_ver23>();
// 0 means all versions of ONNX schema have been loaded
OpSchemaRegistry::Instance()->SetLoadedSchemaVersion(0);
}
Expand All @@ -1322,6 +1332,7 @@ inline void RegisterOnnxOperatorSetSchema(int target_version, bool fail_duplicat
// These calls for schema registration here are required to be in descending order for this to work correctly
//
// Version-specific registration sees duplicate schema version request as error if fail_duplicate_schema
RegisterOpSetSchema<OpSet_Onnx_ver23>(target_version, fail_duplicate_schema);
RegisterOpSetSchema<OpSet_Onnx_ver22>(target_version, fail_duplicate_schema);
RegisterOpSetSchema<OpSet_Onnx_ver21>(target_version, fail_duplicate_schema);
RegisterOpSetSchema<OpSet_Onnx_ver20>(target_version, fail_duplicate_schema);
Expand Down
1 change: 1 addition & 0 deletions onnx/defs/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class PrimitiveTypeNameMap : public StringIntMap<PrimitiveTypeNameMap> {
map_["float8e5m2fnuz"] = TensorProto_DataType_FLOAT8E5M2FNUZ;
map_["uint4"] = TensorProto_DataType_UINT4;
map_["int4"] = TensorProto_DataType_INT4;
map_["float4e2m1"] = TensorProto_DataType_FLOAT4E2M1;
}

static bool IsTypeName(const std::string& dtype) {
Expand Down
83 changes: 80 additions & 3 deletions onnx/defs/schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,30 @@ class OpSchema final {
return numeric_types_for_math_reduction;
}

static const std::vector<std::string>& all_numeric_types_ir11() {
static const std::vector<std::string> all_numeric_types_ir11 = {
"tensor(uint8)",
"tensor(uint16)",
"tensor(uint32)",
"tensor(uint64)",
"tensor(int8)",
"tensor(int16)",
"tensor(int32)",
"tensor(int64)",
"tensor(float16)",
"tensor(float)",
"tensor(double)",
"tensor(bfloat16)",
"tensor(float8e4m3fn)",
"tensor(float8e4m3fnuz)",
"tensor(float8e5m2)",
"tensor(float8e5m2fnuz)",
"tensor(uint4)",
"tensor(int4)",
"tensor(float4e2m1)"};
return all_numeric_types_ir11;
}

static const std::vector<std::string>& all_numeric_types_ir10() {
static const std::vector<std::string> all_numeric_types_ir10 = {
"tensor(uint8)",
Expand Down Expand Up @@ -844,6 +868,28 @@ class OpSchema final {
return all_non_complex_tensor_types_ir10;
}

static const std::vector<std::string>& all_tensor_types_ir11() {
static const std::vector<std::string> all_tensor_types_ir11 = {
"tensor(uint8)", "tensor(uint16)", "tensor(uint32)", "tensor(uint64)",
"tensor(int8)", "tensor(int16)", "tensor(int32)", "tensor(int64)",
"tensor(bfloat16)", "tensor(float16)", "tensor(float)", "tensor(double)",
"tensor(string)", "tensor(bool)", "tensor(complex64)", "tensor(complex128)",
"tensor(float8e4m3fn)", "tensor(float8e4m3fnuz)", "tensor(float8e5m2)", "tensor(float8e5m2fnuz)",
"tensor(uint4)", "tensor(int4)", "tensor(float4e2m1)"};
return all_tensor_types_ir11;
}

static const std::vector<std::string>& all_non_complex_tensor_types_ir11() {
static const std::vector<std::string> all_non_complex_tensor_types_ir11 = {
"tensor(uint8)", "tensor(uint16)", "tensor(uint32)", "tensor(uint64)",
"tensor(int8)", "tensor(int16)", "tensor(int32)", "tensor(int64)",
"tensor(bfloat16)", "tensor(float16)", "tensor(float)", "tensor(double)",
"tensor(string)", "tensor(bool)", "tensor(float8e4m3fn)", "tensor(float8e4m3fnuz)",
"tensor(float8e5m2)", "tensor(float8e5m2fnuz)", "tensor(uint4)", "tensor(int4)",
"tensor(float4e2m1)"};
return all_non_complex_tensor_types_ir11;
}

static const std::vector<std::string>& all_tensor_sequence_types() {
static const std::vector<std::string> all_tensor_sequence_types = {
"seq(tensor(uint8))",
Expand Down Expand Up @@ -910,6 +956,19 @@ class OpSchema final {
return all_tensor_sequence_types_ir10;
}

static const std::vector<std::string>& all_tensor_sequence_types_ir11() {
static const std::vector<std::string> all_tensor_sequence_types_ir11 = {
"seq(tensor(uint8))", "seq(tensor(uint16))", "seq(tensor(uint32))",
"seq(tensor(uint64))", "seq(tensor(int8))", "seq(tensor(int16))",
"seq(tensor(int32))", "seq(tensor(int64))", "seq(tensor(bfloat16))",
"seq(tensor(float16))", "seq(tensor(float))", "seq(tensor(double))",
"seq(tensor(string))", "seq(tensor(bool))", "seq(tensor(complex64))",
"seq(tensor(complex128))", "seq(tensor(float8e4m3fn))", "seq(tensor(float8e4m3fnuz))",
"seq(tensor(float8e5m2))", "seq(tensor(float8e5m2fnuz))", "seq(tensor(uint4))",
"seq(tensor(int4))", "seq(tensor(float4e2m1))"};
return all_tensor_sequence_types_ir11;
}

static const std::vector<std::string>& all_optional_types() {
static const std::vector<std::string> all_optional_types = {
"optional(seq(tensor(uint8)))", "optional(seq(tensor(uint16)))", "optional(seq(tensor(uint32)))",
Expand Down Expand Up @@ -976,6 +1035,24 @@ class OpSchema final {
return all_optional_types;
}

static const std::vector<std::string>& all_optional_types_ir11() {
static const std::vector<std::string> all_optional_types = {
"optional(seq(tensor(uint8)))", "optional(seq(tensor(uint16)))", "optional(seq(tensor(uint32)))",
"optional(seq(tensor(uint64)))", "optional(seq(tensor(int8)))", "optional(seq(tensor(int16)))",
"optional(seq(tensor(int32)))", "optional(seq(tensor(int64)))", "optional(seq(tensor(bfloat16)))",
"optional(seq(tensor(float16)))", "optional(seq(tensor(float)))", "optional(seq(tensor(double)))",
"optional(seq(tensor(string)))", "optional(seq(tensor(bool)))", "optional(seq(tensor(complex64)))",
"optional(seq(tensor(complex128)))", "optional(tensor(uint8))", "optional(tensor(uint16))",
"optional(tensor(uint32))", "optional(tensor(uint64))", "optional(tensor(int8))",
"optional(tensor(int16))", "optional(tensor(int32))", "optional(tensor(int64))",
"optional(tensor(bfloat16))", "optional(tensor(float16))", "optional(tensor(float))",
"optional(tensor(double))", "optional(tensor(string))", "optional(tensor(bool))",
"optional(tensor(complex64))", "optional(tensor(complex128))", "optional(tensor(float8e4m3fn))",
"optional(tensor(float8e4m3fnuz))", "optional(tensor(float8e5m2))", "optional(tensor(float8e5m2fnuz))",
"optional(tensor(uint4))", "optional(tensor(int4))", "optional(tensor(float4e2m1))"};
return all_optional_types;
}

// Calls the passed function with `this` as an argument. Useful for
// adding docs for temlated/macro ops.
OpSchema& FillUsing(const std::function<void(OpSchema&)>& populator);
Expand Down Expand Up @@ -1209,8 +1286,8 @@ 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, 22);
map_[AI_ONNX_ML_DOMAIN] = std::make_pair(1, 6);
map_[ONNX_DOMAIN] = std::make_pair(1, 23);
map_[AI_ONNX_ML_DOMAIN] = std::make_pair(1, 5);
map_[AI_ONNX_TRAINING_DOMAIN] = std::make_pair(1, 1);
// ONNX's preview domain contains operators subject to change, so
// versining is not meaningful and that domain should have only one
Expand All @@ -1220,7 +1297,7 @@ class OpSchemaRegistry final : public ISchemaRegistry {
// the max version above in a *release* version of ONNX. But in other
// versions, the max version may be ahead of the last-release-version.
last_release_version_map_[ONNX_DOMAIN] = 22;
last_release_version_map_[AI_ONNX_ML_DOMAIN] = 6;
last_release_version_map_[AI_ONNX_ML_DOMAIN] = 5;
last_release_version_map_[AI_ONNX_TRAINING_DOMAIN] = 1;
last_release_version_map_[AI_ONNX_PREVIEW_TRAINING_DOMAIN] = 1;
}
Expand Down
Loading

0 comments on commit 6888456

Please sign in to comment.