KernelFallbackExhaustedError

KernelFallbackExhaustedError#

class brainevent.KernelFallbackExhaustedError#

Raised when all fallback kernel backends have been exhausted.

This exception is raised by XLACustomKernel when no registered backend can handle the requested operation on the current platform, either because no backends are registered or because the explicitly requested backend is not available.

Parameters:

message (str) – A human-readable description listing the primitive name, the platform, and the backends that were attempted.

See also

KernelNotAvailableError

Raised for a single missing backend.

XLACustomKernel

The kernel manager that raises this exception during dispatch.

Notes

The error message typically includes the list of available backends for the platform so that the user can switch to an alternative via the backend= keyword argument or XLACustomKernel.set_default().

Examples

>>> from brainevent._error import KernelFallbackExhaustedError
>>> raise KernelFallbackExhaustedError(
...     "No kernels registered for platform 'tpu' in primitive 'csrmv'."
... )