summaryrefslogtreecommitdiff
path: root/nn/runtime/test/fuzzing
diff options
context:
space:
mode:
authorXusong Wang <xusongw@google.com>2020-03-16 11:31:07 -0700
committerXusong Wang <xusongw@google.com>2020-03-16 11:40:25 -0700
commit16a62c6a0ad7ff124c449ecee07d04f2aae636be (patch)
tree8eb723a01cd4194af94385cc8f9284e08adcb1ac /nn/runtime/test/fuzzing
parent87741faed0bfbf2ff5c754380f3b29c885749799 (diff)
downloadml-16a62c6a0ad7ff124c449ecee07d04f2aae636be.tar.gz
Validate the first dimension of DEPTHWISE_CONV_2D filter.
- Added a check during the prepare step. - Added validation tests. - Fixed RGG generating invalid DEPTHWISE_CONV_2D operations. Fixes: 137859080 Test: NNT_static Test: NNT_static_fuzzing Change-Id: I96bd581f4e94d6dd45d43c658213a0ba4d7bc63b
Diffstat (limited to 'nn/runtime/test/fuzzing')
-rw-r--r--nn/runtime/test/fuzzing/operation_signatures/Convolutions.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/nn/runtime/test/fuzzing/operation_signatures/Convolutions.cpp b/nn/runtime/test/fuzzing/operation_signatures/Convolutions.cpp
index d8ab4e4ba..2aaeb308e 100644
--- a/nn/runtime/test/fuzzing/operation_signatures/Convolutions.cpp
+++ b/nn/runtime/test/fuzzing/operation_signatures/Convolutions.cpp
@@ -345,8 +345,7 @@ static void depthwiseConv2DImplicitConstructor(TestOperandType, uint32_t rank, T
// Filter, [1, height_flt, width_flt, channel_out]
RandomVariable channelOut =
op->inputs[6]->value<RandomVariable>() * op->inputs[0]->dimensions[channelIndex];
- op->inputs[1]->dimensions = {RandomVariableType::FREE, RandomVariableType::FREE,
- RandomVariableType::FREE, channelOut};
+ op->inputs[1]->dimensions = {1, RandomVariableType::FREE, RandomVariableType::FREE, channelOut};
// Bias, [channel_out]
op->inputs[2]->dimensions = {channelOut};