Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e7592c2
torch==2.11.0
AlexanderDokuchaev Mar 24, 2026
74fdad8
export_for_training to export
AlexanderDokuchaev Mar 24, 2026
936c3a2
disable_tf32_precision
AlexanderDokuchaev Mar 24, 2026
79193b4
cuda13
AlexanderDokuchaev Mar 24, 2026
b4c6224
onnx-ir==0.2.0
AlexanderDokuchaev Mar 24, 2026
ed7487d
fn
AlexanderDokuchaev Mar 24, 2026
a9a7a2b
Merge branch 'develop' into ad/pt2110
AlexanderDokuchaev Apr 23, 2026
2c1f094
13.2
AlexanderDokuchaev Apr 23, 2026
0b9fdf6
ids
AlexanderDokuchaev Apr 23, 2026
166068e
mypy
AlexanderDokuchaev Apr 23, 2026
ea59416
doc
AlexanderDokuchaev Apr 23, 2026
2feb92b
onnx-ir==0.2.1, onnxscript==0.7.0
AlexanderDokuchaev Apr 24, 2026
0913720
xfail
AlexanderDokuchaev Apr 24, 2026
d61205c
test
AlexanderDokuchaev Apr 24, 2026
26eae3b
override tests
AlexanderDokuchaev Apr 24, 2026
34b5b0c
rm
AlexanderDokuchaev Apr 24, 2026
b9ccd0d
disable gptmodel example
AlexanderDokuchaev Apr 24, 2026
bccc49d
test
AlexanderDokuchaev Apr 24, 2026
77319cf
f
AlexanderDokuchaev Apr 24, 2026
5167e15
fin
AlexanderDokuchaev Apr 24, 2026
7ed3ff5
del disable_tf32_precision
AlexanderDokuchaev Apr 24, 2026
be9efe1
r
AlexanderDokuchaev Apr 24, 2026
53dbd01
c
AlexanderDokuchaev Apr 24, 2026
0a25342
Merge branch 'develop' into ad/pt2110
AlexanderDokuchaev Jun 26, 2026
dc10e7c
test_runner
AlexanderDokuchaev Jun 26, 2026
3865946
ci: update container image to Ubuntu 24.04 for precommit workflow
AlexanderDokuchaev Jun 26, 2026
72c3958
t
AlexanderDokuchaev Jun 26, 2026
d092718
git
AlexanderDokuchaev Jun 26, 2026
f652726
t
AlexanderDokuchaev Jun 26, 2026
bf0bc93
t
AlexanderDokuchaev Jun 26, 2026
9e39f34
lfs
AlexanderDokuchaev Jun 26, 2026
f6ecd72
ca
AlexanderDokuchaev Jun 26, 2026
a656e77
f
AlexanderDokuchaev Jun 26, 2026
d1d9299
ca
AlexanderDokuchaev Jun 26, 2026
16af384
update-ca-certificates
AlexanderDokuchaev Jun 26, 2026
24c8cac
Update call_precommit.yml
AlexanderDokuchaev Jun 29, 2026
dbb840f
Merge branch 'develop' into ad/pt2110
AlexanderDokuchaev Jun 29, 2026
b1e6a3c
cuda
AlexanderDokuchaev Jun 29, 2026
fcf5f15
env
AlexanderDokuchaev Jun 29, 2026
d4116c9
s
AlexanderDokuchaev Jun 29, 2026
ae275a8
d
AlexanderDokuchaev Jun 29, 2026
b53b026
venv
AlexanderDokuchaev Jun 30, 2026
fb8b7ea
f
AlexanderDokuchaev Jun 30, 2026
3090068
f
AlexanderDokuchaev Jun 30, 2026
3289b72
Add --no-cache-dir option to pip install for cleaner dependency insta…
AlexanderDokuchaev Jun 30, 2026
ae7d20d
f
AlexanderDokuchaev Jun 30, 2026
04148d6
Add --no-cache-dir option to pip install for cleaner dependency manag…
AlexanderDokuchaev Jun 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ self-hosted-runner:
- windows-2025-8-core
- windows-2025-16-core
- aks-linux-6-cores-55gb-gpu-a10
- Linux
- NNCF
169 changes: 27 additions & 142 deletions .github/workflows/call_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,158 +19,37 @@ on:
required: false

jobs:
common:
timeout-minutes: 40
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Override constraints
if: ${{ inputs.override_requirements != '' }}
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
shell: bash
- name: Install NNCF and test requirements
run: uv pip install --system . -r tests/common/requirements.txt
- name: Print installed modules
run: pip list
- name: Run common precommit test scope
run: make test-common
env:
NUM_WORKERS: 2

onnx:
timeout-minutes: 40
runs-on: ubuntu-latest-8-cores
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Override constraints
if: ${{ inputs.override_requirements != '' }}
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
shell: bash
- name: Install NNCF and test requirements
run: uv pip install --system . -r tests/onnx/requirements.txt
- name: Print installed modules
run: pip list
- name: Run ONNX precommit test scope
run: make test-onnx
env:
NUM_WORKERS: 4

openvino:
timeout-minutes: 40
runs-on: ubuntu-latest-8-cores
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Override constraints
if: ${{ inputs.override_requirements != '' }}
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
shell: bash
- name: Install NNCF and test requirements
run: uv pip install --system . -r tests/openvino/requirements.txt
- name: Print installed modules
run: pip list
- name: Run OV precommit test scope
run: make test-openvino
env:
NUM_WORKERS: 4

tools:
timeout-minutes: 40
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Install test requirements
run: uv pip install --system . -r tests/tools/requirements.txt
- name: Print installed modules
run: pip list
- name: Run tools precommit test scope
run: pytest -ra tests/tools

pytorch-cpu:
timeout-minutes: 40
runs-on: ubuntu-latest
# TODO(AlexanderDokuchaev): Enable with torchao=0.18.0 release
if: ${{ inputs.python_version != '3.14' }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Override constraints
if: ${{ inputs.override_requirements != '' }}
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
shell: bash
- name: Install NNCF and test requirements
run: uv pip install --system . -r tests/torch/requirements.txt
- name: Print installed modules
run: pip list
- name: Run torch precommit test scope
run: pytest -ra -n2 --durations=30 tests/torch -m "not cuda"

pytorch-cuda:
timeout-minutes: 40
runs-on: aks-linux-6-cores-55gb-gpu-a10
runs-on:
group: Nvidia-GPU
labels: [Linux, NNCF]
if: ${{ inputs.gpu_enabled == true }}
container:
image: ubuntu:24.04
options: --gpus all --ipc=host
volumes:
- /usr/local/share/ca-certificates:/usr/local/share/ca-certificates:ro
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive
NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/IntelProxyRootCA-Base64.crt
GIT_SSL_CAINFO: /usr/local/share/ca-certificates/IntelProxyRootCA-Base64.crt
PIP_CERT: /usr/local/share/ca-certificates/IntelProxyRootCA-Base64.crt
REQUESTS_CA_BUNDLE: /usr/local/share/ca-certificates/IntelProxyRootCA-Base64.crt
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
steps:
- name: Install dependencies
run : |
sudo apt-get update
sudo apt-get --assume-yes install build-essential ninja-build libgl1-mesa-dev libglib2.0-0 wget make
apt-get update
apt-get --assume-yes install git git-lfs ca-certificates build-essential ninja-build libgl1-mesa-dev libglib2.0-0 wget make libpython3.12-dev libffi-dev
update-ca-certificates
- name: Download CUDA
run: |
wget -q https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda_12.6.3_560.35.05_linux.run
sudo sh cuda_12.6.3_560.35.05_linux.run --toolkit --silent
wget -q https://developer.download.nvidia.com/compute/cuda/13.2.1/local_installers/cuda_13.2.1_595.58.03_linux.run
sh cuda_13.2.1_595.58.03_linux.run --toolkit --silent
- name: Runner info
continue-on-error: true
run: |
Expand All @@ -182,14 +61,20 @@ jobs:
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ inputs.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Create virtual environment
# TODO(AlexanderDokuchaev): remove it after fix of runner
run: |
pip list
python3 -m venv .venv
echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
# - name: Install uv
# uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: Override constraints
if: ${{ inputs.override_requirements != '' }}
run: python .github/scripts/override_constraints.py "${{ inputs.override_requirements }}"
shell: bash
- name: Install NNCF and test requirements
run: uv pip install --system . -r tests/torch/requirements.txt
run: pip install --no-cache-dir . -r tests/torch/requirements.txt
- name: Print installed modules
run: pip list
- name: Check CUDA
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ jobs:
sudo apt-get --assume-yes install build-essential ninja-build libgl1-mesa-dev libglib2.0-0 wget make
- name: Download CUDA
run: |
wget -q https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda_12.6.3_560.35.05_linux.run
sudo sh cuda_12.6.3_560.35.05_linux.run --toolkit --silent
wget -q https://developer.download.nvidia.com/compute/cuda/13.2.1/local_installers/cuda_13.2.1_595.58.03_linux.run
sudo sh cuda_13.2.1_595.58.03_linux.run --toolkit --silent
- name: Runner info
continue-on-error: true
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
sudo apt-get --assume-yes install build-essential ninja-build libgl1-mesa-dev libglib2.0-0 wget make virtualenv
- name: Download CUDA
run: |
wget -q https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda_12.6.3_560.35.05_linux.run
sudo sh cuda_12.6.3_560.35.05_linux.run --toolkit --silent
wget -q https://developer.download.nvidia.com/compute/cuda/13.2.1/local_installers/cuda_13.2.1_595.58.03_linux.run
sudo sh cuda_13.2.1_595.58.03_linux.run --toolkit --silent
- name: Runner info
continue-on-error: true
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ def transform_fn(data_item):
calibration_dataset = nncf.Dataset(dataset_loader, transform_fn)

# Step 3: Export model to TorchFX
input_shape = (1, 3, 224, 224)
fx_model = torch.export.export_for_training(model, args=(ex_input,)).module()
ex_input = torch.randn(1, 3, 224, 224)
fx_model = torch.export.export(model, args=(ex_input,)).module()
# or
# fx_model = torch.export.export(model, args=(ex_input,)).module()

Expand Down
8 changes: 4 additions & 4 deletions constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
openvino==2026.2.1

# Pytorch
torch==2.10.0
torchvision==0.25.0
torch==2.11.0
torchvision==0.26.0
torchao==0.17.0

# ONNX
onnx==1.22.0
onnx-ir==0.1.15
onnx-ir==0.2.1
onnxruntime==1.23.2; python_version < '3.11'
onnxruntime==1.24.3; python_version >= '3.11'
onnxscript==0.6.2
onnxscript==0.7.0

# Tests and examples
pytest==9.0.3
Expand Down
4 changes: 2 additions & 2 deletions docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ as well as the supported versions of Python:

| NNCF | OpenVINO | PyTorch | ONNX | TensorFlow | Python |
|-----------|------------|----------|----------|------------|--------|
| `develop` | `2026.2.1` | `2.10.0` | `1.22.0` | | `3.12` |
| `develop` | `2026.2.1` | `2.11.0` | `1.22.0` | | `3.12` |
| `3.2.0` | `2026.2.0` | `2.10.0` | `1.21.0` | | `3.12` |
| `3.1.0` | `2026.1.0` | `2.10.0` | `1.21.0` | | `3.10` |
| `3.0.0` | `2026.0.0` | `2.9.0` | `1.17.0` | | `3.10` |
Expand All @@ -73,4 +73,4 @@ as well as the supported versions of Python:

> (*) Python 3.9 or higher is required for TensorFlow 2.15.1

This repository is tested on Python* 3.12, PyTorch* 2.10.0 (NVidia CUDA\* Toolkit 12.6).
This repository is tested on Python* 3.12, PyTorch* 2.11.0 (NVidia CUDA\* Toolkit 13.2).
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ optimum-onnx @ git+https://github.com/AlexanderDokuchaev/optimum-onnx.git@b57739
onnx==1.22.0
onnxruntime==1.23.2; python_version < '3.11'
onnxruntime==1.24.3; python_version >= '3.11'
torch==2.10.0
torch==2.11.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
torch==2.10.0
torch==2.11.0
transformers==5.0.0
openvino==2026.2.1
optimum-intel[openvino]==2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ optimum-intel[openvino]==2.0.0
optimum==2.2.0
transformers==5.0.0
onnx==1.22.0
torch==2.10.0
torchvision==0.25.0
torch==2.11.0
torchvision==0.26.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ optimum-intel[openvino]==2.0.0
optimum==2.2.0
transformers==5.0.0
onnx==1.22.0
torch==2.10.0
torchvision==0.25.0
torch==2.11.0
torchvision==0.26.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ optimum-intel[openvino]==2.0.0
optimum==2.2.0
transformers==5.0.0
onnx==1.22.0
torch==2.10.0
torch==2.11.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ onnx==1.22.0
openvino==2026.2.1
optimum-intel[openvino]==2.0.0
optimum==2.2.0
torch==2.10.0
torch==2.11.0
transformers==5.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ optimum-intel==2.0.0
optimum==2.2.0
transformers==5.0.0
onnx==1.22.0
torch==2.10.0
torch==2.11.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
torch==2.10.0
torch==2.11.0
datasets==5.0.0
numpy>=1.23.5,<2
openvino==2026.2.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tensorboard==2.20.0
torch==2.10.0
torch==2.11.0
torchao==0.17.0
numpy>=1.23.5,<2
openvino==2026.2.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tensorboard==2.20.0
torch==2.10.0
torch==2.11.0
numpy>=1.23.5,<2
openvino==2026.2.1
optimum-intel==2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def convert_and_export_with_cache(model: PreTrainedModel) -> tuple[ExportedProgr

dynamic_shapes = {"input_ids": {1: torch.export.Dim.DYNAMIC}, "cache_position": {0: torch.export.Dim.DYNAMIC}}

exported_program = torch.export.export_for_training(
exported_program = torch.export.export(
model,
args=(
example_input_ids,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ transformers==5.0.0
datasets==5.0.0
openvino==2026.2.1
optimum==2.2.0
torch==2.10.0
torchvision==0.25.0
torch==2.11.0
torchvision==0.26.0
torchao==0.17.0
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
torch==2.10.0
torchvision==0.25.0
torch==2.11.0
torchvision==0.26.0
fastdownload==0.0.7
fastprogress==1.0.5
fastcore==1.11.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ onnx==1.22.0
onnxruntime==1.23.2; python_version < '3.11'
onnxruntime==1.24.3; python_version >= '3.11'
openvino==2026.2.1
torch==2.10.0
torch==2.11.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ultralytics==8.4.21
onnx==1.22.0
openvino==2026.2.1
torch==2.10.0
torch==2.11.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ultralytics==8.3.221
onnx==1.22.0
openvino==2026.2.1
torch==2.10.0
torch==2.11.0
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ fastprogress==1.0.5
fastcore==1.11.5
openvino==2026.2.1
scikit-learn
torch==2.10.0
torchvision==0.25.0
torch==2.11.0
torchvision==0.26.0
Loading
Loading