Skip to content

Commit fd455e1

Browse files
committed
use multi-turn batch=1 to export
2 parents 3dd887a + 1006017 commit fd455e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2230
-496
lines changed

.github/workflows/check-urls.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
print_all: false
4343
timeout: 2
4444
retry_count# : 2
45-
exclude_urls: https://hal.archives-,ouvertes.fr/hal-00990252/document,http://badge.fury.io/py/onnx-diagnostic,https://azure.microsoft.com/en-us/products/devops/pipelines,https://github.com/pytorch/pytorch/pull/83137#issuecomment-1211320670,https://github.com/NVIDIA/TransformerEngine.git@6a9edc38bf9b941b7d369af5103fa8fe0b121d61,https://medium.com/@msouza.os/llm-from-scratch-with-pytorch-9f21808c6319,https://github.com/pytorch/pytorch/blob/main/torch/fx/experimental/symbolic_shapes.py#L5965,https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-04.html,https://badge.fury.io/py/onnx-diagnostic.svg,https://github.com/huggingface/transformers/pull/36311
46-
exclude_patterns: https://www.data.gouv.fr/fr/datasets/r/e3d83ab3-dc52-4c99-abaf-8a38050cc68c,https://dev.azure.com/,https://azure.microsoft.com/en-us/products/devops/pipelines,https://github.com/pytorch/pytorch/pull/83137#issuecomment-1211320670,https://github.com/NVIDIA/TransformerEngine.git@6a9edc38bf9b941b7d369af5103fa8fe0b121d61,https://github.com/pytorch/pytorch/blob/main/torch/,https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-04.html,https://badge.fury.io/py/onnx-diagnostic.svg,https://github.com/,https://codecov.io/,https://huggingface.co/
45+
exclude_urls: https://hal.archives-,ouvertes.fr/hal-00990252/document,http://badge.fury.io/py/onnx-diagnostic,https://azure.microsoft.com/en-us/products/devops/pipelines,https://github.com/pytorch/pytorch/pull/83137#issuecomment-1211320670,https://github.com/NVIDIA/TransformerEngine.git@6a9edc38bf9b941b7d369af5103fa8fe0b121d61,https://medium.com/@msouza.os/llm-from-scratch-with-pytorch-9f21808c6319,https://github.com/pytorch/pytorch/blob/main/torch/fx/experimental/symbolic_shapes.py#L5965,https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-04.html,https://badge.fury.io/py/onnx-diagnostic.svg,https://github.com/huggingface/transformers/pull/36311,https://www.linux.org/
46+
exclude_patterns: https://www.data.gouv.fr/fr/datasets/r/e3d83ab3-dc52-4c99-abaf-8a38050cc68c,https://dev.azure.com/,https://azure.microsoft.com/en-us/products/devops/pipelines,https://github.com/pytorch/pytorch/pull/83137#issuecomment-1211320670,https://github.com/NVIDIA/TransformerEngine.git@6a9edc38bf9b941b7d369af5103fa8fe0b121d61,https://github.com/pytorch/pytorch/blob/main/torch/,https://docs.nvidia.com/deeplearning/frameworks/pytorch-release-notes/rel-24-04.html,https://badge.fury.io/py/onnx-diagnostic.svg,https://github.com/,https://codecov.io/,https://huggingface.co/,https://www.linux.org/
4747
# force_pass : true

.github/workflows/ci.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
os: [ubuntu-latest]
1919
python: ['3.10', '3.11', '3.12', '3.13']
20-
transformers: ['4.48.3', '4.51.3', '4.52.4', '4.53.3', '4.55.4', '4.56.1', 'main']
20+
transformers: ['4.48.3', '4.51.3', '4.52.4', '4.55.4', '4.56.2', '4.57', 'main']
2121
torch: ['2.8', 'main']
2222
exclude:
2323
- python: '3.10'
@@ -26,30 +26,32 @@ jobs:
2626
transformers: 'main'
2727
- python: '3.10'
2828
transformers: '4.52.4'
29-
- python: '3.10'
30-
transformers: '4.53.3'
3129
- python: '3.10'
3230
transformers: '4.55.4'
3331
- python: '3.10'
34-
transformers: '4.56.1'
32+
transformers: '4.56.2'
33+
- python: '3.10'
34+
transformers: '4.57.0'
3535
- python: '3.11'
3636
torch: 'main'
37-
- python: '3.11'
38-
transformers: '4.53.3'
3937
- python: '3.11'
4038
transformers: 'main'
4139
- python: '3.11'
4240
transformers: '4.55.4'
4341
- python: '3.11'
44-
transformers: '4.56.1'
42+
transformers: '4.56.2'
43+
- python: '3.11'
44+
transformers: '4.57.0'
4545
- python: '3.13'
4646
torch: '2.8'
4747
- python: '3.13'
4848
transformers: '4.48.3'
4949
- python: '3.13'
5050
transformers: '4.51.3'
5151
- python: '3.13'
52-
transformers: '4.52.4'
52+
transformers: '4.55.4'
53+
- python: '3.13'
54+
transformers: '4.56.2'
5355
steps:
5456
- uses: actions/checkout@v3
5557

CHANGELOGS.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
Change Logs
22
===========
33

4+
0.7.14
5+
++++++
6+
7+
* :pr:`250`: add variables to track sequence nodes
8+
* :pr:`249`: patches _maybe_broadcast to support a corner case
9+
410
0.7.13
511
++++++
612

13+
* :pr:`247`: supports more gemma models with ModelBuilder
14+
* :pr:`246`: add a set of inputs checking models works for an empty cache on task text-generation
15+
* :pr:`237`: dummy inputs for google/gemma-3-4b-it
16+
* :pr:`244`: add a patch to bypass the exception raised when the dynamic dimension is in {0,1}
17+
718
0.7.12
819
++++++
920

_doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ def linkcode_resolve(domain, info):
114114
nitpicky = True
115115
# See also scikit-learn/scikit-learn#26761
116116
nitpick_ignore = [
117+
("py:class", "_DimHint"),
118+
("py:class", "KeyPath"),
117119
("py:class", "ast.Node"),
118120
("py:class", "dtype"),
119121
("py:class", "False"),

_doc/examples/plot_export_tiny_phi2.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@
8888
# Shapes may not match on the second call with the modified inputs.
8989

9090

91-
with torch_export_patches(patch_transformers=True), torch.fx.experimental._config.patch(
92-
backed_size_oblivious=True
91+
with (
92+
torch_export_patches(patch_transformers=True),
93+
torch.fx.experimental._config.patch(backed_size_oblivious=True),
9394
):
9495

9596
# Two unnecessary steps but useful in case of an error

_doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ The function replaces dynamic dimensions defined as strings by
239239
Older versions
240240
==============
241241

242+
* `0.7.14 <../v0.7.14/index.html>`_
242243
* `0.7.13 <../v0.7.13/index.html>`_
243244
* `0.7.12 <../v0.7.12/index.html>`_
244245
* `0.7.11 <../v0.7.11/index.html>`_

_doc/patches.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ Here is the list of available patches:
9191

9292
for name, cls in p.__dict__.items():
9393
if name.startswith("patched_") and hasattr(cls, "_PATCHES_"):
94-
print(f"{cls._PATCHED_CLASS_.__name__}: {', '.join(cls._PATCHES_)}")
94+
print(
95+
f"{cls._PATCHED_CLASS_.__name__}: "
96+
f"{', '.join([_ for _ in cls._PATCHES_ if _ is not None])}"
97+
)
9598

9699
Cache serialization
97100
===================

_doc/status/exported_program_dynamic.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ with different options. This steps happens before converting into ONNX.
5353
for exporter in (
5454
"export-strict",
5555
"export-nostrict",
56+
"export-nostrict-oblivious",
5657
"export-nostrict-decall",
5758
"export-tracing",
5859
):

_doc/status/patches_coverage.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ for transformers.
3232

3333
for name, cls in p.__dict__.items():
3434
if name.startswith("patched_") and hasattr(cls, "_PATCHES_"):
35-
print(f"{cls._PATCHED_CLASS_.__name__}: {', '.join(cls._PATCHES_)}")
35+
print(
36+
f"{cls._PATCHED_CLASS_.__name__}: "
37+
f"{', '.join([_ for _ in cls._PATCHES_ if _ is not None])}"
38+
)
3639

3740
Half Automated Rewrites for Control Flows
3841
=========================================

_scripts/test_backend_onnxruntime.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import unittest
66
import warnings
77
from typing import Any
8+
import packaging.version as pv
89
import numpy
910
import onnx.backend.base
1011
import onnx.backend.test
@@ -140,6 +141,9 @@ def run_node(cls, node, inputs, device=None, outputs_info=None, **kwargs):
140141

141142
backend_test.exclude("(test_adagrad|test_adam|test_add_uint8)")
142143

144+
if pv.Version(onnxruntime.__version__) <= pv.Version("1.24"):
145+
backend_test.exclude("(test_attention_4d_with|test_attention_4d_gqa)")
146+
143147

144148
# import all test cases at global scope to make them visible to python.unittest
145149
globals().update(backend_test.test_cases)

0 commit comments

Comments
 (0)