flashinfer.comm._ulysses_lowp.quant_q_into_payload

flashinfer.comm._ulysses_lowp.quant_q_into_payload(q: Tensor, q_amax_final: Tensor, send_u8: Tensor, *, rank: int, world_size: int, enable_pdl: bool | None = None) → None

Quantize Q on the global grid directly into the V2-G payload.

Parameters:
  • q – BF16/FP16 CUDA Q shard of shape [B, L, H, D]; D is 64 or 128. The last dimension must be dense and every row 16-byte aligned.

  • q_amax_final – Contiguous FP32 [B, H, slots(L, 32)] Q maxima after the cross-rank boundary merge.

  • send_u8 – Contiguous CUDA uint8 destination-major buffer [world_size, chunk_bytes] from the matching payload specification.

  • rank – Sequence-shard rank in [0, world_size).

  • world_size – Ulysses group size, one of 2, 4, 6 or 8; 6 is supported structurally but has not been validated.

  • enable_pdl – Whether to enable Programmatic Dependent Launch. None selects according to device support.