Skip to content

Conversation

@EuphoricThinking
Copy link
Contributor

@EuphoricThinking EuphoricThinking commented Dec 28, 2025

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 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 (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 device

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 PR 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.

The PR is partitioned into several commits to enable comparison between versions.

Questions:

  • For features unsupported in batched queues, batched submission mode is omitted in instantiation. Is it better to use previously introduced SKIP_IF_BATCHED macro instead?
  • urCommandBufferCommandExpTest seems to be referenced nowhere, is it needed?

@EuphoricThinking EuphoricThinking requested review from a team as code owners December 28, 2025 16:02
@EuphoricThinking EuphoricThinking force-pushed the batch_TEST4_gtest_pr1 branch 3 times, most recently from e193914 to 8a4d851 Compare December 29, 2025 16:01
@EuphoricThinking EuphoricThinking changed the title add multiple submission modes in queue gtests [L0v2] add multiple submission modes in queue gtests Dec 30, 2025
@EuphoricThinking EuphoricThinking marked this pull request as draft December 30, 2025 03:12
add a macro for a default submission mode when the test
does not use any queue
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.

1 participant