Skip to content
Projects

tree_d_3d.kernels.tests.test_cuda_kernels

The CUDA versions of the Barnes-Hut and FMM kernels on a GPU, against the CPU.

Each test runs :class:FlatQuadtree, :func:direct_field or a kernel on CuPy arrays (the CUDA versions) and on NumPy arrays (the Pyccel versions). Without CuPy they are skipped; test_barnes_hut_kernels_emulated runs the same CUDA sources on the CPU, and tree_d_3d/tests/test_cupy_path.py the solver’s CuPy code path with a fake CuPy.

Attributes

NameDescription
ROOTNo description.
TOLNo description.
pytestmarkNo description.

Functions

ROOTattributemodule attribute#

ROOT = Quad(0.0, 0.0, 1.0)

TOLattributemodule attribute#

TOL = {'rtol': 1e-10, 'atol': 1e-10}

pytestmarkattributemodule attribute#

pytestmark = pytest.mark.skipif(not xp.cupy_available(), reason='CuPy not installed or not functional')

systemfunction#

def system()

test_coincident_charges_are_reported_on_the_gpufunction#

def test_coincident_charges_are_reported_on_the_gpu()

test_every_kernel_has_a_cuda_versionfunction#

def test_every_kernel_has_a_cuda_version()

test_fmmfunction#

def test_fmm(system, potential)

test_pair_energy_and_soften_pairsfunction#

def test_pair_energy_and_soften_pairs(system)

test_tree_and_direct_evaluationfunction#

def test_tree_and_direct_evaluation(system, kernel)

test_tree_build_is_identicalfunction#

def test_tree_build_is_identical(system, leaf_capacity)