Skip to content

Commit

Permalink
Setup: bump torch version
Browse files Browse the repository at this point in the history
  • Loading branch information
Giuseppe5 committed Nov 21, 2024
1 parent efb6b65 commit 1f14e4c
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 108 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/develop_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:

matrix:
python_version: ['3.9', '3.10']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/end_to_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ jobs:

matrix:
python_version: ['3.9', '3.10']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- platform: 'windows-latest'


Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/examples_llm_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ jobs:
jit_status: ['jit_disabled', 'jit_enabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- pytorch_version: '1.9.1'
jit_status: 'jit_enabled'



if: ${{ !github.event.pull_request.draft }}
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/examples_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,11 @@ jobs:

matrix:
python_version: ['3.9', '3.10']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']
jit_status: ['jit_disabled', 'jit_enabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- pytorch_version: '1.9.1'
jit_status: 'jit_enabled'



if: ${{ !github.event.pull_request.draft }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/finn_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:

matrix:
python_version: ['3.9', '3.10']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/gen_github_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Reduced Test for PRs, except when a review is requested
PYTHON_VERSIONS_REDUCED = ('3.9',)

PYTORCH_LIST_REDUCED = ["1.9.1", "1.13.0", "2.1.0"]
PYTORCH_LIST_REDUCED = ["1.11.0", "1.13.0", "2.1.0"]

PLATFORM_LIST_REDUCED = ['ubuntu-latest']

Expand All @@ -40,7 +40,7 @@
# Data shared betwen Nox sessions and Github Actions, formatted as tuples
PYTHON_VERSIONS = ('3.9', '3.10')

PYTORCH_VERSIONS = ('1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0')
PYTORCH_VERSIONS = ('1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0')
JIT_STATUSES = ('jit_disabled', 'jit_enabled')

# Data used only by Github Actions, formatted as lists or lists of ordered dicts
Expand All @@ -49,13 +49,9 @@

STRATEGY = od([('fail-fast', 'false')])

EXCLUDE_LIST = generate_exclusion_list([[
['pytorch_version', ['1.9.1']],
['platform', ['macos-latest']],]])
EXCLUDE_LIST = []

JIT_EXCLUDE_LIST = generate_exclusion_list([[['pytorch_version', ['1.9.1']],
['jit_status', [
'jit_enabled',]]]])
JIT_EXCLUDE_LIST = []

NOTEBOOK_EXCLUDE_LIST = generate_exclusion_list([[['platform', [
'macos-latest',]]]])
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ jobs:

matrix:
python_version: ['3.9', '3.10']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- platform: 'macos-latest'


Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ort_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ jobs:

matrix:
python_version: ['3.9', '3.10']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
9 changes: 1 addition & 8 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,11 @@ jobs:

matrix:
python_version: ['3.9', '3.10']
pytorch_version: ['1.9.1', '1.10.1', '1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
pytorch_version: ['1.11.0', '1.12.1', '1.13.0', '2.0.1', '2.1.0']
platform: ['windows-latest', 'ubuntu-latest', 'macos-latest']
jit_status: ['jit_disabled', 'jit_enabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- pytorch_version: '1.9.1'
jit_status: 'jit_enabled'



if: ${{ !github.event.pull_request.draft }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/reduced_develop_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ jobs:

matrix:
python_version: ['3.9']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/reduced_end_to_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ jobs:

matrix:
python_version: ['3.9']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- platform: 'windows-latest'


Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/reduced_examples_llm_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ jobs:
jit_status: ['jit_disabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/reduced_examples_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ jobs:

matrix:
python_version: ['3.9']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']
jit_status: ['jit_disabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/reduced_finn_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ jobs:

matrix:
python_version: ['3.9']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/reduced_notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ jobs:

matrix:
python_version: ['3.9']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'

- platform: 'macos-latest'


Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/reduced_ort_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,10 @@ jobs:

matrix:
python_version: ['3.9']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/reduced_pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ jobs:

matrix:
python_version: ['3.9']
pytorch_version: ['1.9.1', '1.13.0', '2.1.0']
pytorch_version: ['1.11.0', '1.13.0', '2.1.0']
platform: ['ubuntu-latest']
jit_status: ['jit_disabled']


exclude:
- pytorch_version: '1.9.1'
platform: 'macos-latest'



if: ${{ !github.event.pull_request.draft }}
Expand Down
27 changes: 10 additions & 17 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@
EXAMPLES_LLM_PYTEST_PYTORCH_IDS = tuple([
f'pytorch_{i}' for i in EXAMPLES_LLM_PYTEST_PYTORCH_VERSIONS])
JIT_IDS = tuple([f'{i}'.lower() for i in JIT_STATUSES])
LSTM_EXPORT_MIN_PYTORCH = '1.10.1'

TORCHVISION_VERSION_DICT = {
'1.9.1': '0.10.1',
'1.10.1': '0.11.2',
'1.11.0': '0.12.0',
'1.12.1': '0.13.1',
'1.13.0': '0.14.0',
Expand Down Expand Up @@ -191,20 +188,16 @@ def tests_brevitas_notebook(session, pytorch):
install_pytorch(pytorch, session)
install_torchvision(pytorch, session)
session.install('--upgrade', '-e', '.[test, ort_integration, notebook]')
if version.parse(pytorch) >= version.parse(LSTM_EXPORT_MIN_PYTORCH):
session.run(
'pytest', '-n', 'logical', '-v', '--nbmake', '--nbmake-kernel=python3', 'notebooks')
else:
session.run(
'pytest',
'-n',
'logical',
'-v',
'--nbmake',
'--nbmake-kernel=python3',
'notebooks',
'--ignore',
'notebooks/quantized_recurrent.ipynb')
session.run(
'pytest',
'-n',
'logical',
'-v',
'--nbmake',
'--nbmake-kernel=python3',
'notebooks',
'--ignore',
'notebooks/quantized_recurrent.ipynb')


@nox.session(python=PYTHON_VERSIONS)
Expand Down

0 comments on commit 1f14e4c

Please sign in to comment.