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

Make accessor test cases templated on non-type arguments #753

Conversation

steffenlarsen
Copy link
Contributor

Currently the tests for accessors iterate through all combinations of valid arguments each time they try to run a specific section for a specific combination. Though the irrelevant combinations for a given section run no checks or do any significant work, they still introduce an overhead that accumulates, causing it to increase drastically when any of the argument spaces increase, e.g. as the type arguments do in full-conformance mode.

To decrease the overhead, this commit changes the accessor tests to use "templated" test cases which each get a combination of arguments and will not check for their relevant sections under other combinations. This should not affect the coverage of the tests, but should decrease the width of the search each section run has to do.

Note that this only currently templates the test cases on access mode, dimensions, and targets. Including the types in this to further focus testing runs is left for future work.

Currently the tests for accessors iterate through all combinations of
valid arguments each time they try to run a specific section for a
specific combination. Though the irrelevant combinations for a given
section run no checks or do any significant work, they still introduce
an overhead that accumulates, causing it to increase drastically when
any of the argument spaces increase, e.g. as the type arguments do in
full-conformance mode.

To decrease the overhead, this commit changes the accessor tests to
use "templated" test cases which each get a combination of arguments
and will not check for their relevant sections under other combinations.
This should not affect the coverage of the tests, but should decrease
the width of the search each section run has to do.

Note that this only currently templates the test cases on access mode,
dimensions, and targets. Including the types in this to further focus
testing runs is left for future work.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen requested a review from a team as a code owner July 19, 2023 14:09
Copy link
Member

@keryell keryell left a comment

Choose a reason for hiding this comment

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

This is massive.
Mostly, I trust you. :-)

tests/accessor/accessor_common.h Outdated Show resolved Hide resolved
tests/accessor/generic_accessor_api_common.h Outdated Show resolved Hide resolved
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@bader bader merged commit d6c817c into KhronosGroup:SYCL-2020 Jul 25, 2023
8 checks passed
steffenlarsen added a commit to steffenlarsen/SYCL-CTS that referenced this pull request Jul 27, 2023
This commit follows the recent templating style for test combinations
introduced on accessors in
KhronosGroup#753 to also reduce the
overhead for section-lookup in group_scan tests.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
steffenlarsen added a commit to steffenlarsen/SYCL-CTS that referenced this pull request Jul 31, 2023
This commit follows the recent templating style for test combinations
introduced on accessors in
KhronosGroup#753 to also reduce the
overhead for section-lookup in group_scan tests.

Additionally this unifies the two type_coverage.h files to reduce the
maintenance burden of the replicated implementations in them.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
steffenlarsen added a commit to steffenlarsen/SYCL-CTS that referenced this pull request Jul 31, 2023
This commit follows the recent templating style for test combinations
introduced on accessors in
KhronosGroup#753 to also reduce the
overhead for section-lookup in group_scan tests.

Additionally this unifies the two type_coverage.h files to reduce the
maintenance burden of the replicated implementations in them.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
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