This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for QuantizedLSTM operation
This change also adds support for dequantization for GNA as GNAPlugin does not support Convert operation. TEST=asr-perf-eval runs succesfully for encoder 0 and encoder 1
- Loading branch information
Showing
16 changed files
with
717 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
|
||
#include <OperationsBase.hpp> | ||
|
||
namespace android { | ||
namespace hardware { | ||
namespace neuralnetworks { | ||
namespace nnhal { | ||
|
||
class QuantizedLSTM : public OperationsBase { | ||
public: | ||
QuantizedLSTM(int operationIndex); | ||
bool validate() override; | ||
std::shared_ptr<ngraph::Node> createNode() override; | ||
void connectOperationToGraph() override; | ||
|
||
std::shared_ptr<ngraph::Node> add(const ngraph::Output<ngraph::Node>& lhs, | ||
const ngraph::Output<ngraph::Node>& rhs); | ||
std::shared_ptr<ngraph::Node> sub(const ngraph::Output<ngraph::Node>& lhs, | ||
const ngraph::Output<ngraph::Node>& rhs); | ||
std::shared_ptr<ngraph::Node> mul(const ngraph::Output<ngraph::Node>& lhs, | ||
const ngraph::Output<ngraph::Node>& rhs); | ||
std::shared_ptr<ngraph::Node> matMul(const ngraph::Output<ngraph::Node>& lhs, | ||
const ngraph::Output<ngraph::Node>& rhs, | ||
bool transpose_lhs, bool transpose_rhs); | ||
std::shared_ptr<ngraph::Node> clip(const ngraph::Output<ngraph::Node>& data, | ||
float m_clip) const; | ||
std::shared_ptr<ngraph::Node> applyActivation(const std::shared_ptr<ngraph::Node>& arg, | ||
int activationFn) const; | ||
std::shared_ptr<ngraph::Node> LayerNorm(const ngraph::Output<ngraph::Node>& input, | ||
const std::shared_ptr<ngraph::Node>& normalizedweights, | ||
const std::shared_ptr<ngraph::Node>& bias); | ||
|
||
bool isValidInputTensor(uint32_t inputIndex); | ||
}; | ||
|
||
} // namespace nnhal | ||
} // namespace neuralnetworks | ||
} // namespace hardware | ||
} // namespace android |
Oops, something went wrong.