-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-enable diagnostic error/warning printing #3020
Re-enable diagnostic error/warning printing #3020
Conversation
… also prevented printing Signed-off-by: Alexandre Eichenberger <[email protected]>
@@ -743,7 +743,7 @@ class LoopOpRewriteMaxTripCountPattern : public OpRewritePattern<ONNXLoopOp> { | |||
bool isDefinedByIntegerConstantOp(Value v) const { | |||
if (mlir::isa<BlockArgument>(v)) | |||
return false; | |||
Operation *definingOp = v.getDefiningOp(); | |||
// Operation *definingOp = v.getDefiningOp(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was unused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you remove it completely?
Note we get a warning now when emitting LLVM because some of our functions have an non-MLIR approved / recognized attribute. The warning is
I verified that it is in the function
Since its probably ok, I currently disable the diagnostic reporting in the LLVM lowering unless the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -743,7 +743,7 @@ class LoopOpRewriteMaxTripCountPattern : public OpRewritePattern<ONNXLoopOp> { | |||
bool isDefinedByIntegerConstantOp(Value v) const { | |||
if (mlir::isa<BlockArgument>(v)) | |||
return false; | |||
Operation *definingOp = v.getDefiningOp(); | |||
// Operation *definingOp = v.getDefiningOp(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you remove it completely?
Signed-off-by: Alexandre Eichenberger <[email protected]>
Jenkins Linux s390x Build #16051 [push] Re-enable diagnostic err... started at 12:15 |
Jenkins Linux ppc64le Build #15078 [push] Re-enable diagnostic err... started at 12:31 |
Jenkins Linux amd64 Build #16049 [push] Re-enable diagnostic err... started at 11:15 |
Jenkins Linux amd64 Build #16049 [push] Re-enable diagnostic err... aborted after 1 hr 19 min |
Jenkins Linux s390x Build #16051 [push] Re-enable diagnostic err... aborted after 1 hr 19 min |
Jenkins Linux ppc64le Build #15078 [push] Re-enable diagnostic err... aborted after 1 hr 19 min |
In the past,
emitError(...)
printed messages to stderr, but now we have to install a diagnostic error handler. So I added the necessary code, as otherwise we do not get error messages anymore.Also, in onnx-mlir diagnostics, we issued an assert when a range was badly formed (
max<min
), but since that can be the reason for anemitError
to begin with, it also prevented an error message to be printed. So now the range can be badly formed, we can test for it, and just adding an extra error/warning message.