Fix: incorrect deletion of queued kernels#543
Open
annali07 wants to merge 1 commit intoaccel-sim:devfrom
Open
Conversation
Contributor
There was a problem hiding this comment.
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_sminsimulation_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #542