vllm.distributed.device_communicators.flashinfer_all_reduce ¶
Classes:
Functions:
-
get_fi_ar_quant_workspace–Return the allreduce workspace for quant patterns, initializing if needed.
-
get_fi_ar_workspace–Return the allreduce workspace for non-quant patterns, initializing if needed.
FlashInferAllReduce ¶
Source code in vllm/distributed/device_communicators/flashinfer_all_reduce.py
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | |
_ensure_workspace(hidden_dim, dtype) ¶
Ensure the all reduce workspace is initialized.
Source code in vllm/distributed/device_communicators/flashinfer_all_reduce.py
_create_workspace(backend, world_size, rank, max_token_num, hidden_dim, dtype, group) ¶
Create a flashinfer allreduce workspace, returning None on failure.
Source code in vllm/distributed/device_communicators/flashinfer_all_reduce.py
_resolve_fi_ar_backend() ¶
Resolve the flashinfer allreduce backend for the current setup.
Returns:
-
str–A
(backend, allow_trtllm_fallback)tuple.allow_trtllm_fallback -
bool–is True only when
autoselects mnnvl for a single node, so that -
tuple[str, bool]–workspace creation can fall back to trtllm on single-node topologies
-
tuple[str, bool]–without NVSwitch multicast support (where mnnvl is unavailable).
Source code in vllm/distributed/device_communicators/flashinfer_all_reduce.py
get_fi_ar_quant_workspace(world_size, rank, max_token_num, hidden_dim, dtype, group) ¶
Return the allreduce workspace for quant patterns, initializing if needed.
Backend is controlled by VLLM_FLASHINFER_ALLREDUCE_BACKEND env var, matching non-quant fusion. With auto this prefers mnnvl and falls back to trtllm only on single-node topologies where mnnvl multicast is unavailable.
Source code in vllm/distributed/device_communicators/flashinfer_all_reduce.py
get_fi_ar_workspace(world_size, rank, max_token_num, hidden_dim, dtype, group) ¶
Return the allreduce workspace for non-quant patterns, initializing if needed.
Used by AllReduceFusionPass (non-quant patterns) and FlashInferAllReduce for standalone allreduce. Backend is controlled by VLLM_FLASHINFER_ALLREDUCE_BACKEND env var.