summaryrefslogtreecommitdiff
path: root/nn/runtime/test/fuzzing
diff options
context:
space:
mode:
authorXusong Wang <xusongw@google.com>2020-03-17 16:35:28 -0700
committerXusong Wang <xusongw@google.com>2020-03-18 14:57:21 -0700
commit039b11ee572b3e85ce879bdce6859161747ac09b (patch)
tree01854c8b494724663be3b9336fe4ed9ce36c7b78 /nn/runtime/test/fuzzing
parenta52c7f4aadc88ed25547f8869dcde4e934e0d5eb (diff)
downloadml-039b11ee572b3e85ce879bdce6859161747ac09b.tar.gz
Enable RGG to generate a roi tensor of lifetime SUBGRAPH_INPUT.
Fixes: 132322232 Test: NNT_static_fuzzing Change-Id: I30e89ce40dcaea351828b4964a12fc4bdc5b553e
Diffstat (limited to 'nn/runtime/test/fuzzing')
-rw-r--r--nn/runtime/test/fuzzing/operation_signatures/BoundingBox.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/nn/runtime/test/fuzzing/operation_signatures/BoundingBox.cpp b/nn/runtime/test/fuzzing/operation_signatures/BoundingBox.cpp
index 6c776416f..b4177fffb 100644
--- a/nn/runtime/test/fuzzing/operation_signatures/BoundingBox.cpp
+++ b/nn/runtime/test/fuzzing/operation_signatures/BoundingBox.cpp
@@ -32,8 +32,7 @@ static void roiTensorConstructor(TestOperandType dataType, uint32_t, RandomOpera
}
}
-// TODO: Have a version that makes roi tensor an input.
-static const OperandSignature kInputRoiTensor = {.type = RandomOperandType::CONST,
+static const OperandSignature kInputRoiTensor = {.type = RandomOperandType::INPUT,
.constructor = roiTensorConstructor};
static const OperandSignature kOutputRoiTensor = {.type = RandomOperandType::OUTPUT,
.constructor = roiTensorConstructor};
@@ -64,6 +63,10 @@ static void roiConstructor(TestOperandType, uint32_t rank, RandomOperation* op)
if (op->opType == TestOperationType::ROI_POOLING) {
setSameQuantization(op->outputs[0], op->inputs[0]);
}
+
+ // The values of the RoI tensor has a special format and cannot be generated from another
+ // operation.
+ op->inputs[1]->doNotConnect = true;
}
template <typename T>