diff --git a/include/tvm/relay/error.h b/include/tvm/relay/error.h index 892d0349581c3..4bfd153cca49c 100644 --- a/include/tvm/relay/error.h +++ b/include/tvm/relay/error.h @@ -10,16 +10,16 @@ #include #include #include "./base.h" +#include "./expr.h" +#include "./module.h" namespace tvm { namespace relay { #define RELAY_ERROR(msg) (RelayErrorStream() << msg) -// Forward declaration for error reporting. +// Forward declaratio for RelayErrorStream. struct Error; -class GlobalVar; -struct Module; /*! \brief A wrapper around std::stringstream. * @@ -40,7 +40,7 @@ struct RelayErrorStream { return ss.str(); } - [[noreturn]] void Raise() const; + void Raise() const; }; struct Error : public dmlc::Error { @@ -50,18 +50,6 @@ struct Error : public dmlc::Error { Error(const RelayErrorStream& msg) : dmlc::Error(msg.str()), sp() {} // NOLINT(*) }; -struct InternalError : public Error { - explicit InternalError(const std::string &msg) : Error(msg) {} -}; - -struct FatalTypeError : public Error { - explicit FatalTypeError(const std::string &s) : Error(s) {} -}; - -struct TypecheckerError : public Error { - explicit TypecheckerError(const std::string &msg) : Error(msg) {} -}; - /*! \brief An abstraction around how errors are stored and reported. * Designed to be opaque to users, so we can support a robust and simpler * error reporting mode, as well as a more complex mode. diff --git a/include/tvm/relay/pass.h b/include/tvm/relay/pass.h index 566d69cc6b0b8..641e14bae82ab 100644 --- a/include/tvm/relay/pass.h +++ b/include/tvm/relay/pass.h @@ -6,8 +6,8 @@ #ifndef TVM_RELAY_PASS_H_ #define TVM_RELAY_PASS_H_ -#include #include +#include #include #include