Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
tilelang
Commits
151d9e6b
Unverified
Commit
151d9e6b
authored
Oct 22, 2025
by
Lei Wang
Committed by
GitHub
Oct 22, 2025
Browse files
[Refactor] Optimize debug message for parallel inference (#1096)
parent
514bdeaa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
src/layout/utils.cc
src/layout/utils.cc
+3
-1
src/op/parallel.cc
src/op/parallel.cc
+15
-2
No files found.
src/layout/utils.cc
View file @
151d9e6b
...
@@ -93,7 +93,9 @@ Array<IterSplitExpr> get_unused_iters(const IterMark &mark,
...
@@ -93,7 +93,9 @@ Array<IterSplitExpr> get_unused_iters(const IterMark &mark,
if
(
j
==
splits
.
size
())
{
if
(
j
==
splits
.
size
())
{
ICHECK
(
lowest
!=
splits
.
size
());
ICHECK
(
lowest
!=
splits
.
size
());
ICHECK
(
CanProveDivisible
(
splits
[
lowest
]
->
lower_factor
,
ICHECK
(
CanProveDivisible
(
splits
[
lowest
]
->
lower_factor
,
expected_lower_factor
));
expected_lower_factor
))
<<
" Cannot prove divisible for "
<<
splits
[
lowest
]
->
lower_factor
<<
" and "
<<
expected_lower_factor
;
results
.
emplace_back
(
results
.
emplace_back
(
mark
,
expected_lower_factor
,
mark
,
expected_lower_factor
,
FloorDiv
(
splits
[
lowest
]
->
lower_factor
,
expected_lower_factor
),
1
);
FloorDiv
(
splits
[
lowest
]
->
lower_factor
,
expected_lower_factor
),
1
);
...
...
src/op/parallel.cc
View file @
151d9e6b
...
@@ -373,8 +373,21 @@ LayoutMap ParallelOpNode::InferLayout(const LayoutInferArgs &T,
...
@@ -373,8 +373,21 @@ LayoutMap ParallelOpNode::InferLayout(const LayoutInferArgs &T,
throw
LayoutConflictException
(
oss
.
str
());
throw
LayoutConflictException
(
oss
.
str
());
}
}
});
});
result
=
Fragment
(
loop_vars_
,
{},
loop_var_to_thread
,
rep_iter
)
->
BindThreadRange
(
T
.
thread_bounds
);
try
{
result
=
Fragment
(
loop_vars_
,
{},
loop_var_to_thread
,
rep_iter
)
->
BindThreadRange
(
T
.
thread_bounds
);
}
catch
(
const
tvm
::
runtime
::
Error
&
err
)
{
std
::
ostringstream
msg
;
msg
<<
"Layout inference for buffer `"
<<
buffer
->
name
<<
"` failed inside `T.parallel` loop."
;
msg
<<
"
\n
Underlying TVM error: "
<<
err
.
what
();
msg
<<
"
\n
Problematic loop AST:
\n
"
<<
root_
;
msg
<<
"
\n
Hint: ensure the loop extent divides the thread binding or "
"adjust the fragment mapping."
;
LOG
(
FATAL
)
<<
msg
.
str
();
}
}
}
DLOG
(
INFO
)
<<
"[compute_loop_layout_from_buffer] ... and get "
DLOG
(
INFO
)
<<
"[compute_loop_layout_from_buffer] ... and get "
<<
result
->
DebugOutput
()
<<
'\n'
;
<<
result
->
DebugOutput
()
<<
'\n'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment