From 8acd5daf7f815574fd7674b57fea5d020e3d6927 Mon Sep 17 00:00:00 2001 From: Tiziano De Matteis Date: Thu, 10 Jun 2021 15:02:22 +0200 Subject: [PATCH] Run test reshape separately --- .github/workflows/cpu-ci.yml | 8 +++++++- pytest.ini | 1 + tests/transformation/test_reshape_elimination.py | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cpu-ci.yml b/.github/workflows/cpu-ci.yml index 0bd885a9..8e2a88ca 100644 --- a/.github/workflows/cpu-ci.yml +++ b/.github/workflows/cpu-ci.yml @@ -54,7 +54,13 @@ jobs: - name: Test with pytest env: ORT_RELEASE: ${{ github.workspace }}/onnxruntime-daceml-patched - PYTEST_ARGS: --cov=daceml --cov-report=term --cov-report xml --cov-config=.coveragerc -m "not slow and not fpga and not gpu" + PYTEST_ARGS: --cov=daceml --cov-report=term --cov-report xml --cov-config=.coveragerc -m "not slow and not fpga and not gpu and not seq" + run: make test + + - name: Seq Test with pytest + env: + ORT_RELEASE: ${{ github.workspace }}/onnxruntime-daceml-patched + PYTEST_ARGS: --cov=daceml --cov-report=term --cov-report xml --cov-config=.coveragerc -m "not slow and not fpga and not gpu and seq" run: make test - name: Test with doctest diff --git a/pytest.ini b/pytest.ini index eb866beb..7f98b176 100644 --- a/pytest.ini +++ b/pytest.ini @@ -5,3 +5,4 @@ markers = ort: marks tests that test onnxruntime ops (and sets the default implementation before executing that test) gpu: marks tests that should only run when --gpu or --gpu-only are passed fpga: marks tests for FPGA (deselect with '-m "not fpga"') + seq: mark tests that should run in a separate action diff --git a/tests/transformation/test_reshape_elimination.py b/tests/transformation/test_reshape_elimination.py index dab8f23d..0202d55d 100644 --- a/tests/transformation/test_reshape_elimination.py +++ b/tests/transformation/test_reshape_elimination.py @@ -20,12 +20,13 @@ def forward(self, x): return F.relu(x) +@pytest.mark.seq @pytest.mark.pure def test_reshape_elimination(sdfg_name): ptmodel = Model() x = torch.rand((100, 6, 12, 12)) - dace_model = DaceModule(ptmodel, auto_optimize=False, sdfg_name=sdfg_name, cuda=False) + dace_model = DaceModule(ptmodel, auto_optimize=False, sdfg_name=sdfg_name) def ApplyReshapeElimination(dace_module): sdfg = dace_module.sdfg