Skip to content

Commit 3153871

Browse files
titaiwangmsfs-eire
authored andcommitted
Bump onnx to 1.19.1 (#26202)
~~Test rel-1.19.1~~ Bump to ONNX==1.19.1
1 parent 75087e8 commit 3153871

File tree

18 files changed

+45
-166
lines changed

18 files changed

+45
-166
lines changed

cmake/deps.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ microsoft_gsl;https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.zip;cf36
3434
microsoft_wil;https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.zip;e4a542a323c070376f7c2d1973d0f7ddbc1d2fa5
3535
mimalloc;https://github.com/microsoft/mimalloc/archive/refs/tags/v2.1.1.zip;d5ee7d34223d0567892db5179849939c8769dc41
3636
mp11;https://github.com/boostorg/mp11/archive/refs/tags/boost-1.82.0.zip;9bc9e01dffb64d9e0773b2e44d2f22c51aace063
37-
onnx;https://github.com/onnx/onnx/archive/refs/tags/v1.19.0.zip;4c798b73e131438c196e6dcb9f3393968a8936f1
37+
onnx;https://github.com/onnx/onnx/archive/refs/tags/v1.19.1.zip;c5215b5697dcdfd71799f001b8c4054a6bba6b09
3838
# Use the latest commit of 10.9-GA
3939
onnx_tensorrt;https://github.com/onnx/onnx-tensorrt/archive/d5dce67db7c2e64b07e055571f5ec06f7f254de2.zip;01114d3b67650857281fa50faa2e412130a63b69
4040
protobuf;https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.12.zip;7cf2733949036c7d52fda017badcab093fe73bfa

cmake/external/onnxruntime_external_deps.cmake

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -498,13 +498,7 @@ else()
498498
endif()
499499

500500
if(Patch_FOUND)
501-
set(ONNXRUNTIME_ONNX_PATCH_COMMAND
502-
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/onnx/onnx.patch &&
503-
# Patch changes from https://github.com/onnx/onnx/pull/7253 to avoid unnecessary rebuilding.
504-
# This change should be included in ONNX 1.19.1.
505-
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 <
506-
${PROJECT_SOURCE_DIR}/patches/onnx/avoid_regenerating_proto_files.patch
507-
)
501+
set(ONNXRUNTIME_ONNX_PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/onnx/onnx.patch)
508502
else()
509503
set(ONNXRUNTIME_ONNX_PATCH_COMMAND "")
510504
endif()

cmake/patches/onnx/avoid_regenerating_proto_files.patch

Lines changed: 0 additions & 46 deletions
This file was deleted.

cmake/patches/onnx/onnx.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 47995579..6cc439f6 100644
2+
index cc3ef140..f70312ba 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -57,6 +57,7 @@ option(ONNX_USE_LITE_PROTO "Use lite protobuf instead of full." OFF)
@@ -10,7 +10,7 @@ index 47995579..6cc439f6 100644
1010
if(WIN32)
1111
option(ONNX_USE_MSVC_STATIC_RUNTIME "Build with MSVC static runtime" OFF)
1212
endif()
13-
@@ -411,14 +412,28 @@ relative_protobuf_generate_cpp(ONNX_PROTO_SRCS
13+
@@ -409,14 +410,28 @@ relative_protobuf_generate_cpp(ONNX_PROTO_SRCS
1414

1515
add_library(onnx_proto ${ONNX_PROTO_SRCS})
1616

@@ -47,7 +47,7 @@ index 47995579..6cc439f6 100644
4747

4848
# Hide all symbols we don't need
4949
set_target_properties(onnx_proto PROPERTIES CXX_VISIBILITY_PRESET hidden)
50-
@@ -440,19 +455,6 @@ add_onnx_global_defines(onnx_proto)
50+
@@ -438,19 +453,6 @@ add_onnx_global_defines(onnx_proto)
5151
target_include_directories(onnx_proto PUBLIC
5252
$<BUILD_INTERFACE:${ONNX_ROOT}>
5353
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
@@ -68,10 +68,10 @@ index 47995579..6cc439f6 100644
6868
if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
6969
# whole-archive linker option not available on AIX.
7070
diff --git a/onnx/defs/nn/old.cc b/onnx/defs/nn/old.cc
71-
index 40635f97..44770774 100644
71+
index ad6dd0c1..50259f32 100644
7272
--- a/onnx/defs/nn/old.cc
7373
+++ b/onnx/defs/nn/old.cc
74-
@@ -4090,7 +4090,6 @@ ONNX_OPERATOR_SET_SCHEMA(
74+
@@ -4091,7 +4091,6 @@ ONNX_OPERATOR_SET_SCHEMA(
7575
GroupNormalization,
7676
18,
7777
OpSchema()
@@ -80,7 +80,7 @@ index 40635f97..44770774 100644
8080
.Attr("epsilon", "The epsilon value to use to avoid division by zero.", AttributeProto::FLOAT, 1e-5f)
8181
.Attr(
8282
diff --git a/onnx/defs/schema.h b/onnx/defs/schema.h
83-
index ddd95454..34647987 100644
83+
index 7e9bc27f..4b87c5a5 100644
8484
--- a/onnx/defs/schema.h
8585
+++ b/onnx/defs/schema.h
8686
@@ -999,7 +999,7 @@ class OpSchemaRegistry final : public ISchemaRegistry {

cmake/vcpkg-ports/onnx/avoid_regenerating_proto_files.patch

Lines changed: 0 additions & 46 deletions
This file was deleted.

cmake/vcpkg-ports/onnx/binskim.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 47995579..6cc439f6 100644
2+
index cc3ef140..f70312ba 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
55
@@ -57,6 +57,7 @@ option(ONNX_USE_LITE_PROTO "Use lite protobuf instead of full." OFF)
@@ -10,7 +10,7 @@ index 47995579..6cc439f6 100644
1010
if(WIN32)
1111
option(ONNX_USE_MSVC_STATIC_RUNTIME "Build with MSVC static runtime" OFF)
1212
endif()
13-
@@ -411,14 +412,28 @@ relative_protobuf_generate_cpp(ONNX_PROTO_SRCS
13+
@@ -409,14 +410,28 @@ relative_protobuf_generate_cpp(ONNX_PROTO_SRCS
1414

1515
add_library(onnx_proto ${ONNX_PROTO_SRCS})
1616

@@ -47,7 +47,7 @@ index 47995579..6cc439f6 100644
4747

4848
# Hide all symbols we don't need
4949
set_target_properties(onnx_proto PROPERTIES CXX_VISIBILITY_PRESET hidden)
50-
@@ -440,19 +455,6 @@ add_onnx_global_defines(onnx_proto)
50+
@@ -438,19 +453,6 @@ add_onnx_global_defines(onnx_proto)
5151
target_include_directories(onnx_proto PUBLIC
5252
$<BUILD_INTERFACE:${ONNX_ROOT}>
5353
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
@@ -68,10 +68,10 @@ index 47995579..6cc439f6 100644
6868
if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
6969
# whole-archive linker option not available on AIX.
7070
diff --git a/onnx/defs/nn/old.cc b/onnx/defs/nn/old.cc
71-
index 40635f97..44770774 100644
71+
index ad6dd0c1..50259f32 100644
7272
--- a/onnx/defs/nn/old.cc
7373
+++ b/onnx/defs/nn/old.cc
74-
@@ -4090,7 +4090,6 @@ ONNX_OPERATOR_SET_SCHEMA(
74+
@@ -4091,7 +4091,6 @@ ONNX_OPERATOR_SET_SCHEMA(
7575
GroupNormalization,
7676
18,
7777
OpSchema()
@@ -80,7 +80,7 @@ index 40635f97..44770774 100644
8080
.Attr("epsilon", "The epsilon value to use to avoid division by zero.", AttributeProto::FLOAT, 1e-5f)
8181
.Attr(
8282
diff --git a/onnx/defs/schema.h b/onnx/defs/schema.h
83-
index ddd95454..34647987 100644
83+
index 7e9bc27f..4b87c5a5 100644
8484
--- a/onnx/defs/schema.h
8585
+++ b/onnx/defs/schema.h
8686
@@ -999,7 +999,7 @@ class OpSchemaRegistry final : public ISchemaRegistry {

cmake/vcpkg-ports/onnx/portfile.cmake

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@ vcpkg_from_github(
44
OUT_SOURCE_PATH SOURCE_PATH
55
REPO onnx/onnx
66
REF "v${VERSION}"
7-
SHA512 e6f7b5782a43a91783607549e4d0f0a9cbd46dfb67a602f81aaffc7bcdd8f450fe9c225f0bc314704f2923e396f0df5b03ea91af4a7887203c0b8372bc2749d0
7+
SHA512 cf6ff4c0bb6cc16ce5f4d6267480d35f3c7a5fde94d10e1358928ff6e4ec6d756a7c5d34a500e60bbd8eb1912c8af21aa763719321b330f56a0eb6b9b810ef60
88
PATCHES
99
fix-cmakelists.patch
10-
# Patch changes from https://github.com/onnx/onnx/pull/7253 to avoid unnecessary rebuilding.
11-
# This change should be included in ONNX 1.19.1.
12-
avoid_regenerating_proto_files.patch
1310
fix-dependency-protobuf.patch
1411
binskim.patch
1512
)

cmake/vcpkg-ports/onnx/vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "onnx",
3-
"version-semver": "1.19.0",
3+
"version-semver": "1.19.1",
44
"port-version": 1,
55
"description": "Open standard for machine learning interoperability",
66
"homepage": "https://onnx.ai",

docs/How_To_Update_ONNX_Dev_Notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ git add onnx
3535
1. Modify [cmake/vcpkg-ports/onnx/binskim.patch](/cmake/vcpkg-ports/onnx/binskim.patch) to be the same as [cmake/patches/onnx/onnx.patch](/cmake/patches/onnx/onnx.patch).
3636
2. The other patches are required/created by vcpkg repository to build ONNX. We just need to re-run diff to makes sure the patches can be applied in the updated ONNX version.
3737
3. Update [cmake/vcpkg-ports/onnx/portfile.cmake](/cmake/vcpkg-ports/onnx/portfile.cmake) with the correct commit id and SHA512. (alternatively, build it with the wrong SHA and ORT should tell you the expected one.)
38-
4. Upload your package: [Follow the instructions](https://microsoft.sharepoint.com/teams/ONNX2/_layouts/15/Doc.aspx?sourcedoc={170774be-e1c6-4f8b-a3ae-984f211fe410}&action=edit&wd=target%28Development.)one%7C63d3ab47-51d1-4a62-9965-66882234bd44%2FAdd%20or%20Update%20a%20C%2B%2B%20dependency%7Cb6ae6a97-94fc-4436-8fc6-08c21ae895da%2F%29&wdorigin=NavigationUrl
38+
4. Upload your package: [Follow the instructions](https://microsoft.sharepoint.com/:o:/r/teams/ONNX2/_layouts/15/Doc.aspx?sourcedoc=%7B170774BE-E1C6-4F8B-A3AE-984F211FE410%7D&wd=target(Development.one%7C63D3AB47-51D1-4A62-9965-66882234BD44%2FUpdate%20a%20VCPKG%20package%7CB6AE6A97-94FC-4436-8FC6-08C21AE895DA%2F)&wdpartid=%7BB5CF19CC-40FE-0EC7-32B6-8119B427B32A%7D%7B1%7D&wdsectionfileid=%7B9DD25660-A195-48EA-B9E0-DF8B902AFDD7%7D&ovuser=72f988bf-86f1-41af-91ab-2d7cd011db47%2Ctitaiwang%40microsoft.com&clickparams=eyJBcHBOYW1lIjoiVGVhbXMtRGVza3RvcCIsIkFwcFZlcnNpb24iOiI0OS8yNTA5MTExNjAxNiIsIkhhc0ZlZGVyYXRlZFVzZXIiOmZhbHNlfQ%3D%3D&CID=fb9dcaa1-c0b5-1000-5597-c19e3adf468c&cidOR=SPO)one%7C63d3ab47-51d1-4a62-9965-66882234bd44%2FAdd%20or%20Update%20a%20C%2B%2B%20dependency%7Cb6ae6a97-94fc-4436-8fc6-08c21ae895da%2F%29&wdorigin=NavigationUrl
3939

4040
Alternatively, directly run Terrapin to upload ONNX package (need SHA512):
4141

onnxruntime/test/onnx/TestCase.cc

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,9 +1435,22 @@ std::unique_ptr<std::set<BrokenTest>> GetBrokenTests(const std::string& provider
14351435
broken_tests->insert({"scatter_elements_with_negative_indices", "unknown version"});
14361436
// Fails since ONNX==1.19.0
14371437
broken_tests->insert({"l2normalization_axis_0", "unknown version"});
1438+
broken_tests->insert({"attention_3d_gqa", "unknown version"});
1439+
broken_tests->insert({"attention_3d_gqa_attn_mask", "unknown version"});
1440+
broken_tests->insert({"attention_3d_gqa_causal", "unknown version"});
1441+
broken_tests->insert({"attention_3d_gqa_scaled", "unknown version"});
1442+
broken_tests->insert({"attention_3d_gqa_softcap", "unknown version"});
1443+
broken_tests->insert({"attention_3d_gqa_with_past_and_present", "unknown version"});
1444+
broken_tests->insert({"attention_4d_gqa", "unknown version"});
1445+
broken_tests->insert({"attention_4d_gqa_attn_mask", "unknown version"});
1446+
broken_tests->insert({"attention_4d_gqa_causal", "unknown version"});
1447+
broken_tests->insert({"attention_4d_gqa_scaled", "unknown version"});
1448+
broken_tests->insert({"attention_4d_gqa_softcap", "unknown version"});
1449+
broken_tests->insert({"attention_4d_gqa_with_past_and_present", "unknown version"});
1450+
broken_tests->insert({"attention_4d_gqa_with_past_and_present_fp16", "unknown version"});
1451+
broken_tests->insert({"attention_4d_with_past_and_present_qk_matmul_bias_3d_mask_causal", "unknown version"});
1452+
broken_tests->insert({"attention_4d_with_past_and_present_qk_matmul_bias_4d_mask_causal", "unknown version"});
14381453
broken_tests->insert({"attention_4d_diff_heads_mask4d_padded_kv", "need nonpad_kv_seqlen "});
1439-
broken_tests->insert({"attention_4d_with_past_and_present_qk_matmul_bias_3d_mask_causal", "attention op implementation is wrong"});
1440-
broken_tests->insert({"attention_4d_with_past_and_present_qk_matmul_bias_4d_mask_causal", "attention op implementation is wrong"});
14411454
}
14421455

14431456
#ifdef DISABLE_CONTRIB_OPS

0 commit comments

Comments
 (0)