ejkernel.errors#
Custom exception types for the ejKernel library.
This module defines the exception hierarchy used throughout ejKernel to signal runtime errors related to unsupported platforms, missing backends, or invalid kernel configurations. All custom exceptions inherit from standard Python exception classes to allow both specific and generic exception handling.
Example
>>> from ejkernel.errors import EjkernelRuntimeError
>>> try:
... raise EjkernelRuntimeError("Flash attention not supported on CPU")
... except RuntimeError:
... print("Caught as generic RuntimeError")
- exception ejkernel.errors.EjkernelRuntimeError[source]#
Bases:
RuntimeErrorRuntime error raised when an ejKernel operation cannot proceed.
This exception is raised when a kernel or operation is invoked on an unsupported platform, with an incompatible backend, or with invalid configuration that prevents execution.
Inherits from
RuntimeErrorso callers can catch it either specifically or via the standardRuntimeErrorhandler.Example
>>> raise EjkernelRuntimeError( ... "Triton flash attention requires GPU platform" ... )