Skip to content

Add program handle lock test#21857

Merged
KornevNikita merged 1 commit into
intel:syclfrom
kweronsx:add-program-handle-mt-tests
Apr 30, 2026
Merged

Add program handle lock test#21857
KornevNikita merged 1 commit into
intel:syclfrom
kweronsx:add-program-handle-mt-tests

Conversation

@kweronsx
Copy link
Copy Markdown
Contributor

@kweronsx kweronsx commented Apr 23, 2026

Add MT tests for usage of Program handle: https://jira.devtools.intel.com/browse/URLZA-410

@kweronsx kweronsx force-pushed the add-program-handle-mt-tests branch 2 times, most recently from 03615f5 to 76619d5 Compare April 24, 2026 10:23
@kweronsx kweronsx requested a review from Copilot April 27, 2026 06:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new SYCL thread-safety unit test to validate that program handles used for device_global (device-image-scope) enqueue operations are safely read/propagated across concurrent queue::copy calls during a build race.

Changes:

  • Introduces a new DeviceGlobalProgramHandle.cpp unit test that forces a concurrent build (urProgramBuildExp) and validates all threads observe the same non-null ur_program_handle_t in urEnqueueDeviceGlobalVariableWrite.
  • Updates the thread_safety unit test CMake target to compile the new test.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp New thread-safety test that blocks program build to create contention and captures UR program handles passed to device-global write enqueues.
sycl/unittests/thread_safety/CMakeLists.txt Adds the new test source to the ThreadSafetyTests target.

Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp Outdated
Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp Outdated
Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp
Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp Outdated
Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp
@kweronsx kweronsx force-pushed the add-program-handle-mt-tests branch from d5a7650 to ad8113b Compare April 27, 2026 11:41
@kweronsx kweronsx requested a review from Copilot April 27, 2026 11:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp
Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp
Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp
Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp
Comment thread sycl/unittests/thread_safety/DeviceGlobalProgramHandle.cpp
@kweronsx kweronsx force-pushed the add-program-handle-mt-tests branch from ad8113b to b8e744c Compare April 27, 2026 12:43
@kweronsx kweronsx marked this pull request as ready for review April 27, 2026 12:51
@kweronsx kweronsx requested a review from a team as a code owner April 27, 2026 12:51
@kweronsx kweronsx requested a review from cperkinsintel April 27, 2026 12:51
@github-actions
Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

@KornevNikita
Copy link
Copy Markdown
Contributor

@kweronsx new lines at the end are missing, could you please check

@kweronsx kweronsx force-pushed the add-program-handle-mt-tests branch from b8e744c to 0678a3c Compare April 29, 2026 10:37
@kweronsx
Copy link
Copy Markdown
Contributor Author

@intel/llvm-gatekeepers please consider merging

@KornevNikita KornevNikita merged commit 1ae0fe6 into intel:sycl Apr 30, 2026
211 of 223 checks passed
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.

4 participants