"docs/source/vscode:/vscode.git/clone" did not exist on "9d50f7eec1ed9bf3581210efe05a57229733c3fb"
Commit 192a3995 authored by Yu Cheng's avatar Yu Cheng Committed by LeiWang1999
Browse files

[Enhancement] Report Error Body in ParallelOp Layout Inference (#394)

Added detailed error messages in the InferLayout method to provide better context when layout conflicts occur. This includes the body of the operation that triggered the error, aiding in debugging and layout validation.
parent 44243542
...@@ -243,6 +243,8 @@ LayoutMap ParallelOp::InferLayout(const LayoutInferArgs &T, InferLevel level) { ...@@ -243,6 +243,8 @@ LayoutMap ParallelOp::InferLayout(const LayoutInferArgs &T, InferLevel level) {
if (src_layout && dst_layout) { if (src_layout && dst_layout) {
ICHECK(src_layout->IsEqual(dst_layout, true)) ICHECK(src_layout->IsEqual(dst_layout, true))
<< "Layout may conflict with ParallelOp for buffer " << buffer << "Layout may conflict with ParallelOp for buffer " << buffer
<< "\nError body begin:\n"
<< GetRoot()->body << "\nError body end"
<< "\nLHS = " << src_layout->DebugOutput() << "\nLHS = " << src_layout->DebugOutput()
<< "\nRHS = " << dst_layout->DebugOutput() << "\nRHS = " << dst_layout->DebugOutput()
<< "\nYou may need to use a shared memory to transform the " << "\nYou may need to use a shared memory to transform the "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment