Skip to content
Open
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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ pip install -e .

```

### Platform Compatibility

Tokasaurus uses `flashinfer`, which depends on [Triton](https://github.com/triton-lang/triton).

**Triton is not supported on macOS** — there are no compatible wheels or source build paths, and it requires CUDA (not available on macOS).

If you're running Tokasaurus on macOS, you'll encounter an error like: ModuleNotFoundError: No module named ‘triton’

We recommend running Tokasaurus in a **Linux environment with a CUDA-compatible GPU** for full functionality.


## Quickstart

Once installed, you can launch the engine with:
Expand Down
3 changes: 3 additions & 0 deletions tokasaurus/entry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from tokasaurus.environment import assert_flashinfer_supported

assert_flashinfer_supported()
from contextlib import contextmanager

import pydra
Expand Down
21 changes: 21 additions & 0 deletions tokasaurus/environment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import platform


def is_flashinfer_supported() -> bool:
"""
Returns True if flashinfer (and Triton) are likely usable on this platform.
Currently, Triton does not support macOS.
"""
return platform.system() != "Darwin"


def assert_flashinfer_supported():
"""
Raises a RuntimeError with a clear message if the current platform is not supported by flashinfer.
"""
if not is_flashinfer_supported():
raise RuntimeError(
"Tokasaurus currently depends on flashinfer, which in turn requires 'triton'.\n"
"However, 'triton' is not supported on macOS.\n"
"Please run Tokasaurus in a Linux environment with a supported GPU."
)