Skip to content

build: widen flashinfer-python pin to <0.7.0 - #4700

Merged
ko3n1g merged 2 commits into
NVIDIA:mainfrom
ko3n1g:ko3n1g/fix/widen-flashinfer-pin
May 8, 2026
Merged

build: widen flashinfer-python pin to <0.7.0#4700
ko3n1g merged 2 commits into
NVIDIA:mainfrom
ko3n1g:ko3n1g/fix/widen-flashinfer-pin

Conversation

@ko3n1g

@ko3n1g ko3n1g commented May 8, 2026

Copy link
Copy Markdown
Contributor
Claude summary

Problem

megatron-core[dev] and megatron-core[lts] cap flashinfer-python at ~=0.5.0
(i.e. >=0.5.0,<0.6.0). Downstream container builds (Megatron-Bridge fw-base)
install flashinfer-python via vLLM's wheel using regular pip, which routes
around uv and resolves to flashinfer-python 0.6.x. The result is a system /
/opt/venv version split that surfaces at import time as:

RuntimeError: flashinfer-cubin (0.6.8.post1) != flashinfer (0.6.10.post1)

This blocks any clean pyproject.toml-side mitigation in Megatron-Bridge —
pinning flashinfer-python to a 0.6.x version conflicts with MCore's cap.

Fix

Widen the pin to >=0.5.0,<0.7.0 in both dev and lts extras. Permits the
0.6.x range that vLLM is already pulling, without committing to a 0.7.x major
that does not yet exist.

Test plan

  • No code changes — pyproject.toml only.
  • CI on this PR confirms the wider range still resolves.

The fw-base / megatron-bridge container build pulls flashinfer-python via
pip (vLLM wheel), and recent vLLM versions resolve to flashinfer-python 0.6.x.
The compatible-release pin '~=0.5.0' (i.e. <0.6.0) excludes those versions
and creates a system / venv split that surfaces as a runtime version-match
error between flashinfer and flashinfer-cubin.

Widening to <0.7.0 lets uv sync pick up the 0.6.x already installed in
system Python without forcing a downgrade.

Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g

ko3n1g commented May 8, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test

@svcnvidia-nemo-ci
svcnvidia-nemo-ci marked this pull request as draft May 8, 2026 11:13
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

This PR has been automatically converted to draft because all PRs must start as drafts.

When you are ready for review, click Ready for Review to begin the review process. This will:

  1. Add the oncall reviewer (optional reviewer)
  2. Add required review teams based on your changes

See the contribution guide for more details.

@copy-pr-bot

copy-pr-bot Bot commented May 8, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

Resolved 338 packages with the widened flashinfer-python constraint.
flashinfer-python stays at 0.5.3 (still the latest version satisfying
the constraint within MCore's resolved tree).

Signed-off-by: oliver könig <okoenig@nvidia.com>
@ko3n1g
ko3n1g marked this pull request as ready for review May 8, 2026 11:16
@svcnvidia-nemo-ci
svcnvidia-nemo-ci requested a review from a team May 8, 2026 11:16
@ko3n1g
ko3n1g enabled auto-merge May 8, 2026 12:56
@ko3n1g
ko3n1g added this pull request to the merge queue May 8, 2026
@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started!

You can track the progress here: https://github.com/NVIDIA/Megatron-LM/actions/runs/25556822154

Merged via the queue into NVIDIA:main with commit a7bd379 May 8, 2026
71 checks passed
@ko3n1g
ko3n1g deleted the ko3n1g/fix/widen-flashinfer-pin branch May 8, 2026 14:03
svcnvidia-nemo-ci added a commit that referenced this pull request May 11, 2026
- isort imports in megatron/core/datasets/data_schedule.py
- remove unused TEFusedDenseMLP import in gpt_layer_specs.py
- widen flashinfer-python pin to <0.7.0 in pyproject.toml + uv.lock
  specifier (mirrors main PR #4700) — required for MBridge compat
svcnvidia-nemo-ci added a commit that referenced this pull request May 12, 2026
- isort imports in megatron/core/datasets/data_schedule.py
- remove unused TEFusedDenseMLP import in gpt_layer_specs.py
- widen flashinfer-python pin to <0.7.0 in pyproject.toml + uv.lock
  specifier (mirrors main PR #4700) — required for MBridge compat
- restore moe_expert_rank_capacity_factor field to TransformerConfig
  (dev-only field referenced by merged code from main)
- add missing MoETokenDispatcher import to
  tests/unit_tests/transformer/moe/test_token_dispatcher.py
svcnvidia-nemo-ci added a commit that referenced this pull request May 12, 2026
- isort imports in megatron/core/datasets/data_schedule.py
- remove unused TEFusedDenseMLP import in gpt_layer_specs.py
- widen flashinfer-python pin to <0.7.0 in pyproject.toml + uv.lock
  specifier (mirrors main PR #4700) — required for MBridge compat
- restore moe_expert_rank_capacity_factor field to TransformerConfig
  (dev-only field referenced by merged code from main)
- add missing MoETokenDispatcher import to
  tests/unit_tests/transformer/moe/test_token_dispatcher.py
- add --offload-optimizer-states CLI arg back to arguments.py
  (dev-only flag referenced by merged code)
- accept dense_grouped_gemm as no-op kwarg in
  get_mlp_module_spec_for_backend (dev API the callers still pass)
- restore mlp_hyper_connection field to TransformerLayerSubmodules
  (dev-only field that callers still pass)
- restore TEFusedDenseMLP class to transformer_engine.py
  (dev-only class referenced by tests/unit_tests/transformer/test_te_fused_dense_mlp_spec.py)
- add missing sharded_state_dict_default import in mlp.py
- add hybrid_context_parallel field to GPTDatasetConfig
  (main's caller passes it, dev's class was missing it)
jingqiny-99 pushed a commit to jingqiny-99/Megatron-LM that referenced this pull request May 13, 2026
…dev` (NVIDIA#4760)

Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: Charlie Truong <chtruong@nvidia.com>
Co-authored-by: oliver könig <okoenig@nvidia.com>
yhgalaxy pushed a commit to yhgalaxy/Megatron-LM that referenced this pull request Jun 17, 2026
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: yhgalaxy <yhgalaxy@outlook.com>
jon-barker pushed a commit to jon-barker/Megatron-LM that referenced this pull request Jul 10, 2026
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: Jon Barker <jbarker@aws-cmh-slurm-1-vscode-02.cm.cluster>
terminator123 pushed a commit to 021ai/Megatron-LM that referenced this pull request Aug 3, 2026
Signed-off-by: oliver könig <okoenig@nvidia.com>
svcnvidia-nemo-ci pushed a commit to dimapihtar/Megatron-LM that referenced this pull request Aug 4, 2026
Signed-off-by: oliver könig <okoenig@nvidia.com>
Signed-off-by: Dmytro Pykhtar <dpykhtar@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants