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
7d389a43
Unverified
Commit
7d389a43
authored
Oct 28, 2025
by
Lei Wang
Committed by
GitHub
Oct 28, 2025
Browse files
[Bugfix] Correctly construct the argument list for atomic add based on the vector size (#1137)
* atomic_fix * atomic_fix
parent
853f9c3d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/transform/atomicadd_vectorize.cc
src/transform/atomicadd_vectorize.cc
+8
-4
No files found.
src/transform/atomicadd_vectorize.cc
View file @
7d389a43
...
...
@@ -231,21 +231,25 @@ private:
// Ref: src/tl_templates/cuda/atomic.h::AtomicAdd
const
IntImm
memory_order
=
node
->
args
.
size
()
>=
3
?
Downcast
<
IntImm
>
(
node
->
args
[
2
])
:
IntImm
(
0
);
Array
<
PrimExpr
>
new_args
;
Call
address_of_dst
=
Call
(
DataType
::
Handle
(),
builtin
::
address_of
(),
{
dst_node
});
Call
address_of_value
=
Call
(
DataType
::
Handle
(),
builtin
::
address_of
(),
{
value_node
});
Array
<
PrimExpr
>
new_args
;
if
(
vector_size_
==
4
)
{
new_args
.
push_back
(
StringImm
(
"AtomicAddx4"
));
new_args
.
push_back
(
address_of_dst
);
new_args
.
push_back
(
address_of_value
);
}
else
if
(
vector_size_
==
2
)
{
new_args
.
push_back
(
StringImm
(
"AtomicAddx2"
));
new_args
.
push_back
(
address_of_dst
);
new_args
.
push_back
(
address_of_value
);
}
else
{
new_args
.
push_back
(
StringImm
(
"AtomicAdd"
));
new_args
.
push_back
(
dst_node
);
new_args
.
push_back
(
value_node
);
}
new_args
.
push_back
(
address_of_dst
);
new_args
.
push_back
(
address_of_value
);
new_args
.
push_back
(
memory_order
);
Call
new_call
=
...
...
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