🚀 Feature
A generic API that encapsulates certain operators that require contexts. For example weights are prepacked in certain format.
Pitch
- Instead of using _xnnpack::conv2d_prepack and _xnnpack::conv2d_packed, prepacked::.., prepacked::..
- Conv:
- prepacked::conv2d_clamp_prepack -> Conv2dOpContext
- prepacked::conv2d_clamp_run
- Linear:
- prepacked::linear_clamp_prepack -> LinearOpContext
- prepacked::linear_clamp_run
- OpContext:
- Stores the engine info or backend info to be used by _packed ops during op execution.
- Context creation during deserialization can use heuristics to decide which backend to chose from available ones.
- e.g. if mobile has both XNNPACK and GPU backend available, some heuristics may help decided which backend to use and create context accordingly.
- For now this can be just based on global context. e.g. if xnnpack backend enabled (and is only enabled on mobile) pack for xnnpack.
🚀 Feature
A generic API that encapsulates certain operators that require contexts. For example weights are prepacked in certain format.
Pitch