Skip to content
Merged
4 changes: 3 additions & 1 deletion docker/install/install_python_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
set -e
set -u

pip3 install --upgrade "setuptools>=77" "pip>=24"

# Accept CUDA version as parameter (e.g., cu126, cu128, cu129)
CUDA_VERSION=${1:-cu128}

Expand All @@ -32,7 +34,7 @@ pip3 install responses pytest scipy build cuda-python nvshmem4py-cu12
if [[ "$CUDA_VERSION" == *"cu13"* ]]; then
pip3 install --upgrade cuda-python==13.0
pip3 install --upgrade nvidia-cudnn-cu13
pip3 install --upgrade "nvidia-cutlass-dsl[cu13]>=4.4.2"
pip3 install --upgrade "nvidia-cutlass-dsl[cu13]>=4.5.0"
else
pip3 install --upgrade cuda-python==12.*
pip3 install --upgrade nvidia-cudnn-cu12
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@

[project]
name = "flashinfer-python"
dynamic = ["version", "dependencies"]
description = "FlashInfer: Kernel Library for LLM Serving"
requires-python = ">=3.10,<4.0"
authors = [{ name = "FlashInfer team" }]
license = "Apache-2.0"
readme = "README.md"
urls = { Homepage = "https://github.com/flashinfer-ai/flashinfer" }
dynamic = ["dependencies", "version"]
license-files = ["LICENSE", "LICENSE*.txt"]

[project.optional-dependencies]
cu12 = ["nvidia-cutlass-dsl>=4.4.2"]
cu13 = ["nvidia-cutlass-dsl[cu13]>=4.4.2"]
cu12 = ["nvidia-cutlass-dsl>=4.5.0"]
cu13 = ["nvidia-cutlass-dsl[cu13]>=4.5.0"]
Comment thread
coderabbitai[bot] marked this conversation as resolved.

[project.scripts]
flashinfer = "flashinfer.__main__:cli"
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ einops
ninja
numpy
nvidia-cudnn-frontend>=1.13.0
nvidia-cutlass-dsl>=4.4.2
nvidia-ml-py
packaging>=24.2
requests
Expand Down
11 changes: 11 additions & 0 deletions scripts/test_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,17 @@ install_and_verify() {
# Install precompiled kernels if enabled
install_precompiled_kernels

# Sync dependencies from the branch's requirements.txt
pip install -r requirements.txt

# Install nvidia-cutlass-dsl with the correct CUDA extra to avoid
# version skew between libs-base and libs-cu13.
if [[ "${CUDA_VERSION}" == *"cu13"* ]] || [[ "${CUDA_VERSION}" == "13."* ]]; then
pip install --upgrade "nvidia-cutlass-dsl[cu13]>=4.5.0"
else
pip install --upgrade "nvidia-cutlass-dsl>=4.5.0"
fi

# Install local python sources
pip install -e . -v --no-deps
echo ""
Expand Down
4 changes: 2 additions & 2 deletions tests/gemm/test_mm_fp4.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def _test_mm_fp4(
if backend == "b12x":
if not use_128x4_sf_layout:
pytest.skip("b12x backend only supports 128x4 SF layout")
if compute_capability[0] != 12 or compute_capability[1] != 0:
pytest.skip("b12x backend only supports SM120 GPUs.")
if compute_capability[0] != 12:
pytest.skip("b12x backend only supports SM120/SM121 GPUs.")
if not use_nvfp4:
pytest.skip("b12x backend only supports NVFP4 (sf_vec_size=16).")
if torch.version.cuda and int(torch.version.cuda.split(".")[0]) < 13:
Expand Down
17 changes: 0 additions & 17 deletions tests/moe/test_b12x_fused_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ def _cuda_13_or_newer():
return False


def _is_sm121():
"""Check whether the current device reports compute capability SM121."""
if not torch.cuda.is_available():
return False
props = torch.cuda.get_device_properties(0)
return props.major == 12 and props.minor == 1


# Skip decorators
cute_dsl_available = pytest.mark.skipif(
not is_cute_dsl_available(), reason="CuteDSL not available"
Expand All @@ -85,10 +77,6 @@ def _is_sm121():
not _cuda_13_or_newer(),
reason="b12x fused MoE requires CUDA 13 or later",
)
not_sm121 = pytest.mark.skipif(
_is_sm121(),
reason="b12x fused MoE is not supported on SM121",
)


# =============================================================================
Expand Down Expand Up @@ -532,7 +520,6 @@ def create_relu2_moe_tensors(
@cute_dsl_available
@sm120_required
@cuda_13_required
@not_sm121
class TestB12xFunctional:
"""Tests for the functional API: b12x_fused_moe."""

Expand Down Expand Up @@ -613,7 +600,6 @@ def test_numerical_accuracy(
@cute_dsl_available
@sm120_required
@cuda_13_required
@not_sm121
class TestB12xWrapper:
"""Tests for the wrapper API: B12xMoEWrapper."""

Expand Down Expand Up @@ -795,7 +781,6 @@ def test_wrapper_cuda_graph(self, num_tokens: int, num_experts: int):
@cute_dsl_available
@sm120_required
@cuda_13_required
@not_sm121
class TestB12xApiConsistency:
"""Tests verifying consistency between b12x functional and wrapper APIs."""

Expand Down Expand Up @@ -874,7 +859,6 @@ def test_functional_vs_wrapper_output(self):
@cute_dsl_available
@sm120_required
@cuda_13_required
@not_sm121
class TestMicroKernel:
"""Tests for the micro kernel path (routed_rows <= 20-40).

Expand Down Expand Up @@ -1076,7 +1060,6 @@ def test_micro_single_token_unique_path(self):
@cute_dsl_available
@sm120_required
@cuda_13_required
@not_sm121
class TestRelu2Activation:
"""Tests for ReLU2 activation (non-gated, Nemotron-Super)."""

Expand Down
Loading