Skip to content

Replace global factory config with RuntimeOptionsΒ #226

@allnes

Description

@allnes

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions