Skip to content

Fix: incorrect deletion of queued kernels#543

Open
annali07 wants to merge 1 commit intoaccel-sim:devfrom
annali07:fix-issue-542
Open

Fix: incorrect deletion of queued kernels#543
annali07 wants to merge 1 commit intoaccel-sim:devfrom
annali07:fix-issue-542

Conversation

@annali07
Copy link

Issue #542

Copy link
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

Fixes Issue #542 where queued (not-yet-launched) kernels could be incorrectly deleted when the backend transitions to inactive/idle while concurrent-kernel mode is enabled.

Changes:

  • Gate the “backend inactive” cleanup path behind !concurrent_kernel_sm in simulation_loop().
  • Apply the same gating in cleanup() to avoid deleting queued kernels during concurrent execution.
Comments suppressed due to low confidence (2)

gpu-simulator/accel-sim.cc:74

  • There are double spaces in the new condition (concurrent_kernel_sm && ...). This looks unintentional and is inconsistent with surrounding formatting; please reduce to a single space to match the file’s style.
    if (finished_kernel_uid || m_gpgpu_sim->cycle_insn_cta_max_hit() ||
        (!concurrent_kernel_sm  && !m_gpgpu_sim->active())) {
      cleanup(finished_kernel_uid);

gpu-simulator/accel-sim.cc:130

  • Line has trailing whitespace after the ||, and the condition also contains double spaces (concurrent_kernel_sm && ...). Please remove trailing whitespace and normalize spacing; this can trip formatters/linters and reduces diff noise.
    if (k->get_uid() == finished_kernel ||
        m_gpgpu_sim->cycle_insn_cta_max_hit() || 
        (!concurrent_kernel_sm  && !m_gpgpu_sim->active())) {
      for (unsigned int l = 0; l < busy_streams.size(); l++) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants