Eesam Openvino v2
Eesam Openvino v2
Eesam Openvino v2
This box is
OpenVINO
The Layers and their Ports are connected to build the graph
</layers>
<edges>
<!-- Connections between layer nodes based on ids for layers and ports -->
<edge from-layer="0" from-port="0" to-layer="2" to-port="0"/> 0 1
<edge from-layer="1" from-port="1" to-layer="2" to-port="1"/>
<edge from-layer="2" from-port="2" to-layer="3" to-port="0"/>
0 1
<edge from-layer="3" from-port="1" to-layer="4" to-port="0"/>
</edges> 0 1
<meta_data> 2
<!-- Aauxiliary information that serves for the debugging purposes. -->
<MO_version value="2019.1"/> 2
<cli_parameters>
<blobs_as_inputs value="True"/> 0
<caffe_parser_path value="DIR"/>
<data_type value="float"/>
3
1
...
0
<!-- Omitted a long list of CLI options for debugging purposes. -->
4
</cli_parameters>
</meta_data>
</net>
a b
a b neg
add
(a-b)^2
square
Model Precision
Key Plugin FP32 FP16 I8
Y = Supported CPU Y* Y Y
(*) The IE API is executed on the Leon (host processor) in case of VPU target
class mysquareFrontExtractor(FrontExtractorOp):
op = 'MySquare'
enabled = True
@staticmethod
def extract(node):
proto_layer = node.pb
param = proto_layer.attr
# extracting parameters from TensorFlow layer and prepare them for IR
attrs = {
'op': __class__.op
}
# update the attributes of the node
Op.get_op_class_by_name(__class__.op).update_node_stat(node, attrs)
return __class__.enabled
30/11/21 - 40 EESAM - © 2020 MC- LL
Custom layer in OpenVINO’s MO (3/4)
class mysquareOp(Op):
op = 'MySquare'
def __init__(self, graph, attrs):
mandatory_props = dict(
type=__class__.op,
op=__class__.op,
infer=mysquareOp.infer
)
super().__init__(graph, mandatory_props, attrs)
@staticmethod
def infer(node: Node):
# Add your shape calculation implementation here if input shape differs
# from output shape. Otherwise, use copy_shape_infer(node).
30/11/21 - 41
return copy_shape_infer(node)
EESAM - © 2020 MC- LL
Custom layer in OpenVINO’s MO (4/4)
export SHAVE_MA2X8XLIBS_DIR=/opt/intel/openvino/deployment_tools/tools/cl_compiler/lib/
export SHAVE_LDSCRIPT_DIR=/opt/intel/openvino/deployment_tools/tools/cl_compiler/ldscripts/
export SHAVE_MYRIAD_LD_DIR=/opt/intel/openvino/deployment_tools/tools/cl_compiler/bin/
export SHAVE_MOVIASM_DIR=/opt/intel/openvino/deployment_tools/tools/cl_compiler/bin/
• Global Dimensions:
– 1024x1024 (whole problem space)
• Local Dimensions:
– 128x128 (work-group, executes together)
Cannot synchronize
between work-groups
within a kernel
Work group Executed on a single SHAVE core iterating over multiple work items