Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ srt = [
"torchvision==0.22.1",
"cuda-python",
"einops",
"flashinfer_python==0.2.9rc1",
"flashinfer_python==0.2.9rc2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The dependency lists for the srt and blackwell extras appear to be identical. To improve maintainability and avoid having to update versions in multiple places, consider defining a common extra that both srt and blackwell can depend on.

For example:

[project.optional-dependencies]
_common_gpu_deps = [
    "torchvision==0.22.1",
    "cuda-python",
    "einops",
    "flashinfer_python==0.2.9rc2",
]
srt = ["sglang[_common_gpu_deps]"]
blackwell = ["sglang[_common_gpu_deps]"]

This would centralize the common dependencies, making future updates easier.

]

blackwell = [
Expand All @@ -71,7 +71,7 @@ blackwell = [
"torchvision==0.22.1",
"cuda-python",
"einops",
"flashinfer_python==0.2.9rc1",
"flashinfer_python==0.2.9rc2",
]

# HIP (Heterogeneous-computing Interface for Portability) for AMD
Expand Down
2 changes: 1 addition & 1 deletion python/sglang/srt/entrypoints/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def _set_envs_and_config(server_args: ServerArgs):
if server_args.attention_backend == "flashinfer":
assert_pkg_version(
"flashinfer_python",
"0.2.9rc1",
"0.2.9rc2",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This hardcoded version string is also defined in pyproject.toml. This duplication can lead to inconsistencies if one location is updated but the other is not. To improve maintainability, consider making pyproject.toml the single source of truth and reading the required version from it at runtime. This would ensure the runtime check is always in sync with the installation requirements.

"Please uninstall the old version and "
"reinstall the latest version by following the instructions "
"at https://docs.flashinfer.ai/installation.html.",
Expand Down
Loading