[PR #3947] [CLOSED] [Engine] Add sm_89 (Ada Lovelace / L4 / RTX 40) to dsv41 CUDA build architectures #4850

Closed
opened 2026-11-07 16:30:51 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3947
Author: @waroy
Created: 10/24/2026
Status: ❌ Closed

Base: main ← Head: fix-dsv41-sm89-prebuilt


📝 Commits (1)

  • 9eb6a2c packaging: add 89-real to dsv41 default CUDA build architectures

📊 Changes

3 files changed (+3 additions, -3 deletions)

View changed files

📝 packaging/build_dsv41_cuda.sh (+1 -1)
📝 packaging/build_dsv41_windows.bat (+1 -1)
📝 setup.py (+1 -1)

📄 Description

Problem and result

Currently, the prebuilt strata-dsv41-0.1.49 engine packages in the signed update feed only carry code for sm_86, sm_120, and compute_120.

On Ada Lovelace GPUs such as the NVIDIA L4 (standard in cloud environments) and RTX 40 series (sm_89), setup.py --family deepseek41 stops at step 4:

strata-dsv41-0.1.49.2-linux-x86_64-cuda-cuda13.tar.gz has code for sm_86, sm_120, compute_120, this PC's GPU is sm_89.
[X] DeepSeek's engine is not available for this computer yet
    Supported graphics cards: NVIDIA RTX 30 and RTX 50 series, and the Radeon AI PRO R9700.

Because PTX code compiled for compute_120 (Blackwell) cannot JIT-compile down to sm_89 (Ada Lovelace), there is no fallback execution path for sm_89 devices when using the prebuilt release packages.

After this change:
packaging/build_dsv41_cuda.sh and packaging/build_dsv41_windows.bat include 89-real in their default architecture lists, so release builds automatically produce sm_89 machine code. Users on NVIDIA L4 and RTX 40 GPUs can download and run the prebuilt engine out-of-the-box without manual compilation.

Relates to #3935.

Approach

The engine source in src/dsv41/ targets sm_80+ Tensor Core instructions (mma.m16n8k16), which are natively supported on Ada Lovelace (sm_89). The main engine (strata-engine) already targets sm_89.

This PR adds 89-real to the default ARCH / DSV41_ARCH list in both packaging/build_dsv41_cuda.sh and packaging/build_dsv41_windows.bat, and updates the supported hardware message in setup.py to mention RTX 40 series and NVIDIA L4 cards alongside RTX 30 and RTX 50.

Validation

Passed:

  • Compilation:
    • Command: SRC=. B=build-dsv41 CUDA=/usr/local/cuda-13.0 GG=third_party/llama.cpp ARCH="89-real" JOBS=16 bash packaging/build_dsv41_cuda.sh
    • Environment: Ubuntu 24.04 LTS, NVIDIA L4 (sm_89, 24 GB VRAM), CUDA 13.0 toolkit, driver 595.91.07, git revision v0.2.4 / PR branch fix-dsv41-sm89-prebuilt.
    • Observed: Clean build without errors or warnings. Produced 34 MB 64-bit ELF executable dynamically linked against libcudart.so.13, libcublas.so.13, libcublasLt.so.13.
  • Engine verification via setup.py:
    • Command: STRATA_DSV41_EXE=/path/to/strata-dsv41 python3 setup.py --setup --yes --family deepseek41 --model IST-DAS-2.00bpw --context 262144 --kv q4_0 --data-dir /path/to/data --no-start
    • Observed: Step 4 recognized the pre-compiled strata-dsv41 executable on the L4 GPU, validated CUDA 13 runtime libraries, and wrote the engine JSON configuration without errors.
  • Model smoke test on L4 GPU:
    • Command: python3 tools/dsv41/smoke.py --pack /path/to/packs/deepseek-v4.1-flash-ist-das-2.00bpw --exe /path/to/strata-dsv41
    • Observed: [ok] test question answered sensibly after initial expert weight prefill into L4 VRAM and system memory.
  • Live serving & inference:
    • Command: python3 serve/server.py --engine strata --config strata-deepseek-v4.1-flash-ist-das-2.00bpw.json --port 8090
    • Inference: POST /v1/chat/completions with payload {"model": "deepseek-v4.1-flash", "messages": [{"role": "user", "content": "What is 17 + 28? Reply with just the number."}]}
    • Observed: HTTP 200 OK, choices[0].message.content: "45", choices[0].message.reasoning_content: "We need answer just number. 17+28=45.".

Failed:

  • None observed.

Not run:

  • Windows build script (packaging/build_dsv41_windows.bat): Not run on native Windows hardware (tested syntax against existing batch patterns; CI / release pipeline runs on Windows builders).
  • HIP build: DSV41 HIP builds use separate packaging (build_dsv41_hip.sh for Radeon AI PRO R9700) and are untouched by this PR.

Limits

  • Real machine code for sm_89 adds a few megabytes to the resulting tarball / zip archive.
  • Does not change older prebuilt releases retroactively; applies to the next engine release build from main.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3947 **Author:** [@waroy](https://github.com/waroy) **Created:** 10/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-dsv41-sm89-prebuilt` --- ### 📝 Commits (1) - [`9eb6a2c`](https://github.com/Niko1221/Strata/commit/9eb6a2c078cf5627cb00b23c4fdd50a024a9278a) packaging: add 89-real to dsv41 default CUDA build architectures ### 📊 Changes **3 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packaging/build_dsv41_cuda.sh` (+1 -1) 📝 `packaging/build_dsv41_windows.bat` (+1 -1) 📝 `setup.py` (+1 -1) </details> ### 📄 Description ## Problem and result Currently, the prebuilt `strata-dsv41-0.1.49` engine packages in the signed update feed only carry code for `sm_86`, `sm_120`, and `compute_120`. On Ada Lovelace GPUs such as the NVIDIA L4 (standard in cloud environments) and RTX 40 series (`sm_89`), `setup.py --family deepseek41` stops at step 4: ```text strata-dsv41-0.1.49.2-linux-x86_64-cuda-cuda13.tar.gz has code for sm_86, sm_120, compute_120, this PC's GPU is sm_89. [X] DeepSeek's engine is not available for this computer yet Supported graphics cards: NVIDIA RTX 30 and RTX 50 series, and the Radeon AI PRO R9700. ``` Because PTX code compiled for `compute_120` (Blackwell) cannot JIT-compile down to `sm_89` (Ada Lovelace), there is no fallback execution path for `sm_89` devices when using the prebuilt release packages. After this change: `packaging/build_dsv41_cuda.sh` and `packaging/build_dsv41_windows.bat` include `89-real` in their default architecture lists, so release builds automatically produce `sm_89` machine code. Users on NVIDIA L4 and RTX 40 GPUs can download and run the prebuilt engine out-of-the-box without manual compilation. ## Related discussion Relates to #3935. ## Approach The engine source in `src/dsv41/` targets `sm_80+` Tensor Core instructions (`mma.m16n8k16`), which are natively supported on Ada Lovelace (`sm_89`). The main engine (`strata-engine`) already targets `sm_89`. This PR adds `89-real` to the default `ARCH` / `DSV41_ARCH` list in both `packaging/build_dsv41_cuda.sh` and `packaging/build_dsv41_windows.bat`, and updates the supported hardware message in `setup.py` to mention RTX 40 series and NVIDIA L4 cards alongside RTX 30 and RTX 50. ## Validation **Passed:** - **Compilation**: - Command: `SRC=. B=build-dsv41 CUDA=/usr/local/cuda-13.0 GG=third_party/llama.cpp ARCH="89-real" JOBS=16 bash packaging/build_dsv41_cuda.sh` - Environment: Ubuntu 24.04 LTS, NVIDIA L4 (sm_89, 24 GB VRAM), CUDA 13.0 toolkit, driver 595.91.07, git revision `v0.2.4` / PR branch `fix-dsv41-sm89-prebuilt`. - Observed: Clean build without errors or warnings. Produced 34 MB 64-bit ELF executable dynamically linked against `libcudart.so.13`, `libcublas.so.13`, `libcublasLt.so.13`. - **Engine verification via setup.py**: - Command: `STRATA_DSV41_EXE=/path/to/strata-dsv41 python3 setup.py --setup --yes --family deepseek41 --model IST-DAS-2.00bpw --context 262144 --kv q4_0 --data-dir /path/to/data --no-start` - Observed: Step 4 recognized the pre-compiled `strata-dsv41` executable on the L4 GPU, validated CUDA 13 runtime libraries, and wrote the engine JSON configuration without errors. - **Model smoke test on L4 GPU**: - Command: `python3 tools/dsv41/smoke.py --pack /path/to/packs/deepseek-v4.1-flash-ist-das-2.00bpw --exe /path/to/strata-dsv41` - Observed: `[ok] test question answered sensibly` after initial expert weight prefill into L4 VRAM and system memory. - **Live serving & inference**: - Command: `python3 serve/server.py --engine strata --config strata-deepseek-v4.1-flash-ist-das-2.00bpw.json --port 8090` - Inference: `POST /v1/chat/completions` with payload `{"model": "deepseek-v4.1-flash", "messages": [{"role": "user", "content": "What is 17 + 28? Reply with just the number."}]}` - Observed: HTTP 200 OK, `choices[0].message.content: "45"`, `choices[0].message.reasoning_content: "We need answer just number. 17+28=45."`. **Failed:** - None observed. **Not run:** - Windows build script (`packaging/build_dsv41_windows.bat`): Not run on native Windows hardware (tested syntax against existing batch patterns; CI / release pipeline runs on Windows builders). - HIP build: DSV41 HIP builds use separate packaging (`build_dsv41_hip.sh` for Radeon AI PRO R9700) and are untouched by this PR. ## Limits - Real machine code for `sm_89` adds a few megabytes to the resulting tarball / zip archive. - Does not change older prebuilt releases retroactively; applies to the next engine release build from `main`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:30:51 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4850
No description provided.