diff --git a/src/dialect/onnx/onnx_ops.cpp b/src/dialect/onnx/onnx_ops.cpp index 3606fdd..e2e60c3 100644 --- a/src/dialect/onnx/onnx_ops.cpp +++ b/src/dialect/onnx/onnx_ops.cpp @@ -328,8 +328,8 @@ void ONNXMatMulOp::inferShapes() { !getOperand(1).getType().isa()) return; - auto lhsTy = getOperand(0)->getType().cast(); - auto rhsTy = getOperand(1)->getType().cast(); + auto lhsTy = getOperand(0).getType().cast(); + auto rhsTy = getOperand(1).getType().cast(); SmallVector dims; auto lhsShape = lhsTy.getShape(); @@ -413,7 +413,7 @@ void ONNXMatMulOp::inferShapes() { dims.emplace_back(rhsShape[1]); } - getResult()->setType(RankedTensorType::get(dims, lhsTy.getElementType())); + getResult().setType(RankedTensorType::get(dims, lhsTy.getElementType())); } //===----------------------------------------------------------------------===//