Upstream tests/nn compatibility matrix¶
Reference snapshot and scope¶
This port is audited against e3nn/e3nn commit
2aa7f58440a06b15352a2cbce01fa4c26f824969,
dated 2026-02-13.
The requested scope is every Python test directly under tests/nn. The following model tests are intentionally excluded:
tests/nn/models/gate_points_2101_test.pytests/nn/models/gate_points_2102_test.pytests/nn/models/v2203/sparse_voxel_convolution_test.py
The tests are semantic MLX ports rather than textual Torch translations:
representation-carrying values use
IrrepsArraywhere the MLX API requires representation metadata;TorchScript and
torch.compilechecks usemlx.core.compile;Torch autograd checks use MLX
gradormlx.nn.value_and_grad;parameter checks use MLX module parameter trees;
copy.deepcopychecks are retained;upstream’s session-wide float64 repetitions are not applicable because the current MLX runtime contract is float32.
Requirement mapping¶
Upstream file |
Upstream cases |
MLX evidence |
|---|---|---|
|
All 3 activation/irrep combinations; normalized second moment; constant activation scale; proper and improper equivariance; compilation |
|
|
Train/eval equivariance; all 16 affine/reduce/normalization/instance modes; both instance modes with norm and component output statistics |
|
|
Evaluation identity; training mask values; irrep-component-shared masks; proper and improper equivariance under a fixed random seed; compilation; deepcopy |
|
|
Multiple outputs; both |
|
|
All 8 activation/variance/output-activation combinations with the exact |
|
|
Exact standalone two-output |
|
|
Both bias modes and both nonlinearities; scalar values; vector norms and directions; zero preservation; finite zero gradients; broad-irrep proper and improper equivariance; compilation; parameter tree |
|
|
All 16 activation/normalization/value-parity/argument-parity combinations; 10 trials each for proper rotations and inversion; random grid rotations; |
|
|
All 8 activation/ |
|
fc_test.py::test_data_parallel is guarded upstream by torch.cuda.is_available() and is skipped on non-CUDA systems.
MLX does not expose the Torch CUDA DataParallel API, so that wrapper-specific assertion is backend-inapplicable. The
underlying requirements that the network exposes trainable parameters and supports backward differentiation are covered by
the MLX parameter-tree and value_and_grad assertions in the eight FC cases.
Implementation supplied by this port¶
parity-aware, second-moment-normalized
Activation;irrep-copy-shared equivariant
Dropout;representation-aware
ExtractandExtractIr;upstream-compatible five-argument
Gateand_Sortcut;equivariant
BatchNormandNormActivation;variance-normalized
FullyConnectedNet;parity-aware
S2Activation, including input-bandwidth-aware S2 projection normalization;dense Wigner-basis
SO3GridandSO3Activationwith normalized Haar quadrature.
Release gate¶
Completion requires all of the following from the repository root on Apple Silicon:
E3NN_MLX_REQUIRE_RUNTIME=1 .venv/bin/python -m pytest -q tests/test_upstream_nn_basic.py tests/test_upstream_nn_gate.py tests/test_upstream_nn_norm_fc.py tests/test_upstream_nn_s2act.py tests/test_upstream_nn_so3act.py
E3NN_MLX_REQUIRE_RUNTIME=1 .venv/bin/python -m pytest -q
.venv/bin/python -m pytest -q -m 'not mlx'
The runtime-required command turns any skipped MLX test into a failure.