[ROCm][CI] Fix nixl tests (#45219)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Andreas Karatzas
2026-06-23 13:11:40 -05:00
committed by GitHub
parent 6691f087a6
commit ceae5bcbda
8 changed files with 210 additions and 15 deletions
@@ -1951,6 +1951,8 @@ class NixlBaseConnectorWorker:
for block_ids in block_ids_for_heterogeneous_attn_post_process:
self.post_process_device_kv_on_receive_heterogeneous_attn(block_ids)
self._sync_device_after_mamba_recv(done_recving, failed_recv_reqs)
# Handle timeout to avoid stranding blocks on remote.
now = time.perf_counter()
while self._reqs_to_send:
@@ -1972,6 +1974,22 @@ class NixlBaseConnectorWorker:
return done_sending, done_recving
def _sync_device_after_mamba_recv(
self,
done_recving: set[str],
failed_recv_reqs: set[str],
) -> None:
"""Synchronize ROCm direct-GPU Mamba receives before model execution."""
if (
not current_platform.is_rocm()
or not self._has_mamba
or self.use_host_buffer
or not (done_recving - failed_recv_reqs)
):
return
torch.accelerator.synchronize()
def _get_new_notifs(self) -> set[str]:
"""Get req_ids which got a remote xfer notification.
@@ -58,9 +58,12 @@ class ModelArchConfigConvertorBase:
if qk_rope_head_dim and qk_nope_head_dim:
return qk_rope_head_dim + qk_nope_head_dim
# NOTE: Some configs may set head_dim=None in the config
if getattr(self.hf_text_config, "head_dim", None) is not None:
return self.hf_text_config.head_dim
# NOTE: Some config classes may set head_dim=None or materialize a missing
# head_dim as 0 (for example, DeepseekVLV2TextConfig).
if (
head_dim := getattr(self.hf_text_config, "head_dim", None)
) is not None and head_dim > 0:
return head_dim
# NOTE: Some models (such as PLaMo2.1) use `hidden_size_per_head`
if getattr(self.hf_text_config, "hidden_size_per_head", None) is not None: