diff --git a/docs/cli-design.md b/docs/cli-design.md index 3fc182813..7b49b72ab 100644 --- a/docs/cli-design.md +++ b/docs/cli-design.md @@ -3,8 +3,8 @@ For environment setup and model-specific launch examples, see [model preparation and serving](model-preparation.md). -Flare serves the model architectures its recipes support on NVIDIA SM103, SM120, -and SM121 GPUs. Recipes declare default checkpoints and supported preparation +Flare serves the model architectures its recipes support on NVIDIA SM87, SM103, +SM110, SM120, and SM121 GPUs. Recipes declare default checkpoints and supported preparation capacities. The command line selects models, GPUs, concurrency, storage, and listeners. The engine derives memory and execution geometry from those choices; advanced preparation flags expose the explicit overrides listed below. diff --git a/ignition/cli/__init__.py b/ignition/cli/__init__.py index d16f44433..0adc7c302 100644 --- a/ignition/cli/__init__.py +++ b/ignition/cli/__init__.py @@ -87,7 +87,7 @@ def _parser(*, recipes=(), prog="ignition", recipe=None, checkpoint=None) -> arg recipes = tuple(recipes) parser = argparse.ArgumentParser( prog=prog, allow_abbrev=False, - description="Prepare native runtime cores for NVIDIA SM103, SM120, and SM121 GPUs.", + description="Prepare native runtime cores for NVIDIA SM87, SM103, SM110, SM120, and SM121 GPUs.", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=catalog_epilog(recipes=recipes, prog=prog), ) diff --git a/ignition/planning.py b/ignition/planning.py index 41cc3f6b2..13bbfefe6 100644 --- a/ignition/planning.py +++ b/ignition/planning.py @@ -34,8 +34,8 @@ # Each exchange can retain prompt and terminal checkpoints; snapshot slots have # virtual capacity for about four recent exchanges per concurrent request. CACHE_STATES_PER_REQUEST = 8 -SUPPORTED_CAPABILITIES = ((8, 7), (10, 3), (12, 0), (12, 1)) -SUPPORTED_ARCHITECTURES = "SM87, SM103, SM120, or SM121" +SUPPORTED_CAPABILITIES = ((8, 7), (10, 3), (11, 0), (12, 0), (12, 1)) +SUPPORTED_ARCHITECTURES = "SM87, SM103, SM110, SM120, or SM121" _GIB = 1 << 30 diff --git a/ignition/preparation/aot.py b/ignition/preparation/aot.py index 29597f280..7aaae43a7 100644 --- a/ignition/preparation/aot.py +++ b/ignition/preparation/aot.py @@ -759,6 +759,15 @@ def __init__(self, *, namespace, device, root=None, headroom_bytes=0, options=No continue key.update(str(path.relative_to(source)).encode()) key.update(path.read_bytes()) + from .source_identity import _EXTRA_ROOTS + + for label, extra_root in _EXTRA_ROOTS.get(): + extra_root = Path(extra_root).resolve() + if not extra_root.is_dir(): + raise ValueError(f"bound source root {label!r} does not exist: {extra_root}") + for path in sorted(extra_root.rglob('*.py')): + rel = f'{label}/{path.relative_to(extra_root).as_posix()}'.encode() + key.update(b'\0' + rel + b'\0' + hashlib.sha256(path.read_bytes()).digest()) root = DEFAULT_CACHE_ROOT if root is None else Path(root) self.root = root / 'forwards' / key.hexdigest() diff --git a/tests/preparation/test_forward_cache_sources.py b/tests/preparation/test_forward_cache_sources.py index b73485091..521da8013 100644 --- a/tests/preparation/test_forward_cache_sources.py +++ b/tests/preparation/test_forward_cache_sources.py @@ -7,8 +7,10 @@ from types import SimpleNamespace import flashinfer +import pytest from ignition.preparation import aot +from ignition.preparation.source_identity import source_roots def test_presentation_edits_preserve_forward_cache_but_execution_edits_invalidate(tmp_path, monkeypatch): @@ -27,6 +29,10 @@ def test_presentation_edits_preserve_forward_cache_but_execution_edits_invalidat kernels.mkdir() operator = kernels / "operator.py" operator.write_text("kernel = 1\n") + external = tmp_path / "external_recipes" + external.mkdir() + recipe = external / "recipe.py" + recipe.write_text("recipe = 1\n") monkeypatch.setattr(aot, "__file__", str(backend)) monkeypatch.setattr(flashinfer, "__file__", str(kernels / "__init__.py")) monkeypatch.setattr(aot.torch.cuda, "get_device_properties", lambda device: @@ -44,4 +50,13 @@ def root(): changed = root() assert changed != original operator.write_text("kernel = 2\n") - assert root() != changed + after_kernel = root() + assert after_kernel != changed + with source_roots((("external_recipes", external),)): + with_external = root() + assert with_external != after_kernel + recipe.write_text("recipe = 2\n") + assert root() != with_external + with source_roots((("missing", tmp_path / "does_not_exist"),)): + with pytest.raises(ValueError, match="does not exist"): + root()