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

[test][Dynamic Selection] Refactor tests to account for offsets #1620

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AnuyaWelling2801
Copy link
Contributor

Realized that the fixed resource tests for both sycl and inline backends did not account for offsets.
Fixed it by creating two new files in test/support for tests with and without offsets

@SergeyKopienko
Copy link
Contributor

Looks like we have a lot of duplicated code in the files

  • test/support/test_dynamic_selection_offset_utils.h
  • test/support/test_dynamic_selection_utils.h

And one significant diff between them that I found is:

  • my_policy_t p{u}; <-> my_policy_t p(u, offset);
  • auto test_resource = f(i); <-> auto test_resource = f(i, offset);
  • may by something else...

But I believe we have a lot of patterns to avoid this code duplications and to have only one copy of this code.

@AnuyaWelling2801 AnuyaWelling2801 added this to the 2022.7.0 milestone Jul 1, 2024
}


#endif /* _ONEDPL_TEST_DYNAMIC_SELECTION_UTILS_H */
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment doesn't correspond to file name.

@SergeyKopienko
Copy link
Contributor

SergeyKopienko commented Aug 2, 2024

@AnuyaWelling2801 Looks like we have some type which declared but never tested:

template <typename Policy>
using wait_t = typename policy_traits<Policy>::wait_type;

I mean wait_t type.

Could you please use this type in tests too?

May be instead of return typename oneapi::dpl::experimental::policy_traits<Policy>::wait_type{}; or somewhere else...

@danhoeflinger danhoeflinger changed the title [Dynamic Selection] Refactor tests to account for offsets [test][Dynamic Selection] Refactor tests to account for offsets Sep 4, 2024
@danhoeflinger danhoeflinger added the test Test only Change label Sep 11, 2024
@akukanov akukanov removed this from the 2022.7.0 milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Test only Change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants