Repository navigation
[ROCm][CI] Fix NIXL spec-decode acceptance startup and diagnostics #41313
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
Changes from all commits
0a5fb5c
f4ebbd0
09b399a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # SPDX-FileCopyrightText: Copyright contributors to the vLLM project | ||
| """Probe a NIXL side-channel socket for handshake metadata readiness.""" | ||
|
|
||
| import argparse | ||
| import ipaddress | ||
|
|
||
| import msgspec | ||
| import zmq | ||
|
|
||
| GET_META_MSG = b"get_meta_msg" | ||
|
|
||
|
|
||
| def parse_args() -> argparse.Namespace: | ||
| parser = argparse.ArgumentParser() | ||
| parser.add_argument("--host", required=True) | ||
| parser.add_argument("--port", required=True, type=int) | ||
| parser.add_argument("--rank", default=0, type=int) | ||
| parser.add_argument("--timeout-ms", default=1000, type=int) | ||
| return parser.parse_args() | ||
|
|
||
|
|
||
| def make_zmq_path(host: str, port: int) -> str: | ||
| try: | ||
| if isinstance(ipaddress.ip_address(host), ipaddress.IPv6Address): | ||
| return f"tcp://[{host}]:{port}" | ||
| except ValueError: | ||
| pass | ||
| return f"tcp://{host}:{port}" | ||
|
|
||
|
|
||
| def main() -> None: | ||
| args = parse_args() | ||
| ctx = zmq.Context() | ||
| sock = ctx.socket(zmq.REQ) | ||
| sock.setsockopt(zmq.LINGER, 0) | ||
| sock.setsockopt(zmq.RCVTIMEO, args.timeout_ms) | ||
| try: | ||
| sock.connect(make_zmq_path(args.host, args.port)) | ||
| sock.send(msgspec.msgpack.encode((GET_META_MSG, args.rank))) | ||
| sock.recv() | ||
| finally: | ||
| sock.close() | ||
| ctx.term() | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -411,7 +411,10 @@ def __init__( | |
|
|
||
| self.kv_cache_layout = get_kv_cache_layout() | ||
| self.host_buffer_kv_cache_layout = self.kv_cache_layout | ||
| logger.info("Detected attention backend %s", self.backend_name) | ||
| logger.info( | ||
| "Detected attention backend(s) %s", | ||
| [backend.get_name() for backend in self.attn_backends], | ||
| ) | ||
| logger.info("Detected kv cache layout %s", self.kv_cache_layout) | ||
|
|
||
| # lazy initialized in register_kv_caches | ||
|
|
@@ -866,9 +869,21 @@ def register_kv_caches(self, kv_caches: dict[str, torch.Tensor]): | |
| else: | ||
| self.block_len_per_layer.append(physical_page_size) | ||
|
|
||
| assert cache.shape[0] == num_blocks, ( | ||
| "All kv cache tensors must have the same number of blocks" | ||
| ) | ||
| if cache.shape[0] != num_blocks: | ||
| raise AssertionError( | ||
| "All kv cache tensors must have the same number of " | ||
| f"blocks; layer={layer_name}, " | ||
| f"expected_num_blocks={num_blocks}, " | ||
| f"cache_shape={tuple(cache.shape)}, " | ||
| f"cache_stride={tuple(cache.stride())}, " | ||
| f"layer_spec={type(layer_spec).__name__}, " | ||
| f"backend={self.backend_name}, " | ||
| "all_backends=" | ||
| f"{[backend.get_name() for backend in self.attn_backends]}, " | ||
| f"kv_cache_layout={self.kv_cache_layout}, " | ||
| "blocks_first=" | ||
| f"{self.transfer_topo.is_kv_layout_blocks_first}" | ||
| ) | ||
|
Comment on lines
+873
to
+886
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While improving diagnostics is beneficial, raising a generic |
||
|
|
||
| if not self.use_mla: | ||
| # Different kv cache shape is not supported by HeteroTP. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
curlcommand useshttp://${SERVER_HOST}:${port}${endpoint}. IfSERVER_HOSTis ever overridden with an IPv6 address (e.g.,::1), this URL will be malformed forcurlbecause IPv6 addresses must be enclosed in square brackets. While the current default is127.0.0.1, it is safer to handle potential IPv6 overrides to ensure robustness in different CI environments.