zxybazh opened a new pull request, #11157:
URL: https://github.com/apache/tvm/pull/11157
This PR introduces a new interface to unify meta schedule logging from both
c++ and python side. It will be easier to control logging level and format
content. From now on, only task scheduler level will be printed to screen by
default, and task level information will be logged to a file in given folder.
We still support any logging configuration from outside, and use
`tvm.meta_schedule` as the main logger.
Recomended setup of logger is as follows:
```
logging.basicConfig(
format="%(asctime)s.%(msecs)03d %(levelname)s %(message)s",
datefmt="%Y-%m-%d %H:%M:%S"
)
logging.getLogger("tvm.meta_schedule").setLevel(logging.INFO)
```
And further configuration of child loggers can be set in the `TuneConfig`
for features like whether to stream to screen, whether to propagate to main
logger, patterns, etc, by passing a Dict to `TuneConfig` as follows:
```
TuneConfig(
...,
logger_config = {
"task_stream": False,
"propagate": False,
"task_level": logging.INFO,
"formatter": ...
}
)
```
Default setting is to output to files in `log_dir` folder and the logging
structure looks like the following directory:
```
tvm.meta_schedule.task_00_fused_nn_conv2d_add.log
tvm.meta_schedule.task_01_fused_nn_conv2d_add_1.log
tvm.meta_schedule.task_02_fused_nn_conv2d_add_2.log
tvm.meta_schedule.task_03_fused_layout_transform.log
tvm.meta_schedule.task_04_fused_nn_conv2d_add_nn_relu.log
tvm.meta_schedule.task_05_fused_nn_max_pool2d.log
tvm.meta_schedule.task_06_fused_nn_conv2d_add_nn_relu_1.log
tvm.meta_schedule.task_07_fused_nn_conv2d_add_add_nn_relu.log
tvm.meta_schedule.task_08_fused_nn_conv2d_add_nn_relu_2.log
tvm.meta_schedule.task_09_fused_nn_contrib_conv2d_winograd_without_weight_transform_add_nn_relu.log
tvm.meta_schedule.task_10_fused_nn_contrib_conv2d_winograd_without_weight_transform_add_add_nn_relu.log
tvm.meta_schedule.task_11_fused_nn_conv2d_add_nn_relu_3.log
tvm.meta_schedule.task_12_fused_nn_contrib_conv2d_winograd_without_weight_transform_add_nn_relu_1.log
tvm.meta_schedule.task_13_fused_nn_contrib_conv2d_winograd_without_weight_transform_add_add_nn_relu_1.log
tvm.meta_schedule.task_14_fused_nn_conv2d_add_nn_relu_4.log
tvm.meta_schedule.task_15_fused_nn_conv2d_add_nn_relu_5.log
tvm.meta_schedule.task_16_fused_nn_conv2d_add_add_nn_relu_1.log
tvm.meta_schedule.task_17_fused_nn_adaptive_avg_pool2d.log
tvm.meta_schedule.task_18_fused_layout_transform_reshape_squeeze.log
tvm.meta_schedule.task_19_fused_nn_dense_add.log
tvm.meta_schedule.task_scheduler.log
```
Suggestions are welcome!
--
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]