-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Refactor diagnostic to avoid circular dependencies #6692
Conversation
include/tvm/ir/diagnostic_context.h
Outdated
/*! \brief A compiler diagnostic message. */ | ||
class DiagnosticNode : public Object { | ||
public: | ||
/*! \brief The level. */ |
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.
We should improve this comment.
In this particular case, ICHECK perhaps should not end up in ir/diagnostic, but instead in |
include/tvm/support/diagnostic.h
Outdated
|
||
namespace tvm { | ||
|
||
extern const char* kTVM_INTERNAL_ERROR_MESSAGE; |
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.
Merge this file content with tvm/support/logging.h as previous content are already there
kNote = 40, | ||
kHelp = 50, | ||
}; | ||
|
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.
diagnostic context should not be part of support, because right now it brings large amount of dep related to IR. keep it as in include/tvm/ir/diagnostic.h
Thanks @rkimball . I feel the PR can still be simplified further to avoid potential confusion of two diagnostic header files(one minimum and another built for IR). In particular we can do:
|
include/tvm/ir/diagnostic_context.h
Outdated
@@ -18,71 +18,25 @@ | |||
*/ | |||
|
|||
/*! | |||
* \file diagnostic.h | |||
* \file diagnostic_context.h |
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.
now that we have removed diagnostic.h I think it is better to just rename back to diagnostic.h for simplicity
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.
Looks good to me, thanks!
There were circular dependencies in object.h which made use of ICHECK in Object problematic.