Skip to content

Commit ac97f19

Browse files
authored
Merge pull request #455 from Xilinx/jrickert.error_in_shape_inference
Do not emit error in shape inference if this error only means that the shape could not be computed.
2 parents a4c081c + 7c83832 commit ac97f19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Dialect/ONNX/ONNXOps/Tensor/Resize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bool isAbsent(Value input) {
4747
LogicalResult ONNXResizeOpShapeHelper::computeShape() {
4848
ONNXResizeOpAdaptor operandAdaptor(operands, cast<ONNXResizeOp>(op));
4949
if (operandAdaptor.getAxes().has_value())
50-
return op->emitOpError("axes are unsupported");
50+
return failure();
5151
const auto x = operandAdaptor.getX();
5252
if (!hasShapeAndRank(x)) {
5353
return failure();

src/Dialect/ONNX/ONNXOps/Tensor/Slice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ LogicalResult ONNXSliceOpShapeHelper::computeShape() {
4343
createIE->getIntFromArrayAsSymbols(axes, axesSymbol);
4444
for (IndexExpr val : axesSymbol) {
4545
if (!val.isLiteral())
46-
return op->emitError("Axes must be known at compile time");
46+
return success();
4747
int64_t axis = val.getLiteral();
4848
if (axis < 0)
4949
axis += dataRank;

0 commit comments

Comments
 (0)