Skip to content

Commit

Permalink
ci[cartesian]: env var on CSCS-CI to suppress cuda backend deprecatio…
Browse files Browse the repository at this point in the history
…n error (#1541)

Suppress the deprecation error for cartesian "CUDA" backend on CSCS-CI.
  • Loading branch information
DropD authored May 3, 2024
1 parent 9cc7548 commit 8c5ab41
Show file tree
Hide file tree
Showing 10 changed files with 147 additions and 129 deletions.
2 changes: 1 addition & 1 deletion ci/cscs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test py38:
script:
- cd /gt4py.src
- python -c "import cupy"
- tox run -e $SUBPACKAGE-$PYVERSION_PREFIX$VARIANT$SUBVARIANT
- tox run -e $SUBPACKAGE-$PYVERSION_PREFIX$VARIANT$SUBVARIANT -- --instafail
parallel:
matrix:
- SUBPACKAGE: [cartesian, storage]
Expand Down
130 changes: 67 additions & 63 deletions constraints.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions min-extra-requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ pygments==2.7.3
pytest-cache==1.0
pytest-cov==2.8
pytest-factoryboy==2.0.3
pytest-instafail==0.5.0
pytest-xdist[psutil]==2.4
pytest==7.0
ruff==0.2.0
Expand Down
1 change: 1 addition & 0 deletions min-requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ pygments==2.7.3
pytest-cache==1.0
pytest-cov==2.8
pytest-factoryboy==2.0.3
pytest-instafail==0.5.0
pytest-xdist[psutil]==2.4
pytest==7.0
ruff==0.2.0
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ module = 'gt4py.next.iterator.runtime'
[tool.pytest]

[tool.pytest.ini_options]
addopts = "--instafail"
filterwarnings = [
"ignore::UserWarning"
]
markers = [
'requires_atlas: tests that require `atlas4py` bindings package',
'requires_dace: tests that require `dace` package',
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pytest-cache>=1.0
pytest-cov>=2.8
pytest-factoryboy>=2.0.3
pytest-xdist[psutil]>=2.4
pytest-instafail>=0.5.0
ruff>=0.2.0
sphinx>=4.4
sphinx_rtd_theme>=1.0
Expand Down
130 changes: 67 additions & 63 deletions requirements-dev.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/cartesian_tests/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def _get_backends_with_storage_info(storage_info_kind: str):
GPU_BACKENDS = _get_backends_with_storage_info("gpu")
ALL_BACKENDS = CPU_BACKENDS + GPU_BACKENDS

_PERFORMANCE_BACKEND_NAMES = [name for name in _ALL_BACKEND_NAMES if name != "numpy"]
_PERFORMANCE_BACKEND_NAMES = [name for name in _ALL_BACKEND_NAMES if name not in ("numpy", "cuda")]
PERFORMANCE_BACKENDS = [_backend_name_as_param(name) for name in _PERFORMANCE_BACKEND_NAMES]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later

import os
from typing import Any, Dict, cast

import numpy as np
Expand Down Expand Up @@ -175,6 +176,8 @@ def test_toolchain_profiling(backend_name: str, mode: int, rebuild: bool):
@pytest.mark.parametrize("backend_name", ["cuda"])
def test_deprecation_gtc_cuda(backend_name: str):
# Default deprecation, raise an error
# Assumes that the GT4PY_GTC_ENABLE_CUDA env variable is not set or set to "0"
# Renders the "cuda" backend untestable
build_info: Dict[str, Any] = {}
builder = (
StencilBuilder(cast(StencilFunc, stencil_def))
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extras =
cuda12x: cuda12x
package = wheel
wheel_build_env = .pkg
pass_env = NUM_PROCESSES, GT4PY_BUILD_CACHE_LIFETIME, GT4PY_BUILD_CACHE_DIR
pass_env = NUM_PROCESSES, GT4PY_*
set_env =
PYTHONWARNINGS = {env:PYTHONWARNINGS:ignore:Support for `[tool.setuptools]` in `pyproject.toml` is still *beta*:UserWarning}

Expand Down

0 comments on commit 8c5ab41

Please sign in to comment.