-
Notifications
You must be signed in to change notification settings - Fork 111
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
base: main
Are you sure you want to change the base?
Event wait test #2040
Conversation
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.
this is hard to review :D I don't know what's part of this PR and what's of the other two.
test/conformance/enqueue/urEnqueueKernelLaunchAndMemcpyInOrder.cpp
Outdated
Show resolved
Hide resolved
041f510
to
349d5a5
Compare
Rebased. |
349d5a5
to
ab537af
Compare
// are completed | ||
urQueueFinish(queues.back()); | ||
if (waitOnEvent) { |
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.
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); |
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.
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); |
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.
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); |
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.
ditto
No description provided.