Skip to content

[SYCL][NFC] Move NDRDescT to include/sycl/detail/cg_types.hpp #19665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Jul 31, 2025

So that we can include NDRDescT in the headers, without causing circular dependency.

@uditagarwal97 uditagarwal97 self-assigned this Jul 31, 2025
@uditagarwal97 uditagarwal97 requested a review from a team as a code owner July 31, 2025 16:18
@aelovikov-intel aelovikov-intel marked this pull request as draft July 31, 2025 16:26

// TODO: A lot of tests rely on particular values to be set for dimensions that
// are not used. To clarify, for example, if a 2D kernel is invoked, in
// NDRDescT, the value of index 2 in GlobalSize must be set to either 1 or 0
Copy link
Contributor

@cperkinsintel cperkinsintel Aug 4, 2025

Choose a reason for hiding this comment

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

I really dislike this aspect of the NDRDesc. It has THREE different applications:

  • sometimes we template it to Dims
  • sometimes Dim is 3, but 0 is used in the higher "unused" dimensions
  • othertimes Dim is 3, and 1 is used in the higher "unused" dimensions.

IIRC, when we are hoisting it to the device it is not templated and we use that third convention. That way the sizes are correct, as multiplying by 1 doesn't change anything.

We should probably remove that second convention, the one that uses 0. That just leads to bugs. And, maybe we should reevaluate the usage of this end to end and drop the template over Dims. In one form or other, the NDRDesc is used by the FE, by SYCL and by the device.

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.

2 participants