Skip to content

Conversation

iassiour
Copy link
Contributor

… SetQueueStatus

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@Copilot Copilot AI review requested due to automatic review settings October 17, 2025 08:37
@iassiour iassiour requested a review from a team as a code owner October 17, 2025 08:37
Copy link
Contributor

@Copilot 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

This PR addresses data races in the GetSubmissionBatch, CaptureAndSet, and SetQueueStatus functions by moving initialization logic and adding thread synchronization. The changes focus on resolving race conditions by relocating the execInfoOffset_ assignment and parameter descriptor modifications to thread-safe locations, and protecting access to the submission batch with a lock.

Key Changes

  • Moved execInfoOffset_ initialization from captureAndSet() to the copy constructor to avoid race conditions
  • Removed parameter descriptor modifications (rawPointer_ and defined_ flags) from captureAndSet() and moved defined_ flag initialization to InitParameters()
  • Added thread synchronization to GetSubmissionBatch() and changed isActive_ to atomic type

Reviewed Changes

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

File Description
projects/clr/rocclr/platform/kernel.hpp Adds execInfoOffset_ initialization in copy constructor
projects/clr/rocclr/platform/kernel.cpp Removes state-modifying operations from captureAndSet() method
projects/clr/rocclr/platform/commandqueue.hpp Adds lock protection to GetSubmissionBatch() and makes isActive_ atomic
projects/clr/rocclr/device/devkernel.cpp Moves defined_ flag initialization to InitParameters()

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant