A process-global backend switch (LayerFactory::configure(...)) makes tests order-dependent and leaks config across runs. Please introduce per-run config:
enum class Backend { Naive, OneDnn /*...*/ };
struct RuntimeOptions { Backend backend{Backend::Naive}; int threads = 0; bool parallel = false; };
and pass it to Executor (preferred) or graph.inference(RuntimeOptions). Then drop the global configure(...) and map CLI flags to RuntimeOptions. This enables clean test isolation and multiple backends in one process.