parent
b62d93efff
commit
b0ebea1cda
@ -6,14 +6,14 @@ include_guard(GLOBAL)
|
|||||||
|
|
||||||
set(VPU_SUPPORTED_FIRMWARES usb-ma2x8x pcie-ma2x8x)
|
set(VPU_SUPPORTED_FIRMWARES usb-ma2x8x pcie-ma2x8x)
|
||||||
set(VPU_SUPPORTED_FIRMWARES_HASH
|
set(VPU_SUPPORTED_FIRMWARES_HASH
|
||||||
"420b300d193f7fcfe7e3f9bbec6c247d65b784a500b5cd2effb7cb1ec6e1b209"
|
"d55a824838accec31733e4d4c45e8774bdd5690da8beefe41360f1983476e3d0"
|
||||||
"bfe3caf270b168b9de18ef88f04bde3907d7d12a679f1fa7cc580423c35db637")
|
"61797a77b38fc677be4cc63d730e8871bbf169686b88eabb7066b01f9d156129")
|
||||||
|
|
||||||
#
|
#
|
||||||
# Default packages
|
# Default packages
|
||||||
#
|
#
|
||||||
|
|
||||||
set(FIRMWARE_PACKAGE_VERSION 1688)
|
set(FIRMWARE_PACKAGE_VERSION 1714)
|
||||||
set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.2")
|
set(VPU_CLC_MA2X8X_VERSION "movi-cltools-20.09.2")
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -1025,7 +1025,8 @@ public:
|
|||||||
Logical_OR,
|
Logical_OR,
|
||||||
Logical_XOR,
|
Logical_XOR,
|
||||||
Logical_NOT,
|
Logical_NOT,
|
||||||
Mean
|
Mean,
|
||||||
|
Abs,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,6 +127,7 @@ const Transformations& getDefaultTransformations() {
|
|||||||
{ngraph::opset3::Exp::type_info, dynamicToStaticUnaryElementwise},
|
{ngraph::opset3::Exp::type_info, dynamicToStaticUnaryElementwise},
|
||||||
{ngraph::opset3::Sqrt::type_info, dynamicToStaticUnaryElementwise},
|
{ngraph::opset3::Sqrt::type_info, dynamicToStaticUnaryElementwise},
|
||||||
{ngraph::opset3::LogicalNot::type_info, dynamicToStaticUnaryElementwise},
|
{ngraph::opset3::LogicalNot::type_info, dynamicToStaticUnaryElementwise},
|
||||||
|
{ngraph::opset3::Abs::type_info, dynamicToStaticUnaryElementwise},
|
||||||
{ngraph::opset5::ScatterElementsUpdate::type_info, dynamicToStaticUnaryElementwise},
|
{ngraph::opset5::ScatterElementsUpdate::type_info, dynamicToStaticUnaryElementwise},
|
||||||
{ngraph::opset3::StridedSlice::type_info, dynamicToStaticShapeStridedSlice},
|
{ngraph::opset3::StridedSlice::type_info, dynamicToStaticShapeStridedSlice},
|
||||||
{ngraph::opset3::Squeeze::type_info, dynamicToStaticShapeSqueeze},
|
{ngraph::opset3::Squeeze::type_info, dynamicToStaticShapeSqueeze},
|
||||||
|
@ -162,6 +162,7 @@ public:
|
|||||||
void parseCeiling(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const;
|
void parseCeiling(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const;
|
||||||
void parseRound(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const;
|
void parseRound(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const;
|
||||||
void parseCTCGreedyDecoderSeqLen(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const;
|
void parseCTCGreedyDecoderSeqLen(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const;
|
||||||
|
void parseAbs(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Special layers
|
// Special layers
|
||||||
|
@ -177,6 +177,7 @@ VPU_DECLARE_ENUM(StageType,
|
|||||||
GatherElements = 139,
|
GatherElements = 139,
|
||||||
Round = 140,
|
Round = 140,
|
||||||
CTCGreedyDecoderSeqLen = 141,
|
CTCGreedyDecoderSeqLen = 141,
|
||||||
|
Abs = 142,
|
||||||
)
|
)
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -156,6 +156,7 @@ FrontEnd::FrontEnd(StageBuilder::Ptr stageBuilder, const std::shared_ptr<ie::ICo
|
|||||||
{"ExpGatherElements", LAYER_PARSER(parseGatherElements)},
|
{"ExpGatherElements", LAYER_PARSER(parseGatherElements)},
|
||||||
{"Round", LAYER_PARSER(parseRound)},
|
{"Round", LAYER_PARSER(parseRound)},
|
||||||
{"CTCGreedyDecoderSeqLen", LAYER_PARSER(parseCTCGreedyDecoderSeqLen)},
|
{"CTCGreedyDecoderSeqLen", LAYER_PARSER(parseCTCGreedyDecoderSeqLen)},
|
||||||
|
{"Abs", LAYER_PARSER(parseAbs)}
|
||||||
}} {
|
}} {
|
||||||
VPU_THROW_UNLESS(_core != nullptr, "Argument core is null");
|
VPU_THROW_UNLESS(_core != nullptr, "Argument core is null");
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,8 @@ void PassImpl::run(const Model& model) {
|
|||||||
eltwiseStage->type() != StageType::Logical_AND &&
|
eltwiseStage->type() != StageType::Logical_AND &&
|
||||||
eltwiseStage->type() != StageType::Logical_OR &&
|
eltwiseStage->type() != StageType::Logical_OR &&
|
||||||
eltwiseStage->type() != StageType::Logical_XOR &&
|
eltwiseStage->type() != StageType::Logical_XOR &&
|
||||||
eltwiseStage->type() != StageType::Logical_NOT) {
|
eltwiseStage->type() != StageType::Logical_NOT &&
|
||||||
|
eltwiseStage->type() != StageType::Abs) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,9 +16,18 @@ void FrontEnd::parseLogicalNot(const Model &model, const ie::CNNLayerPtr &layer,
|
|||||||
parseEltwise(model, res, inputs, outputs);
|
parseEltwise(model, res, inputs, outputs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrontEnd::parseAbs(const Model &model, const ie::CNNLayerPtr &layer, const DataVector &inputs, const DataVector &outputs) const {
|
||||||
|
LayerParams params = {layer->name, "Eltwise", layer->precision};
|
||||||
|
auto res = std::make_shared<InferenceEngine::EltwiseLayer>(params);
|
||||||
|
res->_operation = InferenceEngine::EltwiseLayer::Abs;
|
||||||
|
|
||||||
|
parseEltwise(model, res, inputs, outputs);
|
||||||
|
}
|
||||||
|
|
||||||
void FrontEnd::parseActivation(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const {
|
void FrontEnd::parseActivation(const Model& model, const ie::CNNLayerPtr& layer, const DataVector& inputs, const DataVector& outputs) const {
|
||||||
const ie::details::caseless_map<std::string, LayerParser> activationParsers {
|
const ie::details::caseless_map<std::string, LayerParser> activationParsers {
|
||||||
{"not", LAYER_PARSER(parseLogicalNot)},
|
{"not", LAYER_PARSER(parseLogicalNot)},
|
||||||
|
{"abs", LAYER_PARSER(parseAbs)},
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto type = layer->GetParamAsString("type");
|
const auto type = layer->GetParamAsString("type");
|
||||||
|
@ -72,6 +72,7 @@ static const std::map<ie::EltwiseLayer::eOperation, std::function<StageType(ie::
|
|||||||
MAP_ELEMENTS(Logical_XOR, moreThanOneInput),
|
MAP_ELEMENTS(Logical_XOR, moreThanOneInput),
|
||||||
MAP_ELEMENTS(Pow, onlyTwoInputs),
|
MAP_ELEMENTS(Pow, onlyTwoInputs),
|
||||||
MAP_ELEMENTS(Floor_mod, onlyTwoInputs),
|
MAP_ELEMENTS(Floor_mod, onlyTwoInputs),
|
||||||
|
MAP_ELEMENTS(Abs, onlyOneInput),
|
||||||
};
|
};
|
||||||
|
|
||||||
class EltwiseStage final : public StageNode {
|
class EltwiseStage final : public StageNode {
|
||||||
@ -150,7 +151,8 @@ private:
|
|||||||
StageType::Div,
|
StageType::Div,
|
||||||
StageType::Min,
|
StageType::Min,
|
||||||
StageType::Logical_NOT,
|
StageType::Logical_NOT,
|
||||||
StageType::Logical_AND
|
StageType::Logical_AND,
|
||||||
|
StageType::Abs,
|
||||||
};
|
};
|
||||||
auto supportedDataTypesInput0 = EnumSet<DataType>{DataType::FP16};
|
auto supportedDataTypesInput0 = EnumSet<DataType>{DataType::FP16};
|
||||||
if (stageTypesWhichSupportS32.count(operation)) {
|
if (stageTypesWhichSupportS32.count(operation)) {
|
||||||
@ -264,7 +266,7 @@ void FrontEnd::parseEltwise(const Model& model, const ie::CNNLayerPtr& _layer, c
|
|||||||
DataVector tempInputs(3);
|
DataVector tempInputs(3);
|
||||||
tempInputs[0] = inputs[0];
|
tempInputs[0] = inputs[0];
|
||||||
|
|
||||||
if (stageType == StageType::Logical_NOT)
|
if (stageType == StageType::Logical_NOT || stageType == StageType::Abs)
|
||||||
tempInputs[1] = model->addFakeData();
|
tempInputs[1] = model->addFakeData();
|
||||||
else
|
else
|
||||||
tempInputs[1] = inputs[1];
|
tempInputs[1] = inputs[1];
|
||||||
|
@ -16,6 +16,7 @@ const std::vector<InferenceEngine::Precision> netPrecisions = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const std::map<ActivationTypes, std::vector<std::vector<float>>> activationTypes = {
|
const std::map<ActivationTypes, std::vector<std::vector<float>>> activationTypes = {
|
||||||
|
{Abs, {}},
|
||||||
{Sigmoid, {}},
|
{Sigmoid, {}},
|
||||||
{Tanh, {}},
|
{Tanh, {}},
|
||||||
{Relu, {}},
|
{Relu, {}},
|
||||||
|
Loading…
Reference in New Issue
Block a user