Megatron-LM icon indicating copy to clipboard operation
Megatron-LM copied to clipboard

is_flashinfer_min_version raises NameError when check_equality=False

Open JavaZeroo opened this issue 5 months ago • 2 comments

Describe the bug

is_flashinfer_min_version(version, check_equality=False) always raises NameError when flashinfer is installed: the strict-comparison branch in megatron/core/utils.py references a misspelled variable flashinver_version instead of flashinfer_version.

https://github.com/NVIDIA/Megatron-LM/blob/e03878b/megatron/core/utils.py#L483-L487

Steps/Code to reproduce bug

import megatron.core.utils as u
from packaging.version import Version as PkgVersion

u._flashinfer_version = PkgVersion("0.5.0")  # or have any flashinfer version installed
u.is_flashinfer_min_version("0.4.0", check_equality=False)
# NameError: name 'flashinver_version' is not defined

Expected behavior

Returns the result of flashinfer_version > PkgVersion(version), matching the behavior of is_te_min_version / is_torch_min_version.

Additional context

Fix in #5262.

JavaZeroo avatar Jun 10 '26 07:06 JavaZeroo

Thank you for reporting this bug. We are actively reviewing your PR.

guihong-nv avatar Jun 10 '26 17:06 guihong-nv

Fixed by https://github.com/NVIDIA/Megatron-LM/pull/4961.

Phlip79 avatar Jul 20 '26 21:07 Phlip79