[CI] Build mamba-ssm with C++20 for torch 2.14 nightly compatibility (#49600)

Co-authored-by: Shengqi Chen <harry-chen@outlook.com>

Andrey Talman committed Aug 26, 2026 at 05:31 UTC b821d7b2a648b0c0186c8f7d0784965b6d0cd5bc
1 file changed +9 -3
.buildkite/test_areas/models_language.yaml
+9 -3
@@ -67,7 +67,9 @@ steps:
67 - tests/models/language/generation
68 commands:
69 # Install fast path packages for testing against transformers
70 - - MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/state-spaces/mamba@v2.3.0'
70 + # torch>=2.14 nightly requires C++20 for ATen headers (pytorch/pytorch#178150);
71 + # mamba@v2.3.0 pins -std=c++17, so build from a patched checkout instead of the git URL.
72 + - rm -rf /tmp/mamba-src && git clone --depth 1 --branch v2.3.0 https://github.com/state-spaces/mamba /tmp/mamba-src && sed -i 's/-std=c++17/-std=c++20/g' /tmp/mamba-src/setup.py && MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation /tmp/mamba-src
73 - CAUSAL_CONV1D_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.6.0'
74 # Shard the hybrid language model tests that are numerically stable on Hopper.
75 - pytest -v -s models/language/generation -m hybrid_model -k 'not granite-4.0-tiny-preview' --num-shards=$$BUILDKITE_PARALLEL_JOB_COUNT --shard-id=$$BUILDKITE_PARALLEL_JOB
@@ -96,7 +98,9 @@ steps:
98 - "!vllm/distributed/kv_transfer/"
99 - tests/models/language/generation
100 commands:
99 - - MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/state-spaces/mamba@v2.3.0'
101 + # torch>=2.14 nightly requires C++20 for ATen headers (pytorch/pytorch#178150);
102 + # mamba@v2.3.0 pins -std=c++17, so build from a patched checkout instead of the git URL.
103 + - rm -rf /tmp/mamba-src && git clone --depth 1 --branch v2.3.0 https://github.com/state-spaces/mamba /tmp/mamba-src && sed -i 's/-std=c++17/-std=c++20/g' /tmp/mamba-src/setup.py && MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation /tmp/mamba-src
104 - CAUSAL_CONV1D_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.6.0'
105 - pytest -v -s models/language/generation -m hybrid_model -k 'granite-4.0-tiny-preview'
106
@@ -111,7 +115,9 @@ steps:
115 - tests/models/language/generation
116 commands:
117 # Install fast path packages for testing against transformers
114 - - MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/state-spaces/mamba@v2.3.0'
118 + # torch>=2.14 nightly requires C++20 for ATen headers (pytorch/pytorch#178150);
119 + # mamba@v2.3.0 pins -std=c++17, so build from a patched checkout instead of the git URL.
120 + - rm -rf /tmp/mamba-src && git clone --depth 1 --branch v2.3.0 https://github.com/state-spaces/mamba /tmp/mamba-src && sed -i 's/-std=c++17/-std=c++20/g' /tmp/mamba-src/setup.py && MAMBA_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation /tmp/mamba-src
121 - CAUSAL_CONV1D_FORCE_BUILD=TRUE uv pip install --system --no-build-isolation 'git+https://github.com/Dao-AILab/causal-conv1d@v1.6.0'
122 - pytest -v -s models/language/generation -m '(not core_model) and (not hybrid_model)'
123 mirror: