[L0v2] add multiple submission modes in queue gtests #20969
Draft
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.
A few solutions and a few questions.
Modifications allow for running tests with different queue submission modes, either specified by the user or provided by default. This is made possible through the introduced macros:
UUR_INSTANTIATE_DEVICE_TEST_SUITE_MULTI_QUEUE(FIXTURE): instantiates the providedFIXTUREwith the submission modes:UR_QUEUE_FLAG_SUBMISSION_BATCHEDandUR_QUEUE_FLAG_SUBMISSION_IMMEDIATEUUR_MULTI_QUEUE_TYPE_TEST_SUITE_WITH_PARAM(FIXTURE, VALUES, PRINTER): similarly instantiates theFIXTUREwith either batched or immediate submission modes, but additionally accepts parametersUUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES(FIXTURE, MODES): instantiates the providedFIXTUREwith queue submission modes provided by the user (work in progress)UUR_DEVICE_TEST_SUITE_WITH_DEFAULT_QUEUE(FIXTURE): provides only one default submission mode (specified as 0); the exact mode is chosen by the deviceTests that do not use any queue (like most of the urProgramTests, except for urProgramSetSpecializationConstantsTest) are instantiated using
UUR_DEVICE_TEST_SUITE_WITH_DEFAULT_QUEUE. There might be more tests that do not need a queue, since the heuristic for determining whether the given test needs a queue consisted of checking whether the queue defined in the test class is mentioned in the test file (not checked per derived test class).This PR introduces equivalents for
urQueueTestfor unparametrized tests andurQueueTestWithParam, which areurMultiQueueTypeTestandurMultiQueueTypeTestWithParam, respectively. Parametrized tests use a new parameter type:MultiQueueParam (std::tuple<T, ur_queue_flag_t>). Similarly, the previously "unparametrized" tests, which were eventually parametrized with theDeviceTuple, now usestd::tuple<DeviceTuple, ur_queue_flag_t>as their parameter type.The PR is partitioned into several commits to enable comparison between versions.
Questions:
SKIP_IF_BATCHEDmacro instead?urCommandBufferCommandExpTestseems to be referenced nowhere, is it needed?