Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/cli-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ignition/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down
4 changes: 2 additions & 2 deletions ignition/planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
9 changes: 9 additions & 0 deletions ignition/preparation/aot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
17 changes: 16 additions & 1 deletion tests/preparation/test_forward_cache_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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:
Expand All @@ -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()