Skip to content

Fix issue: cuda index incorrectly -1 when tp_size>1 - #496

Closed
ZX-ModelCloud wants to merge 1 commit into
sgl-project:mainfrom
ZX-ModelCloud:fix_cuda_index_error_when_tp_size
Closed

ZX-ModelCloud wants to merge 1 commit into
sgl-project:mainfrom
ZX-ModelCloud:fix_cuda_index_error_when_tp_size

Conversation

@ZX-ModelCloud

Copy link
Copy Markdown
Contributor

vllm now needs to call the init_distributed_environment method correctly so that _LOCAL_RANK will not be -1 when tp_size>1.

vllm source code: https://github.com/vllm-project/vllm/blob/main/vllm/distributed/parallel_state.py#L193

Someone has reproduced this issue: #487 (comment)

@ZX-ModelCloud ZX-ModelCloud mentioned this pull request Jun 3, 2024
2 tasks done
@Qubitium

Qubitium commented Jun 3, 2024

Copy link
Copy Markdown
Contributor

Tested with vllm 0.4.3. No issues.

@merrymercy merrymercy mentioned this pull request Jun 7, 2024
@merrymercy

Copy link
Copy Markdown
Collaborator

@Qubitium @ZhouXingg Thanks for the contributions. They are merged in #511.

@merrymercy merrymercy closed this Jun 7, 2024
efschu added a commit to efschu/htsglang that referenced this pull request Aug 3, 2026
efschu added a commit to efschu/htsglang that referenced this pull request Aug 3, 2026
…inst FEATURE_CATALOG.md

Adds docs/dev/AUDIT_500_mechanism_reach.md (239 catalog condition claims
checked against the code predicate that gates them: 39 WIDER, 63 NARROWER,
126 EXACT, 9 NOT-FOUND, 20 consolidated bug candidates in §5).

Corrects FEATURE_CATALOG.md §1 in place with file:line-cited predicates,
resolving real conflicts against the two intervening merges that also
touched §1 (sgl-project#492 attention/KV replication axis, sgl-project#496 merge-duty backlog):
- Uneven-DCP / Draft-KV-DCP bullet: replaced with the audit's precise
  predicates (dcp_size > 1 and get_tp_partition_ratios() is not None,
  distributed/utils.py:346; three entry paths; REPLICATED-KV geometry at
  utils.py:1048; MLA no-combine at dcp/comm.py:81) and the audit's S1-34
  NOT-FOUND finding that demotes "replicated is DEGRADED above TP>kv_heads"
  from a two-sided code rule to CLI-help prose only, surfacing the sgl-project#500-B3/
  sgl-project#108 open defect (--rank-kv-ratio route refused by the draft-KV-DCP gate).
  The sgl-project#492 "TWO DISTRIBUTION AXES" paragraph is kept unchanged immediately
  after it (additive, not contradicted by the audit).
- Matrix Doctrine (§2) joint-prefill paragraph: replaced the sgl-project#492
  correction's enumerator claim with the audit's more precise one
  (uneven_perf.py:4133-4148, placement.py:813, scheduler.py:5860, :6408,
  :5218) and folded the sgl-project#492 measured bracket/loose-ctx findings back in as
  "still the right empirical read on this rig, refined by sgl-project#500-B1" rather
  than dropping them.

Reconciles NOTE_485_joint_phase_vectors.md's sgl-project#492 in-place REFUTED markers
with the audit's own correction of the same passages (header blockquote,
"attention grid" table row, conclusion item 2): both corrections are kept,
in chronological order, with the audit framed as refining sgl-project#492 rather than
replacing it — no duplicate REFUTED markers, full correction history intact.

Verified: branch's own diff (3b7569f..1d64fe3) touches only the three
doc files, no *.py; all 17 FEATURE_CATALOG.md §§ present; the five additive
paragraphs from intervening merges (two-axis §1, matrix doctrine §2, sgl-project#491
DSpark §4, merge-duty §12, NVENC §13) all present; codespell clean on the
three touched files.
efschu added a commit to efschu/htsglang that referenced this pull request Aug 3, 2026
…alog §12

Adds "MERGE DUTY -- SITREP (sgl-project#509)" to FEATURE_CATALOG.md §12: a merge that
changes capability, speed, or the standing of a claim owes two distinct
actions -- update the STATUS.md head section in-place (corrected, not
softened, superseded claims deleted) and append a separate log paragraph
(append-only, never rewritten). Every head claim carries an evidence anchor
under the same MECHANISM REACH rule the catalog already follows.

Pure docs, no code diff (git diff --stat ac84f5d..HEAD -- '*.py' empty).
Auto-merged clean against §12's other two paragraphs from the prior two
merges (MERGE-DUTY owner-sites sgl-project#496, reclaim-then-decline family sgl-project#501) --
all three now sit in sequence, none overlapping. 17 catalog sections intact,
codespell clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants