From f703cd825bcaec8e7bcb3dfa011619fca36a0508 Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Tue, 13 Dec 2022 02:05:01 -0500 Subject: [PATCH] [Fix] Task scheduler error prompt upon build/run failure (#13601) --- 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");