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
81b8c1b7
Unverified
Commit
81b8c1b7
authored
Dec 16, 2025
by
Kuris
Committed by
GitHub
Dec 16, 2025
Browse files
[Fix] Fix analyzer bind conflicting (#1446)
parent
869f021b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
97 additions
and
95 deletions
+97
-95
src/transform/layout_inference.cc
src/transform/layout_inference.cc
+97
-95
No files found.
src/transform/layout_inference.cc
View file @
81b8c1b7
...
@@ -1090,9 +1090,13 @@ private:
...
@@ -1090,9 +1090,13 @@ private:
reducer_info
=
op
->
annotations
.
Get
(
attr
::
kReducerInfo
)
reducer_info
=
op
->
annotations
.
Get
(
attr
::
kReducerInfo
)
->
as
<
Map
<
Var
,
ReducerInfo
>>
()
->
as
<
Map
<
Var
,
ReducerInfo
>>
()
.
value
();
.
value
();
if
(
!
result_
.
for_map
.
count
(
tvm
::
ffi
::
GetRef
<
For
>
(
op
)))
{
return
IRMutatorWithAnalyzer
::
VisitStmt_
(
op
);
}
// the analyzer will be modified in PartitionLoop and VectorizeLoop
// we need to save its state to prevent conflicted bindings
auto
saved_analyzer
=
analyzer_
->
Clone
();
For
for_node
=
Downcast
<
For
>
(
IRMutatorWithAnalyzer
::
VisitStmt_
(
op
));
For
for_node
=
Downcast
<
For
>
(
IRMutatorWithAnalyzer
::
VisitStmt_
(
op
));
if
(
result_
.
for_map
.
count
(
tvm
::
ffi
::
GetRef
<
For
>
(
op
)))
{
auto
root
=
tvm
::
ffi
::
GetRef
<
For
>
(
op
);
auto
root
=
tvm
::
ffi
::
GetRef
<
For
>
(
op
);
// This check is a workaround to support T.Parallel for local buffers.
// This check is a workaround to support T.Parallel for local buffers.
// For example:
// For example:
...
@@ -1186,7 +1190,7 @@ private:
...
@@ -1186,7 +1190,7 @@ private:
});
});
if
((
has_non_local
||
has_cast_operations
)
&&
!
has_reducer
)
{
if
((
has_non_local
||
has_cast_operations
)
&&
!
has_reducer
)
{
for_node
=
VectorizeLoop
(
for_node
,
analyzer
_
);
for_node
=
VectorizeLoop
(
for_node
,
saved_
analyzer
.
get
()
);
}
}
if
(
result_
.
predicate_map
.
count
(
root
)
&&
parallel_loop
)
{
if
(
result_
.
predicate_map
.
count
(
root
)
&&
parallel_loop
)
{
...
@@ -1195,8 +1199,6 @@ private:
...
@@ -1195,8 +1199,6 @@ private:
return
for_node
;
return
for_node
;
}
}
}
}
return
for_node
;
}
Stmt
VisitStmt_
(
const
AttrStmtNode
*
op
)
final
{
Stmt
VisitStmt_
(
const
AttrStmtNode
*
op
)
final
{
if
(
op
->
attr_key
==
tir
::
attr
::
thread_extent
)
{
if
(
op
->
attr_key
==
tir
::
attr
::
thread_extent
)
{
...
...
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