junrushao1994 commented on code in PR #11157:
URL: https://github.com/apache/tvm/pull/11157#discussion_r861402889
##########
src/meta_schedule/utils.h:
##########
@@ -53,7 +53,49 @@
#include "../tir/schedule/primitive.h"
#include "../tir/schedule/utils.h"
+#define TVM_PY_LOG(logging_level, logging_func) \
+ PyLogMessage(__FILE__, __LINE__, logging_func,
PyLogMessage::Level::logging_level).stream()
namespace tvm {
+
+/*!
+ * \brief Class to accumulate an log message on the python side. Do not use
directly, instead use
+ * TVM_PY_LOG(INFO), TVM_PY_LOG(WARNING), TVM_PY_ERROR(INFO).
+ */
+class PyLogMessage {
Review Comment:
Move this class into tvm::meta_schedule
##########
src/meta_schedule/utils.h:
##########
@@ -53,7 +53,49 @@
#include "../tir/schedule/primitive.h"
#include "../tir/schedule/utils.h"
+#define TVM_PY_LOG(logging_level, logging_func) \
+ PyLogMessage(__FILE__, __LINE__, logging_func,
PyLogMessage::Level::logging_level).stream()
Review Comment:
```suggestion
::tvm::meta_schedule::PyLogMessage(__FILE__, __LINE__, logging_func,
PyLogMessage::Level::logging_level).stream()
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]