Skip to content
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

Event wait test #2040

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Event wait test #2040

wants to merge 2 commits into from

Conversation

igchor
Copy link
Member

@igchor igchor commented Aug 30, 2024

No description provided.

@github-actions github-actions bot added ci/cd Continuous integration/devliery common Changes or additions to common utilities conformance Conformance test suite issues. level-zero L0 adapter specific issues labels Aug 30, 2024
Copy link
Contributor

@pbalcer pbalcer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is hard to review :D I don't know what's part of this PR and what's of the other two.

@igchor igchor force-pushed the event_wait_test branch 2 times, most recently from 041f510 to 349d5a5 Compare September 9, 2024 19:39
@igchor igchor marked this pull request as ready for review September 9, 2024 19:42
@igchor igchor requested a review from a team as a code owner September 9, 2024 19:42
@igchor
Copy link
Member Author

igchor commented Sep 10, 2024

this is hard to review :D I don't know what's part of this PR and what's of the other two.

Rebased.

// are completed
urQueueFinish(queues.back());
if (waitOnEvent) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the 'background check' function waits for its threads to finish, this is guaranteed to have been completed already. Was that intentional? That'd be odd for an event wait test :)

@@ -265,14 +316,15 @@ TEST_F(urEnqueueKernelLaunchIncrementMultiDeviceTest, Success) {
constexpr size_t global_offset = 0;
constexpr size_t n_dimensions = 1;

std::vector<uur::raii::Event> Events(devices.size() * 2);
std::vector<uur::raii::Event> Events(devices.size() * 2 - 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be fragile and difficult to modify. I get what you are trying to do, but I suggest we try avoiding too match pointer arithmetic.
Can you just create two vectors?

Events[i * 2].get(),
UR_EVENT_INFO_COMMAND_EXECUTION_STATUS,
sizeof(ur_event_status_t), &status, nullptr));
} while (status != UR_EVENT_STATUS_COMPLETE);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe sleep for a few miliseconds every iteration?

@@ -189,7 +213,7 @@ TEST_P(urEnqueueKernelLaunchIncrementTest, Success) {

auto useEvents = std::get<1>(GetParam()).value;

std::vector<uur::raii::Event> Events(numOps * 2);
std::vector<uur::raii::Event> Events(numOps * 2 - 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Continuous integration/devliery common Changes or additions to common utilities conformance Conformance test suite issues. level-zero L0 adapter specific issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants