Skip to content
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

Missing tests for work-item functions with out-of-range arguments #2005

Open
bashbaug opened this issue Jul 8, 2024 · 0 comments · May be fixed by #2099
Open

Missing tests for work-item functions with out-of-range arguments #2005

bashbaug opened this issue Jul 8, 2024 · 0 comments · May be fixed by #2099
Labels
mobica-backlog Issue approved by WG for Mobica to work on

Comments

@bashbaug
Copy link
Contributor

bashbaug commented Jul 8, 2024

The OpenCL C work-item functions have defined results for all values of their dimidx argument, even those that are out-of-range. For example, for get_global_size:

Valid values of dimindx are 0 to get_work_dim() - 1. For other values of dimindx, get_global_size() returns 1.

This behavior is not tested by the CTS, though, and all tested values are in-bounds.

We should test:

  • All relevant work-item functions: get_global_size, get_global_id, get_local_size, get_enqueued_local_size, get_local_id, get_num_groups, get_group_id, get_global_offset.
  • Cases when the out-of-range value is known at compile time, and when the out-of-range value is dynamic and is not known to be out-of-range until runtime.
  • Cases with 1D, 2D, and 3D ND-ranges, since this will change when a dimidx is out-of-range.

Mesa has some piglit tests we could use for inspiration, see for example:
https://gitlab.freedesktop.org/mesa/piglit/-/blob/main/tests/cl/program/execute/global-offset.cl

See also: KhronosGroup/SPIRV-LLVM-Translator#2638

@bashbaug bashbaug added the mobica-triage Issue proposed for addition to Mobica's backlog (needs WG approval) label Jul 8, 2024
@neiltrevett neiltrevett added the mobica-backlog Issue approved by WG for Mobica to work on label Aug 27, 2024
@bashbaug bashbaug removed the mobica-triage Issue proposed for addition to Mobica's backlog (needs WG approval) label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobica-backlog Issue approved by WG for Mobica to work on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants