-
Notifications
You must be signed in to change notification settings - Fork 2.4k
cpuTarget
Snippets in its first generation can be seen as a generalization over generic eltwise node. First generation of snippets has lack of integration with oneDNN and so patterns it supports should be kept orthogonal to what is fused with post-ops.
POC CPU implementation could be found here
First 8 kernel parameters are passed by structure which is unpacked inside a kernel into the registers. The rest are passed through the stack.
Loop trip count should be placed to some GP register, as well as work amount. Moreover, we need to load all the parameters into GP registers. If we assume that we have enough registers than it can be done before the loop body.
auto param0 = abi_params[0];
auto param1 = abi_params[1];
auto result = abi_params[2];
auto work_amount = abi_params[3];
Load could be Vector, Scalar and Broadcast. Only native vector size for an architecture is supported (e.g. 16 on AVX-512)
Memory operation also generates post increments for the pointer it uses.
-
MemoryEmitter
StoreEmitter
ScalarStoreEmitter
-
LoadEmitter
(post increment) BroadcastLoadEmitter
-
ScalarLoadEmitter
(post increment)
All inputs and outputs should be the same layout. Re-layout operations are not included in the snippets dialect. Since current scope is limited to layout-oblivious operations no specific handling for blocking is required. Extending dialect with re-layout operations is a subject of further benchmarking. The following memory representation is assumed.
offset domain margin
+-------+-------------------------------+----------+
| | | |
| | | |
| | | |
| | | |
+-------+-------------------------------+----------+
Tensor data can be passed with strides.
Data
corresponds to a constant table and wraps this entity for the CPU.
© Copyright 2018-2024, OpenVINO team
- Home
- General resources
- How to build
-
Developer documentation
- Inference Engine architecture
- CPU plugin
- GPU plugin
- HETERO plugin architecture
- Snippets
- Sample for IE C++/C/Python API
- Proxy plugin (Concept)
- Tests