Skip to content

Conversation

@AlexeySachkov
Copy link
Contributor

@AlexeySachkov AlexeySachkov commented Oct 4, 2024

This is a first patch in series of detaching unit-test classes from UR names.

In a previous attempts to do so (#14815) there were concerns about what to do with UrArray and this PR is another attempt (see also #15014) to do that.

This PR renames UrArray into LifetimeExtender to better communicate its purpose: data structures emitted by the compiler (and therefore used by the runtime) to describe device image and their properties do not store data, but only hold pointers to them. Therefore when we mock those in our unit-tests we need to ensure that their lifetime is long enough to cover the whole test.

This is a non-functional change by its spirit, but what used to be UrArray is now hidden from writers of unit-tests and the interface is switched to std::vector - that is done to hide an implementation detail and simplify amount of knowledge required to write unit-tests.

This is a first patch in series of detaching unit-test classes from UR
names.

In a previous attempts to do so (intel#14815) there were concerns about what
to do with `UrArray` and this PR is another attempt (see also intel#15014) to
do so.

This PR renames `UrArray` into `LifetimeExtender` to better communicate
its purpose: data structures emitted by the compiler (and therefore used
by the runtime) to describe device image and their properties to not
store data, but only hold pointers to them. Therefore when we mock those
in our unit-tests we need to ensure that their lifetime is long enough
to cover the whole test.

This is a non-functional change by its spirit, but what used to be
`UrArray` is now hidden from writers of unit-tests and the interface is
switched to `std::vector` - that is done to hide an implementaiton
detail and simplify amount of knowledge required to write unit-tests.
@AlexeySachkov AlexeySachkov marked this pull request as ready for review October 7, 2024 07:17
@AlexeySachkov AlexeySachkov requested a review from a team as a code owner October 7, 2024 07:17
@AlexeySachkov AlexeySachkov requested a review from againull October 7, 2024 07:17
@AlexeySachkov AlexeySachkov merged commit 91eaa05 into intel:sycl Oct 7, 2024
13 checks passed
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.

2 participants