* Some pass creates datas duplicate with a different order from time to time (because of unordered_set usage). It leads to a different order in model->datas() list and affects the shape allocation process which relies on this order.
* Make shape allocation be relied on topological order of datas which is stable and doesn't depend on order datas creation during different passes.
Don't increment mapped_idx via prefix increment within the argument of the
potentially unsafe CPU_ISSET_S macro. If the macro is expanded so that the
increment expression is evaluated multiple times, it will return unexpected
results.
While the glibc implementation of CPU_ISSET_S macro seems to be safe, the musl
libc (v1.1.23) version is unsafe and will evaluate the first argument of
CPU_ISSET_S three times.
Co-authored-by: Christian Priebe <cp3213@ic.ac.uk>
In some networks, mvTensor would request a large CMX-DMA transfer (<512K). That starves DMA for other timing critical tasks such as SIPP. Limit CMX-DMA request size as an option in myriad_compile:
* Add compile option TILING_CMX_LIMIT_KB
* Declare compile option TILING_CMX_LIMIT_KB in IE tools (compile_tool and vpu_compile)
* Add tests for compile option TILING_CMX_LIMIT_KB. Small fix for naming behavior tests.
* Specify operation CTCLoss-4
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Correct documentation for CTCLoss after #1 review
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Correct documentation for CTCLoss after #2 review
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Correct documentation for CTCLoss after #3 review
* Correct documentation for CTCLoss after #4 review
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Correct layout for logits and add more description for unique attribute
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Correct types for length and indices tensors
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Correct formulas and punctuation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
Myriad plugin treats DSR operation in a way removing such operations
and connecting inputs with each other (replacing output with one of them).
Semantic of connection is one inputs contains shape of another.
Since the same data object can have exactly one shape it's prohibited
to have DSR inputs connected with another data objects
(the only allowed exception is inputs that are already connected between
each other).
As a result of nGraph -> CNN conversion some operations could be optimized
out which in turn could lead to subsequent DSR operations where each has
its own shape sub-graph. Even if shape sub-graphs are identical it's not
visible to plugin that sees incorrect inputs (inputs of DSR are already
connected, but now with each other, when second DSR is parsed).
To overcome such issue (the reason is when operations are optimized out,
their shape sub-graphs are still there), additional ngraph
transformation should be introduced to merge subsequent DSR into single
DSR operation.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
Previously, if Reshape had input pattern with values [0, -1] - it
propagated dynamic shape through a function. At the same time,
taking "0" and "-1" interpretation into consideration, it turns out
in such cases we could just propagate the same input shape in case of
2D input.
For Faster-RCNN this fix makes static dimensions on dynamic paths static.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* In case of Begin/End/Stride inputs of StridedSlice have rank less
than input data rank - remaining dimensions must be kept unchanged.
* Previous, implementation had UB in such cases - out of bound
vector element access
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* Added mish layer doc opset
* Refactoring mish spec
* Update mish spec
* Change output description of Mish layer
* Fix Mish according to review
* Refactoring Mish and GELU spec according to code review
* Update formula for ops in spec
* Refactoring spec text
* Update Mish opset
* Change Mish version from 1 to 4
* Sort opset4
Co-authored-by: Your Name <you@example.com>
* Added documentation for Interpolate-3.
* Some fixes.
* Fixed some typos.
* Now Interpolate-3 is Interpolate-4.
* Fixed typo.
* DEleted unused 'mode' 'area'.
* Fixed some typos.
* Now 'axes' attribute is an input of Interpolate.
* Added description of variants of nearest_mode.
* Added descriptions of coordinate transformation modes.
* Now 'axes' is an optional input.
* Fixed typo.
the point is that we should check the ORIGINALLY (largest) list of the devices (actually ExecutableNetworks for them) to see if the device is just added back
* [LPT] FuseFakeQuantizeAndScaleShift transformation for last layer fix
* [LPT] refactoring
* [LPT] FuseFakeQuantizeAndScaleShift test: last layer name validation was added
* [IE][nGraph]: Introduces PartialShape ctor from values vector
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph]: Moves evaluateTargetShape to common utilities
The same functionality - get upper-bound shape estimation for dynamic
input - is needed in dynamic Reshape along with dynamic Broadcast.
Return value type has been changed from PartialShape to vector<int64_t>.
The reason is Reshape encodes special values (0, -1) into input values
that define output shape. Representing those values (which upper-bound
provides evaluateTargetShape) as PartialShape leads to incorrect
representation vector with -1 as dynamic shape - which is not expected.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph]: Introduces StaticShapeReshape
In comparison with original Reshape StaticShapeReshape propagates
upper-bound shape through a function in case of dynamic input. To do so,
shape inference method gets upper-bound shape from evaluateTargetShape,
decodes special values (0, -1) in it and then propagate the result.
Output shape processing happens only once, because if shape inference
were called after ShapeOf operations have been optimized out on dynamic
path, then evaluateTargetShape will require evaluate method for all
operations that appear in function before current Reshape. Since
evaluate method is implemented not for all operations it lead to
Faster-RCNN compilation error.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph]: Updates Reshape DTS on StaticShapeReshape
In case of non-const Reshape input that defines output shape DTS uses
StaticShapeReshape which propagates upper-bound shape evaluated from
this input through a function.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph][Tests]: Refactoring DTS Reshape tests
The only changes are:
* header files include reordering
* indentation/wrapping fixing
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [IE][VPU][nGraph]: Moves ShapeOf transformation out of DTS scope
In comparison with DTS ShapeOf transformation needs to work on whole
function. Separating these 2 transformations makes testing easier since
now it's possible to call specific DTS without ShapeOf transformation
and vice versa.
Also DynamicToStaticShapeOf has been renamed into
EliminateShapeOfAfterDSR since transformation doesn't introduce new DSR
operations.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
* [VPU][Tests]: Introduces DTS Reshape tests with non-const pattern
New StaticShapeReshape constructor has been added as well, since test
fixture should create it from reshape parameters, not reshape itself.
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>