Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MISC] Refine no available block debug msg #14287

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions vllm/distributed/device_communicators/shm_broadcast.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,14 @@ def acquire_write(self, timeout: Optional[float] = None):
# if we wait for a long time, log a message
if (time.monotonic() - start_time
> VLLM_RINGBUFFER_WARNING_INTERVAL * n_warning):
logger.debug("No available block found in %s second. ",
VLLM_RINGBUFFER_WARNING_INTERVAL)
block_status_info = (
f"The block has been read by {read_count}"
f" out of {self.buffer.n_reader} readers.")
logger.debug(
"No available block found in %s second. %s",
VLLM_RINGBUFFER_WARNING_INTERVAL,
block_status_info,
)
n_warning += 1

# if we time out, raise an exception
Expand Down Expand Up @@ -414,8 +420,22 @@ def acquire_read(self, timeout: Optional[float] = None):
# if we wait for a long time, log a message
if (time.monotonic() - start_time
> VLLM_RINGBUFFER_WARNING_INTERVAL * n_warning):
logger.debug("No available block found in %s second. ",
VLLM_RINGBUFFER_WARNING_INTERVAL)
if not written_flag:
block_status_info = (
"This block has not been written yet.")
else:
block_status_info = (
"This block has already been read by "
f"reader {self.local_reader_rank}.")
block_status_info = (f"{block_status_info} "
f"written_flag: {written_flag}, "
f"read_flag: {read_flag}.")

logger.debug(
"No available block found in %s second. %s",
VLLM_RINGBUFFER_WARNING_INTERVAL,
block_status_info,
)
n_warning += 1

# if we time out, raise an exception
Expand Down