From 2f2deb778fd436317102b8025bf96b3d58f2a2f9 Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Mon, 12 Dec 2022 14:46:03 -0800 Subject: [PATCH] [Fix] Task scheduler error prompt upon build/run failure --- src/meta_schedule/task_scheduler/task_scheduler.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/meta_schedule/task_scheduler/task_scheduler.cc b/src/meta_schedule/task_scheduler/task_scheduler.cc index 69a70f63c5c0..9d859947e4fe 100644 --- a/src/meta_schedule/task_scheduler/task_scheduler.cc +++ b/src/meta_schedule/task_scheduler/task_scheduler.cc @@ -120,7 +120,9 @@ void TaskCleanUp(TaskRecordNode* self, int task_id, const Array& r std::string err = error_msg.value(); TVM_PY_LOG(INFO, logger) << std::fixed << std::setprecision(4) // << "[Task #" << task_id << ": " << name << "] Trial #" << trials - << ": Error in building:\n" + << ": Error in " + << (builder_result->error_msg.defined() ? "building" : "running") + << ":\n" << err << "\n" << tir::AsTVMScript(sch->mod()) << "\n" << Concat(sch->trace().value()->AsPython(false), "\n");