Skip to content

Added floating point types support for work_group_scan_inclusive tests#2529

Merged
neiltrevett merged 4 commits into
KhronosGroup:mainfrom
shajder:add_work_group_scan_inc_fp
Jun 2, 2026
Merged

Added floating point types support for work_group_scan_inclusive tests#2529
neiltrevett merged 4 commits into
KhronosGroup:mainfrom
shajder:add_work_group_scan_inc_fp

Conversation

@shajder
Copy link
Copy Markdown
Contributor

@shajder shajder commented Sep 19, 2025

Related to #1364

-adapted from KhronosGroup#2525 due to code review
@bashbaug
Copy link
Copy Markdown
Contributor

Related to #2533.

Copy link
Copy Markdown
Collaborator

@rjodinchr rjodinchr left a comment

Choose a reason for hiding this comment

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

I think that PR could be refactored a bit to avoid too much code duplication

@shajder
Copy link
Copy Markdown
Contributor Author

shajder commented Jun 1, 2026

I think that PR could be refactored a bit to avoid too much code duplication

@rjodinchr thanks for the feedback. Please note the comment from the parent issue, duplication issues were resolved in #1401. That being said, I can confirm there is room for unification, however I would prefer to add a separate PR once all related branches are merged. How does that sound to you?

@rjodinchr
Copy link
Copy Markdown
Collaborator

I think that PR could be refactored a bit to avoid too much code duplication

@rjodinchr thanks for the feedback. Please note the comment from the parent issue, duplication issues were resolved in #1401. That being said, I can confirm there is room for unification, however I would prefer to add a separate PR once all related branches are merged. How does that sound to you?

I think the fp16/fp64 sections that are duplicated 3 times (for Min/Max/Add), should be refactored in a single function (with a template maybe). I don't see a reason to wait for that.

@shajder
Copy link
Copy Markdown
Contributor Author

shajder commented Jun 1, 2026

I think the fp16/fp64 sections that are duplicated 3 times (for Min/Max/Add), should be refactored in a single function (with a template maybe). I don't see a reason to wait for that.

As far as I understand you refer to the code which was the subject of a request in #2525; please see that thread for the context and how it was resolved.

Copy link
Copy Markdown
Collaborator

@rjodinchr rjodinchr left a comment

Choose a reason for hiding this comment

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

I refer to the 3 comments "duplicated" added below.

Those sections look the same with different templates for Min/Max/Add. I don't see why we should duplicate that code 3 times here while we could just have it in one place.

This is independent of previous/future PR, if I'm not mistaken.

Comment thread test_conformance/workgroups/test_wg_scan_reduce.cpp
Comment thread test_conformance/workgroups/test_wg_scan_reduce.cpp Outdated
Comment thread test_conformance/workgroups/test_wg_scan_reduce.cpp Outdated
@shajder
Copy link
Copy Markdown
Contributor Author

shajder commented Jun 1, 2026

This is independent of previous/future PR, if I'm not mistaken.

corrected

Copy link
Copy Markdown
Collaborator

@rjodinchr rjodinchr left a comment

Choose a reason for hiding this comment

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

Thank you for the change.
LGTM.

I think in a future PR we could also refactor inclusive and reduce, right? they are also the same and could also be part of the same function if we add another template argument to it?

@shajder
Copy link
Copy Markdown
Contributor Author

shajder commented Jun 1, 2026

Thank you for the change. LGTM.

I think in a future PR we could also refactor inclusive and reduce, right? they are also the same and could also be part of the same function if we add another template argument to it?

Okay

@neiltrevett neiltrevett merged commit 9991013 into KhronosGroup:main Jun 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants