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

Reorganised urEventGetProfilingInfo test into separate tests instead of a switch #2626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martygrant
Copy link
Contributor

For #2290

Also done a housekeeping pass across all urXGetInfo tests, renaming and adding consts where appropriate, and adding extra checks to tests with vectors.

@github-actions github-actions bot added the conformance Conformance test suite issues. label Jan 27, 2025
@martygrant martygrant force-pushed the martin/getinfo-property-rename branch 4 times, most recently from b7a32e5 to fb30178 Compare January 30, 2025 09:09
@martygrant martygrant marked this pull request as ready for review January 30, 2025 09:09
@martygrant martygrant requested a review from a team as a code owner January 30, 2025 09:09
ASSERT_SUCCESS(urKernelGetInfo(kernel, property_name, property_size,
property_value.data(), nullptr));

ASSERT_EQ(property_size, property_value.size());
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: Isn't this just testing that the standard library's std::vector class works rather than UR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so my intention was to test that the entry point populates pPropValue and that its size matches the size retrieved from the first call

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you expecting the std::vector's size to be changed by the call to urKernelGetInfo()? If so that's never going to happen, only the data owned by the std::vector will change not the container itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

discussed this offline and cleared up my misunderstanding around testing for this, will update the PR with a better check

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed these size checks and added a helper function uur::stringPropertyIsValid to validate char[] returns

…of a switch and rework various urXGetInfo tests:

- Housekeeping pass to tidy up tests, renaming and adding consts where appropriate
- Added ASSERT_INFO_CALL and uur::stringPropertyIsValid helpers from oneapi-src#2597
- Used above helpers across all tests to better validate numerical and char[] queries, and reworked some char[] queries
- Removed any non useful checks on vector sizes after passing them into a urXGetInfo query
@martygrant martygrant force-pushed the martin/getinfo-property-rename branch from fb30178 to f2be414 Compare January 31, 2025 17:44
@martygrant
Copy link
Contributor Author

I've added some more changes to this PR, tidying up some more char[] return query tests, and added in a helper macro ASSERT_GET_INFO to validate numerical queries. Could use a re-review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conformance Conformance test suite issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants