[SYCL][NFCI] Refactor unittest::UrArray
#15604
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
intoLifetimeExtender
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 tostd::vector
- that is done to hide an implementation detail and simplify amount of knowledge required to write unit-tests.