diff options
Diffstat (limited to 'nn/runtime/test')
-rw-r--r-- | nn/runtime/test/TestValidateOperations.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/nn/runtime/test/TestValidateOperations.cpp b/nn/runtime/test/TestValidateOperations.cpp index 4ac4f8d7d..01e4338d7 100644 --- a/nn/runtime/test/TestValidateOperations.cpp +++ b/nn/runtime/test/TestValidateOperations.cpp @@ -107,13 +107,17 @@ struct OperandTypeWithExtraParams { } } - if (channelQuant.has_value() && channelQuant->scales) { - return that.channelQuant->scales && - std::equal(channelQuant->scales, channelQuant->scales + channelQuant->scaleCount, - that.channelQuant->scales); - } else { - return that.channelQuant->scales != nullptr; + if (channelQuant.has_value()) { + if (channelQuant->scales) { + return that.channelQuant->scales && + std::equal(channelQuant->scales, + channelQuant->scales + channelQuant->scaleCount, + that.channelQuant->scales); + } else { + return that.channelQuant->scales == nullptr; + } } + return true; } bool operator!=(const OperandTypeWithExtraParams& that) const { return !(*this == that); } |