Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

fp64 tests just on ubuntu and nightly just dynamo test (#2199)

João Gustavo A. Amorimcd7d65c957c3
diff --git a/.github/actions_info.md b/.github/actions_info.md
index aa0166f79..2a5b09971 100644
--- a/.github/actions_info.md
+++ b/.github/actions_info.md
@@ -39,6 +39,8 @@ Has the inputs:
with format of a json list within strings for each pytorch version desired.
- `pytorch-dtype`: (string, default: `float32`) the dtype used to generate
the tests with pytest.
+- `pytest-extra`: (string, default: ``) extra options passed for the pytest
+ e.g: `-k test_smoke` to collect and run just smoke tests.
- `continue-on-error`: (boolean, default: `false`) to set the
`continue-on-error` behavior on the test step.
- `fail-fast`: (boolean, default: `false`) to set the `fail-fast` behavior on
diff --git a/.github/workflows/pr_test_cpu.yml b/.github/workflows/pr_test_cpu.yml
index 98b531563..1b6dee44e 100644
--- a/.github/workflows/pr_test_cpu.yml
+++ b/.github/workflows/pr_test_cpu.yml
@@ -15,29 +15,39 @@ concurrency:
jobs:
tests-cpu:
strategy:
- fail-fast: false # TODO: enable it when CI be stable
+ fail-fast: false # TODO: enable it when CI be stable
matrix:
os: ['Ubuntu-latest', 'Windows-latest', 'MacOS-latest']
- pytorch-dtype: ['float32', 'float64']
uses: ./.github/workflows/tests.yml
with:
os: ${{ matrix.os }}
python-version: '["3.7", "3.10"]'
pytorch-version: '["1.9.1", "1.13.1"]'
- pytorch-dtype: ${{ matrix.pytorch-dtype }}
+ pytorch-dtype: 'float32'
tests-cpu-old-torch-new-py:
strategy:
fail-fast: false
matrix:
os: ['Ubuntu-latest', 'Windows-latest', 'MacOS-latest']
- pytorch-dtype: ['float32', 'float64']
uses: ./.github/workflows/tests.yml
with:
os: ${{ matrix.os }}
python-version: '["3.9"]'
- pytorch-dtype: ${{ matrix.pytorch-dtype }}
+ pytorch-dtype: 'float32'
+
+ tests-cpu-fp64:
+ strategy:
+ fail-fast: true
+ matrix:
+ os: ['Ubuntu-latest']
+ uses: ./.github/workflows/tests.yml
+ with:
+ os: ${{ matrix.os }}
+ python-version: '["3.7", "3.10"]'
+ pytorch-version: '["1.9.1", "1.13.1"]'
+ pytorch-dtype: 'float64'
tests-nightly:
if: contains(github.event.pull_request.labels.*.name, 'nightly')
@@ -54,7 +64,7 @@ jobs:
python-version: '["3.10"]'
pytorch-version: '["nightly"]'
pytorch-dtype: ${{ matrix.pytorch-dtype }}
-
+ pytest-extra: '-k dynamo'
# tests-cpu-half:
# strategy:
# fail-fast: false # TODO: enable it when CI be stable
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ba2d74d94..93962996f 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -17,6 +17,10 @@ on:
required: false
type: string
default: 'float32'
+ pytest-extra:
+ required: false
+ type: string
+ default: ''
continue-on-error:
required: false
type: boolean
@@ -53,7 +57,7 @@ jobs:
- name: Run CPU tests ${{ inputs.pytorch-dtype }}
continue-on-error: ${{ inputs.continue-on-error }}
shell: bash -l {0}
- run: pytest -v --device cpu --dtype ${{ inputs.pytorch-dtype }} --cov=kornia --cov-report xml ./test
+ run: pytest -v --device cpu --dtype ${{ inputs.pytorch-dtype }} ${{ inputs.pytest-extra }} --cov=kornia --cov-report xml ./test
- if: always()