Class ProviderExecutionMode

java.lang.Object
org.episteme.core.technical.algorithm.ProviderExecutionMode

public final class ProviderExecutionMode extends Object
Thread-local execution mode flag for provider fallback control.

In ProviderExecutionMode.Mode.NORMAL mode, providers may fall back to alternative implementations (e.g., CPU fallback when CUDA fails). In ProviderExecutionMode.Mode.BENCHMARK or ProviderExecutionMode.Mode.AUTOTUNING mode, fallbacks are disabled and failures surface as exceptions, ensuring honest performance measurements.

ProviderExecutionMode.set(Mode.BENCHMARK);
try {
    provider.multiply(a, b); // will throw if CUDA fails
} finally {
    ProviderExecutionMode.reset();
}
Since:
2.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)