Skip to content

Commit

Permalink
enrich symbolic ut
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyShuai committed Oct 10, 2023
1 parent 5a9665f commit ab1526c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file modified onnxruntime/test/testdata/custom_op_library/attr_tester.onnx
Binary file not shown.
8 changes: 6 additions & 2 deletions onnxruntime/test/testdata/custom_op_library/cpu/cpu_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,12 @@ Ort::Status AttrTesterIntFloatShapeInfer(Ort::ShapeInferContext& ctx) {
CUSTOM_ENFORCE(ctx.GetAttrInts("ints") == ints, "ints attr mismatch");
std::vector<float> floats{6, 7, 8};
CUSTOM_ENFORCE(ctx.GetAttrFloats("floats") == floats, "floats attr mismatch");
Ort::ShapeInferContext::Shape shape5 = {{5}};
ctx.SetOutputShape(0, shape5);
auto input_shape = ctx.GetInputShape(0);
CUSTOM_ENFORCE(input_shape.size() == 1 &&
!input_shape[0].IsInt() &&
std::string{input_shape[0].AsSym()} == "d",

Check warning on line 253 in onnxruntime/test/testdata/custom_op_library/cpu/cpu_ops.cc

View workflow job for this annotation

GitHub Actions / cpplint

[cpplint] onnxruntime/test/testdata/custom_op_library/cpu/cpu_ops.cc#L253

Missing space before { [whitespace/braces] [5]
Raw output
onnxruntime/test/testdata/custom_op_library/cpu/cpu_ops.cc:253:  Missing space before {  [whitespace/braces] [5]
"input dim is not symbolic");
ctx.SetOutputShape(0, input_shape);
return Ort::Status{nullptr};
}

Expand Down

0 comments on commit ab1526c

Please sign in to comment.