Skip to content

Conversation

aelovikov-intel
Copy link
Contributor

reduAuxCGFunc has different output target between the case when number
of work groups is one or more, while the kernel executed is the same. As
such we were re-using the same kernel code trying to adjust its name so
that a single one isn't used two times (#WGs check is a run-time one).

We used accessors' types for that but that approach only worked for USM
case (ptr vs buffer accessor for the output type depending on #WGs). In
case when the original reduction variable used a buffer, both type were
the same resulting in a "definition with same mangled name" error. Use
something that has distinct types to name the kernel.

reduAuxCGFunc has different output target between the case when number
of work groups is one or more, while the kernel executed is the same. As
such we were re-using the same kernel code trying to adjust its name so
that a single one isn't used two times (#WGs check is a run-time one).

We used accessors' types for that but that approach only worked for USM
case (ptr vs buffer accessor for the output type depending on #WGs). In
case when the original reduction variable used a buffer, both type were
the same resulting in a "definition with same mangled name" error. Use
something that has distinct types to name the kernel.
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner August 31, 2022 17:19
aelovikov-intel added a commit to aelovikov-intel/llvm-test-suite that referenced this pull request Aug 31, 2022
Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@steffenlarsen steffenlarsen merged commit a0a4d72 into intel:sycl Sep 1, 2022
steffenlarsen pushed a commit to intel/llvm-test-suite that referenced this pull request Sep 2, 2022
@aelovikov-intel aelovikov-intel deleted the red-multi-name branch November 8, 2022 20:49
aelovikov-intel added a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants