Skip to content

Commit a463e02

Browse files
Merge branch 'develop' into support-transpose
2 parents ef4f72f + d516cec commit a463e02

File tree

369 files changed

+9350
-3618
lines changed

Some content is hidden

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

369 files changed

+9350
-3618
lines changed

.ci/cspell_dict.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ ckpt
7272
clusterization
7373
cmap
7474
cnode
75+
codeofconduct
7576
coeffs
7677
concr
7778
confs
@@ -164,6 +165,7 @@ giga
164165
gmtime
165166
googlenet
166167
gptq
168+
gptqmodel
167169
graphdef
168170
groupnormalization
169171
groupsize

.github/dependabot.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ updates:
77
- package-ecosystem: github-actions
88
directory: "/"
99
schedule:
10-
interval: "daily"
10+
interval: "weekly"
11+
day: "monday"
1112
time: "09:00"
1213
timezone: "Asia/Dubai"
1314
assignees:
@@ -18,7 +19,8 @@ updates:
1819
- package-ecosystem: pip
1920
directory: "/"
2021
schedule:
21-
interval: "daily"
22+
interval: "weekly"
23+
day: "monday"
2224
time: "09:00"
2325
timezone: "Asia/Dubai"
2426
open-pull-requests-limit: 10
@@ -29,6 +31,8 @@ updates:
2931
# Frameworks
3032
- dependency-name: "onnx"
3133
- dependency-name: "onnxruntime"
34+
- dependency-name: "onnx-ir"
35+
- dependency-name: "onnxscript"
3236
- dependency-name: "openvino"
3337
- dependency-name: "torch"
3438
- dependency-name: "torchvision"

.github/scripts/pytest_md_summary.py

Lines changed: 52 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,45 @@
1010
# limitations under the License.
1111

1212
import sys
13+
from dataclasses import dataclass
14+
from pathlib import Path
1315

1416
from defusedxml import ElementTree as ET
1517

1618

17-
def parse_xml_report(xml_file) -> None:
19+
@dataclass
20+
class TestInfo:
21+
name: str
22+
status: str
23+
time: float
24+
message: str
25+
26+
def to_markdown_row(self) -> str:
27+
message = self.message.splitlines()[0][:60] if self.message else ""
28+
return f"| {self.name} | {self.status} | {self.time:.0f} | {message} |"
29+
30+
def __lt__(self, other: object) -> bool:
31+
"""Enable sorting by name."""
32+
if not isinstance(other, TestInfo):
33+
return NotImplemented
34+
return self.name < other.name
35+
36+
37+
def parse_xml_report(xml_file: Path) -> list[TestInfo]:
1838
"""
1939
Parse the XML report generated by pytest.
2040
2141
:param xml_file: Path to the XML report file
22-
:return: None
42+
:return: List of test info
2343
"""
2444
try:
2545
tree = ET.parse(xml_file)
2646
except FileNotFoundError:
27-
sys.exit(1)
47+
return []
2848

2949
root = tree.getroot()
3050

31-
# Build the summary table in Markdown format
32-
table_lines = []
33-
table_lines.append("| Test Name | Status | Time | Message |")
34-
table_lines.append("|:----------|:------:|-----:|:--------|")
51+
test_info = []
3552

3653
# Iterate over test cases
3754
for testcase in root.findall(".//testcase"):
@@ -53,27 +70,45 @@ def parse_xml_report(xml_file) -> None:
5370
else:
5471
status = "Ok"
5572

56-
# Append each row to the table
57-
if message:
58-
message = message.splitlines()[0][:60]
59-
table_lines.append(f"| {test_name} | {status} | {time_duration:.0f} | {message} |")
73+
test_info.append(
74+
TestInfo(
75+
name=test_name,
76+
status=status,
77+
time=time_duration,
78+
message=message,
79+
)
80+
)
6081

61-
if len(table_lines) > 2:
62-
# Print the summary table only if there are test cases
63-
print("\n".join(table_lines))
82+
return test_info
6483

6584

6685
if __name__ == "__main__":
6786
"""
68-
This script generates a summary table in Markdown format from an XML report generated by pytest.
87+
This script generates a summary table in Markdown format from XML reports generated by pytest.
88+
Finds all XML files recursively in the specified directory.
6989
7090
Usage in GitHub workflow:
7191
- name: Test Summary
7292
if: ${{ !cancelled() }}
7393
run: |
74-
python .github/scripts/generate_examples_summary.py pytest-results.xml >> $GITHUB_STEP_SUMMARY
94+
python .github/scripts/pytest_md_summary.py test-results >> $GITHUB_STEP_SUMMARY
7595
"""
7696
try:
77-
parse_xml_report(sys.argv[1])
97+
xml_files = []
98+
for root in sys.argv[1:]:
99+
xml_files.extend(Path(root).rglob("*.xml"))
100+
101+
if not xml_files:
102+
sys.exit(1)
103+
104+
all_tests: list[TestInfo] = []
105+
for xml_file in sorted(xml_files):
106+
all_tests.extend(parse_xml_report(xml_file))
107+
108+
if all_tests:
109+
print("| Test Name | Status | Time | Message |")
110+
print("|:----------|:------:|-----:|:--------|")
111+
for t in sorted(all_tests):
112+
print(t.to_markdown_row())
78113
except Exception as e:
79114
print(f"Error: {e}")

.github/workflows/api_changes_check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
issues: write
2727
steps:
2828
- name: Download built HTML doc as artifact from previous step
29-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
29+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
3030
with:
3131
name: html_doc_artifact
3232
- run: |
@@ -63,7 +63,7 @@ jobs:
6363
echo '{"pr_number": "${{ github.event.pull_request.number }}", "action": "none"}' > api_status.json
6464
6565
- name: Upload artifact
66-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
66+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7.0.0
6767
with:
6868
name: api_status
6969
path: api_status.json

.github/workflows/api_set_label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- name: Download artifact
2020
id: download-artifact
21-
uses: dawidd6/action-download-artifact@5c98f0b039f36ef966fdb7dfa9779262785ecb05 # v14
21+
uses: dawidd6/action-download-artifact@2536c51d3d126276eb39f74d6bc9c72ac6ef30d3 # v16
2222
with:
2323
run_id: ${{ github.event.workflow_run.id }}
2424
name: api_status

.github/workflows/build_and_publish_doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
persist-credentials: false
3030

3131
- name: Download HTML doc build artifact
32-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
32+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
3333
with:
3434
name: html_doc_artifact
3535

.github/workflows/build_html_doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Archive built HTMLs
3030
shell: bash
3131
run: tar -czf artifact.tar html_build/html
32-
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
32+
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7.0.0
3333
with:
3434
name: html_doc_artifact
3535
path: artifact.tar

.github/workflows/call_precommit.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
python-version: ${{ inputs.python_version }}
3535
- name: Install uv
36-
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
36+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
3737
- name: Override constraints
3838
if: ${{ inputs.override_requirements != '' }}
3939
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
@@ -61,7 +61,7 @@ jobs:
6161
with:
6262
python-version: ${{ inputs.python_version }}
6363
- name: Install uv
64-
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
64+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
6565
- name: Override constraints
6666
if: ${{ inputs.override_requirements != '' }}
6767
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
@@ -89,7 +89,7 @@ jobs:
8989
with:
9090
python-version: ${{ inputs.python_version }}
9191
- name: Install uv
92-
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
92+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
9393
- name: Override constraints
9494
if: ${{ inputs.override_requirements != '' }}
9595
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
@@ -117,7 +117,7 @@ jobs:
117117
with:
118118
python-version: ${{ inputs.python_version }}
119119
- name: Install uv
120-
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
120+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
121121
- name: Install test requirements
122122
run: uv pip install --system . -r tests/tools/requirements.txt
123123
- name: Print installed modules
@@ -139,7 +139,7 @@ jobs:
139139
with:
140140
python-version: ${{ inputs.python_version }}
141141
- name: Install uv
142-
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
142+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
143143
- name: Override constraints
144144
if: ${{ inputs.override_requirements != '' }}
145145
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
@@ -172,8 +172,6 @@ jobs:
172172
- name: Runner info
173173
continue-on-error: true
174174
run: |
175-
export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}}
176-
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
177175
nvidia-smi
178176
cat /proc/cpuinfo
179177
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -183,7 +181,7 @@ jobs:
183181
with:
184182
python-version: ${{ inputs.python_version }}
185183
- name: Install uv
186-
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
184+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
187185
- name: Override constraints
188186
if: ${{ inputs.override_requirements != '' }}
189187
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
@@ -197,6 +195,4 @@ jobs:
197195
python -c "import torch; print(torch.cuda.is_available())"
198196
- name: Run PyTorch precommit test scope
199197
run: |
200-
export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}}
201-
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
202198
pytest -ra --durations=30 tests/torch -m cuda

.github/workflows/conformance_weight_compression.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
with:
3939
python-version: 3.10.14
4040
- name: Install uv
41-
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
41+
uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
4242
- name: cpuinfo
4343
run: cat /proc/cpuinfo
4444
- name: Install NNCF and test requirements
@@ -65,13 +65,33 @@ jobs:
6565
run: column -s, -t < tmp/results.csv || echo "no file"
6666
- name: Upload artifact
6767
if: ${{ !cancelled() }}
68-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
68+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7.0.0
6969
with:
7070
name: wc_results_${{ matrix.group }}
7171
path: tmp/results.csv
7272
if-no-files-found: ignore
73-
- name: Test Summary
73+
- name: Upload test results
7474
if: ${{ !cancelled() }}
75+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
76+
with:
77+
name: weight-compression-pytest-results-${{ matrix.group }}
78+
path: pytest-results.xml
79+
retention-days: 1
80+
81+
weight-compression-summary:
82+
name: Weight Compression Summary
83+
runs-on: ubuntu-latest
84+
if: ${{ always() && !cancelled() && needs.examples-cpu.result != 'cancelled' }}
85+
needs: examples-cpu
86+
steps:
87+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
88+
with:
89+
sparse-checkout: .github/scripts/pytest_md_summary.py
90+
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
91+
with:
92+
pattern: weight-compression-pytest-results-*
93+
path: test-results
94+
- name: Test Summary
7595
run: |
7696
pip install defusedxml==0.7.1
77-
python .github/scripts/pytest_md_summary.py pytest-results.xml >> "$GITHUB_STEP_SUMMARY"
97+
python .github/scripts/pytest_md_summary.py test-results >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)