Skip to content

[SYCL] Use unsigned int limit for -fsycl-id-queries-fit-in-int#21656

Draft
againull wants to merge 1 commit intointel:syclfrom
againull:fit_in_int
Draft

[SYCL] Use unsigned int limit for -fsycl-id-queries-fit-in-int#21656
againull wants to merge 1 commit intointel:syclfrom
againull:fit_in_int

Conversation

@againull
Copy link
Copy Markdown
Contributor

Change the fit-in-int optimization to use UINT_MAX instead of INT_MAX as the limit for SYCL ID queries. This allows the full unsigned range for work-item IDs, which are non-negative.

I.e. this optimization is based on the assumption that values will fit in i32, but since these values are unsigned there is no reason to check for signed integer limits.

Change the fit-in-int optimization to use UINT_MAX instead of
INT_MAX as the limit for SYCL ID queries. This allows the full
unsigned range for work-item IDs, which are non-negative.

I.e. this optimization is based on the assumption that values will
fit in i32, but since these values are unsigned there is no reason
to check for signed integer limits.
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.

1 participant