diff --git a/tests/next_tests/integration_tests/feature_tests/ffront_tests/test_gpu_backend.py b/tests/next_tests/integration_tests/feature_tests/ffront_tests/test_gpu_backend.py index 80e9a8e07a..7054597831 100644 --- a/tests/next_tests/integration_tests/feature_tests/ffront_tests/test_gpu_backend.py +++ b/tests/next_tests/integration_tests/feature_tests/ffront_tests/test_gpu_backend.py @@ -15,6 +15,7 @@ import pytest import gt4py.next as gtx +from gt4py.next import common from gt4py.next.program_processors.runners import dace_iterator, gtfn from next_tests.integration_tests import cases @@ -26,26 +27,19 @@ @pytest.mark.requires_gpu @pytest.mark.parametrize("fieldview_backend", [dace_iterator.run_dace_gpu, gtfn.run_gtfn_gpu]) -def test_copy(cartesian_case, fieldview_backend): # noqa: F811 # fixtures +def test_copy(fieldview_backend): # noqa: F811 # fixtures import cupy as cp @gtx.field_operator(backend=fieldview_backend) def testee(a: cases.IJKField) -> cases.IJKField: return a - inp_arr = cp.full(shape=(3, 4, 5), fill_value=3, dtype=cp.int32) - outp_arr = cp.zeros_like(inp_arr) - inp = gtx.as_field([cases.IDim, cases.JDim, cases.KDim], inp_arr) - outp = gtx.as_field([cases.IDim, cases.JDim, cases.KDim], outp_arr) - - testee(inp, out=outp, offset_provider={}) - assert cp.allclose(inp_arr, outp_arr) - - inp_field = gtx.full( - [cases.IDim, cases.JDim, cases.KDim], fill_value=3, allocator=fieldview_backend - ) - out_field = gtx.zeros( - [cases.IDim, cases.JDim, cases.KDim], outp_arr, allocator=fieldview_backend - ) + domain = { + cases.IDim: common.unit_range(3), + cases.JDim: common.unit_range(4), + cases.KDim: common.unit_range(5), + } + inp_field = gtx.full(domain, fill_value=3, allocator=fieldview_backend, dtype=cp.int32) + out_field = gtx.zeros(domain, allocator=fieldview_backend, dtype=cp.int32) testee(inp_field, out=out_field, offset_provider={}) assert cp.allclose(inp_field.ndarray, out_field.ndarray) diff --git a/tox.ini b/tox.ini index 18a6ff8e84..5b644e7d97 100644 --- a/tox.ini +++ b/tox.ini @@ -82,9 +82,9 @@ set_env = PIP_EXTRA_INDEX_URL = {env:PIP_EXTRA_INDEX_URL:https://test.pypi.org/simple/} commands = nomesh-cpu: python -m pytest --cache-clear -v -n {env:NUM_PROCESSES:1} -m "not requires_atlas and not requires_gpu" {posargs} tests{/}next_tests - nomesh-gpu: python -m pytest --cache-clear -v -n {env:NUM_PROCESSES:1} -m "not requires_atlas and requires_gpu" {posargs} tests{/}next_tests + nomesh-{cuda,cuda11x,cuda12x}: python -m pytest --cache-clear -v -n {env:NUM_PROCESSES:1} -m "not requires_atlas and requires_gpu" {posargs} tests{/}next_tests atlas-cpu: python -m pytest --cache-clear -v -n {env:NUM_PROCESSES:1} -m "requires_atlas and not requires_gpu" {posargs} tests{/}next_tests - atlas-gpu: python -m pytest --cache-clear -v -n {env:NUM_PROCESSES:1} -m "requires_atlas and requires_gpu" {posargs} tests{/}next_tests + # atlas-{cuda,cuda11x,cuda12x}: python -m pytest --cache-clear -v -n {env:NUM_PROCESSES:1} -m "requires_atlas and requires_gpu" {posargs} tests{/}next_tests # TODO(ricoh): activate when such tests exist pytest --doctest-modules src{/}gt4py{/}next [testenv:storage-py{38,39,310}-{internal,dace}-{cpu,cuda,cuda11x,cuda12x}]