PerformanceWarning

PerformanceWarning#

class brainevent.PerformanceWarning#

Warned when an operation runs correctly but on a slower code path.

The usual cause is a sparse matrix whose structure is traced (it was passed into jax.jit as an argument) and that carries no cached mirror layout, so the unfavorable product direction cannot use its event-driven kernel. Build the mirror before tracing, e.g. M = M.build_weight_indices().

Each distinct fallback warns once per process. Silence it with the standard warnings filters.

Examples

>>> import warnings
>>> import brainevent
>>> warnings.simplefilter('ignore', brainevent.PerformanceWarning)