mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
Only fuse when output count of add is 1
This commit is contained in:
parent
5ecabe1b15
commit
1a5a25331d
1 changed files with 4 additions and 2 deletions
|
|
@ -25,7 +25,8 @@ static bool IsSupportedDataType(const Node& node) {
|
|||
|
||||
static bool CheckFirstAdd(Node& add, ProviderType providertype) {
|
||||
if (providertype != add.GetExecutionProviderType() ||
|
||||
!IsSupportedDataType(add)) {
|
||||
!IsSupportedDataType(add) ||
|
||||
add.GetOutputEdgesCount() != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -58,7 +59,8 @@ static bool CheckFirstAdd(Node& add, ProviderType providertype) {
|
|||
// The 2nd input should be a 1D constant value
|
||||
static bool CheckSecondAdd(Node& add, ProviderType providertype) {
|
||||
if (providertype != add.GetExecutionProviderType() ||
|
||||
!IsSupportedDataType(add)) {
|
||||
!IsSupportedDataType(add) ||
|
||||
add.GetOutputEdgesCount() != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue