Skip to content
Projects

tree_d_3d.kernels.tests.test_metal_kernels

The Metal versions of the kernels on the GPU of an Apple-silicon Mac, against the CPU.

Each test calls a <name>_metal.py function and the Pyccel (or NumPy) version with the same arrays. The GPU computes in float32, so the results agree to about 1e-5 of the largest value. Skipped without MLX and a Metal GPU.

Attributes

NameDescription
SOFTENINGNo description.
TOLNo description.
pytestmarkNo description.

Functions

NameDescription
systemNo description.
test_direct_sumsNo description.
test_direct_sums_report_coincident_chargesNo description.
test_pair_energyNo description.
test_tree_evaluationNo description.

SOFTENINGattributemodule attribute#

SOFTENING = 0.01

TOLattributemodule attribute#

TOL = {'rtol': 0.0, 'atol': 3e-05}

pytestmarkattributemodule attribute#

pytestmark = pytest.mark.skipif(not metal_available(), reason='MLX with a Metal GPU is not available')

systemfunction#

def system()

test_direct_sumsfunction#

def test_direct_sums(system, name, metal)

test_direct_sums_report_coincident_chargesfunction#

def test_direct_sums_report_coincident_charges(name, metal)

test_pair_energyfunction#

def test_pair_energy(system)

test_tree_evaluationfunction#

def test_tree_evaluation(system, kernel)