Skip to content

Commit

Permalink
[dredd] apply suggestions
Browse files Browse the repository at this point in the history
change rule shape to be enclosed in brackets
change type to uint32_t
seperate inference test list

ONE-DCO-1.0-Signed-off-by: JuYoung Lee [email protected]
  • Loading branch information
icodo98 committed Sep 25, 2024
1 parent 98cd197 commit 9242803
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions compiler/circle-inspect/src/Dump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,16 +260,16 @@ void DumpTensorShape::run(std::ostream &os, const circle::Model *model,
{
const auto tensor = tensors->Get(i);
auto shape = tensor->shape_signature() ? tensor->shape_signature() : tensor->shape();
os << reader.tensor_name(tensor) << " ";
for (int8_t i = 0; i < shape->size(); i++)
os << reader.tensor_name(tensor) << " [";
for (uint32_t i = 0; i < shape->size(); i++)
{
os << shape->Get(i);
if (i != shape->size() - 1)
{
os << ",";
}
}
os << std::endl;
os << "]" << std::endl;
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion compiler/circle2circle-dredd-recipe-test/test.lst
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ Add(PadV2_001 PASS substitute_padv2_to_pad)
Add(Softmax_001 PASS decompose_softmax)
Add(Softmax_002 PASS decompose_softmax)
Add(StridedSlice_003 PASS substitute_strided_slice_to_reshape)
Add(Inf_Pad_000 PASS)

# CSE test

Expand Down Expand Up @@ -142,3 +141,6 @@ Add(REGRESS_ONNX_Conv_BN_Relu6_001 PASS

Add(REGRESS_ONNX_Mul_Mul_000 PASS
convert_nchw_to_nhwc)

# SHAPE INFERENCE test
Add(Inf_Pad_000 PASS)
4 changes: 2 additions & 2 deletions res/TensorFlowLiteRecipes/Inf_Pad_000/test.rule
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# To check if dynamic dimension properly infered
# To check if dynamic dimension properly inferred

RULE "VERIFY_FILE_FORMAT" $(verify_file_format) '=' 1

RULE "PAD_EXIST" $(op_count PAD) '=' 1
RULE "PAD_SHAPE" $(tensor_shape ofm) '=' 1,-1,7,2
RULE "PAD_SHAPE" $(tensor_shape ofm) '=' [1,-1,7,2]

0 comments on commit 9242803

Please sign in to comment.