-
Notifications
You must be signed in to change notification settings - Fork 809
[L0v2] add multiple submission modes in queue gtests #20969
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
Conversation
e193914 to
8a4d851
Compare
I would prefer the latter if its related to functionality we want to eventually support.
Let's just remove it. |
pbalcer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broadly lgtm
unified-runtime/test/conformance/testing/include/uur/fixtures.h
Outdated
Show resolved
Hide resolved
unified-runtime/test/conformance/enqueue/urEnqueueMemImageCopy.cpp
Outdated
Show resolved
Hide resolved
@pbalcer At this moment EnqueueTimestamp and USM alloc/free are omitted (at least as I remember). Do they qualify for |
Yes, we will definitely want to implement these features on the batch queue. |
641fd6e to
c62389c
Compare
f41c240 to
a5f8efa
Compare
a5f8efa to
eb392bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say - bump dates -2026 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you wish c;
6255673 to
989a76e
Compare
I would prefer to leave EnqueueTimestamp and USM alloc/free for the next PRs, which should implement the missing functionalities. |
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 provided FIXTURE with the submission modes:
UR_QUEUE_FLAG_SUBMISSION_BATCHED and UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE
- UUR_MULTI_QUEUE_TYPE_TEST_SUITE_WITH_PARAM(FIXTURE, VALUES,
PRINTER): similarly instantiates the FIXTURE with either batched or
immediate submission modes, but additionally accepts parameters
- UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES(FIXTURE, MODES):
instantiates the provided FIXTURE with queue submission modes
provided by the user
- UUR_DEVICE_TEST_SUITE_WITH_DEFAULT_QUEUE(FIXTURE): provides only
one default submission mode (specified as 0); the exact mode is chosen
by the device
- UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_PRINTER(FIXTURE, MODES,
PRINTER): similar to UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES, but
the user also provides the PRINTER function
- UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_AND_PARAM(FIXTURE, VALUES,
MODES, PRINTER): similar to UUR_MULTI_QUEUE_TYPE_TEST_SUITE_WITH_PARAM,
but the user also provides queue submission modes
At this moment, UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_AND_PARAM is
not used in any test. As a helper intended for parametrized tests,
this macro is complementary to UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES,
which enables the user to specify queue submission modes
for unparametrized tests. Example usage:
UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_AND_PARAM(
urEnqueueMemBufferFillTest,
testing::ValuesIn(test_cases),
testing::ValuesIn(UR_QUEUE_FLAG_SUBMISSION_BATCHED,
UR_QUEUE_FLAG_SUBMISSION_IMMEDIATE),
uur::printFillTestStringMultiQueueType<urEnqueueMemBufferFillTest>);
Tests 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 patch introduces equivalents for urQueueTest for unparametrized
tests and urQueueTestWithParam, which are urMultiQueueTypeTest and
urMultiQueueTypeTestWithParam, 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 the DeviceTuple, now use std::tuple<DeviceTuple,
ur_queue_flag_t> as their parameter type.
Additionally, urCommandBufferCommandExpTest is removed since it is not
referenced anywhere.
|
I see that this PR needs @intel/sycl-graphs-reviewers approval, could someone take a look at this please. The changes to |
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 userUUR_DEVICE_TEST_SUITE_WITH_DEFAULT_QUEUE(FIXTURE): provides only one default submission mode (specified as 0); the exact mode is chosen by the deviceUUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_PRINTER(FIXTURE, MODES, PRINTER): similar toUUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES, but the user also provides thePRINTERfunctionUUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_AND_PARAM(FIXTURE, VALUES, MODES, PRINTER): similar toUUR_MULTI_QUEUE_TYPE_TEST_SUITE_WITH_PARAM, but the user also provides queue submission modesAt this moment,
UUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES_AND_PARAMis not used in any test. As a helper intended for parametrized tests, this macro is complementary toUUR_DEVICE_TEST_SUITE_WITH_QUEUE_TYPES, which enables the user to specify queue submission modes for unparametrized tests. Example usage:Tests 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 patch 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.Additionally, urCommandBufferCommandExpTest is removed since it is not referenced anywhere.