Coverage for gpaw/test/gpu/test_cpupy.py: 100%
18 statements
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-14 00:18 +0000
« prev ^ index » next coverage.py v7.7.1, created at 2025-07-14 00:18 +0000
1import numpy as np
2import pytest
3from gpaw.gpu import cupy as cp
6@pytest.mark.gpu
7@pytest.mark.serial
8def test_basics():
9 a = cp.empty(2)
10 b = a.get()
11 assert isinstance(b, np.ndarray)
12 assert b.dtype == float
15@pytest.mark.gpu
16@pytest.mark.serial
17@pytest.mark.xfail
18def test_grr():
19 a = cp.empty((2, 2))
20 a[:] = 2.5
21 b = np.float64(3.0) * a
22 assert isinstance(b, cp.ndarray)