BenchmarkDataFnNotProvidedError#
- class brainevent.BenchmarkDataFnNotProvidedError#
Raised when
benchmark()is called but no data function has been registered.benchmark()requires a benchmark data generator to be registered viadef_benchmark_data(). This exception is raised if that function is missing so that the caller receives a clear, actionable error instead of a silent fallback.- Parameters:
message (str) – A description indicating which primitive is missing its data function and how to fix the problem.
See also
XLACustomKernel.def_benchmark_dataRegister a benchmark data generator for a primitive.
XLACustomKernel.benchmarkThe method that raises this exception.
Examples
>>> from brainevent._error import BenchmarkDataFnNotProvidedError >>> raise BenchmarkDataFnNotProvidedError( ... "No benchmark data function registered for 'csrmv'. " ... "Use def_benchmark_data() to register one." ... )