Documented tree replacement (the history has no git-subtree metadata): 3-way merge of the old subtree (570201a:engine/strata) against upstream 41cf05a06a25dd29103b7b27a2279a3f60c21876 (2026-10-25), merge base = the old pin d9ab8435 (tree-identical to upstream 5b734e42; d9ab8435 is not an ancestor of upstream main). Local patches re-applied by hand where they conflicted (15 files): STRATA_CUDA_STATIC profile, experimental KAR experts and KAR PLE arms, keyless V-only arm (now beside upstream's K8V4 hybrid KV and fused norm+rope). Details, conflict table and left-out files are in docs/upstream.md. Left out (weights, captures, logs, media): new bench/results (2022 files), binary media and app assets (61), docs/work/evidence (24), *.bin / *.gguf data files, and the 7 files the first import already left out. scripts/build-cpu.sh: build the 11 CPU tests upstream registered since the old pin (they ran as "Not Run"). Checked: build-cpu.sh 16/16 ctest in WSL; sm_86 CUDA objects of the patched files compile, also with the KAR macros on. No GPU run, no quality gate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
57 lines
2.7 KiB
Python
57 lines
2.7 KiB
Python
"""`strata launch` on a computer whose only NVIDIA cards are Pascal / Volta (P100, V100): setup.py admits them (the experimental CUDA 12 engine);
|
|
the screens must not say "no usable graphics card found", and several of them must offer the Cards step."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import unittest
|
|
from unittest import mock
|
|
|
|
from strata_cli.launch.catalog import Catalog
|
|
from tests.terminal.launch_support import HW_12, Home, catalog
|
|
|
|
|
|
def v100(index: int, vram: float = 16.0) -> dict:
|
|
return {"index": index, "name": "Tesla V100-SXM2-16GB", "arch": "70", "vram_gb": vram, "vendor": "nvidia", "usable": False,
|
|
"problem": "not supported - older than the RTX 20 series (compute capability 7.0)"}
|
|
|
|
|
|
RTX = {"index": 0, "name": "NVIDIA GeForce RTX 3060", "arch": "86", "vram_gb": 12.0, "vendor": "nvidia", "usable": True, "problem": None}
|
|
|
|
|
|
class OldNvidiaCards(unittest.TestCase):
|
|
def test_only_volta_cards_are_admitted(self):
|
|
got = Catalog._admit_old_nvidia([v100(0), v100(1)])
|
|
self.assertEqual([g["usable"] for g in got], [True, True])
|
|
self.assertTrue(all(g["problem"] is None for g in got))
|
|
|
|
def test_a_newer_card_keeps_the_old_one_out(self):
|
|
got = Catalog._admit_old_nvidia([{**RTX}, v100(1)])
|
|
self.assertEqual([g["usable"] for g in got], [True, False])
|
|
|
|
def test_an_amd_card_keeps_the_old_one_out(self):
|
|
amd = {"index": 0, "name": "AMD Radeon RX 9070 XT", "vendor": "amd", "usable": True, "vram_gb": 16.0}
|
|
got = Catalog._admit_old_nvidia([amd, v100(0)])
|
|
self.assertEqual([g["usable"] for g in got], [True, False])
|
|
|
|
def test_other_cards_are_not_touched(self):
|
|
gtx = {"index": 0, "name": "GeForce GT 1030", "arch": "61", "vram_gb": 2.0, "vendor": "nvidia", "usable": False}
|
|
self.assertEqual(Catalog._admit_old_nvidia([gtx])[0]["usable"], True) # Pascal is admitted too (setup does the same)
|
|
kepler = {"index": 0, "name": "Tesla K80", "arch": "37", "vram_gb": 12.0, "vendor": "nvidia", "usable": False}
|
|
self.assertEqual(Catalog._admit_old_nvidia([kepler])[0]["usable"], False)
|
|
self.assertEqual(Catalog._admit_old_nvidia([]), [])
|
|
|
|
def test_hardware_and_computer_show_the_cards(self):
|
|
with Home():
|
|
cat = catalog()
|
|
cat._hardware_override = None
|
|
hw = {**HW_12, "gpus": [v100(0), v100(1)]}
|
|
with mock.patch.object(type(cat.strata), "hardware", return_value=hw):
|
|
comp = cat.computer(fresh=True)
|
|
self.assertEqual(len(comp.usable_gpus), 2)
|
|
self.assertIn("x2", comp.line())
|
|
self.assertNotIn("no usable graphics card", comp.line())
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|