Refactor diagnostic to avoid circular dependencies#6692
Conversation
| /*! \brief A compiler diagnostic message. */ | ||
| class DiagnosticNode : public Object { | ||
| public: | ||
| /*! \brief The level. */ |
There was a problem hiding this comment.
We should improve this comment.
|
In this particular case, ICHECK perhaps should not end up in ir/diagnostic, but instead in |
|
|
||
| namespace tvm { | ||
|
|
||
| extern const char* kTVM_INTERNAL_ERROR_MESSAGE; |
There was a problem hiding this comment.
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.
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:
|
|
|
||
| /*! | ||
| * \file diagnostic.h | ||
| * \file diagnostic_context.h |
There was a problem hiding this comment.
now that we have removed diagnostic.h I think it is better to just rename back to diagnostic.h for simplicity
There were circular dependencies in object.h which made use of ICHECK in Object problematic.