Skip to content

[UR] Extend memory-migrate tests#21901

Draft
kweronsx wants to merge 1 commit intointel:syclfrom
kweronsx:add-memory-migrate-tests
Draft

[UR] Extend memory-migrate tests#21901
kweronsx wants to merge 1 commit intointel:syclfrom
kweronsx:add-memory-migrate-tests

Conversation

@kweronsx
Copy link
Copy Markdown
Contributor

Resume work on #20165

@kweronsx kweronsx force-pushed the add-memory-migrate-tests branch 2 times, most recently from 25edc08 to 9d64ec3 Compare April 30, 2026 11:17
@kweronsx kweronsx marked this pull request as ready for review May 5, 2026 07:14
@kweronsx kweronsx requested a review from a team as a code owner May 5, 2026 07:14
@kweronsx kweronsx requested a review from pbalcer May 5, 2026 07:24
@bratpiorka bratpiorka requested a review from PatKamin May 5, 2026 08:45
@kweronsx kweronsx marked this pull request as draft May 6, 2026 09:10
@kweronsx kweronsx force-pushed the add-memory-migrate-tests branch from 9d64ec3 to 773a0e7 Compare May 7, 2026 07:18
@kweronsx kweronsx marked this pull request as ready for review May 7, 2026 07:19
@kweronsx kweronsx marked this pull request as draft May 7, 2026 07:19
ur_event_handle_t last_event = write_event;
for (auto i = 0u; i < iterations_per_thread; ++i) {
ur_event_handle_t kernel_event;
ASSERT_SUCCESS(urEnqueueKernelLaunchWithArgsExp(
Copy link
Copy Markdown
Contributor

@kswiecicki kswiecicki May 7, 2026

Choose a reason for hiding this comment

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

There's a race here, 8 threads are submitting the same kernel on the same buffer, each incrementing the buffer by 1. The kernels are properly ordered only in regards to a single thread.
You could keep track of an event from the last submitted kernel and use it as dependency when submitting the next kernel. Since multiple threads would be accessing it, you probably need a lock.

@kweronsx kweronsx force-pushed the add-memory-migrate-tests branch from 773a0e7 to e9166f1 Compare May 7, 2026 12:08
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.

3 participants