Skip to content

add TPU support for basal 2.0 - #15

Merged
rkinas merged 2 commits into
rkinas:mainfrom
qooba:tpu-engine-2.0
Oct 19, 2026
Merged

rkinas merged 2 commits into
rkinas:mainfrom
qooba:tpu-engine-2.0

Conversation

@qooba

@qooba qooba commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Closes #11. Supersedes #12 (closed, I had to recreate my fork), ported to basal 2.0.0 as requested in the review there.

Overview

Adds Google TPU inference (--mode tpu), written in plain JAX on XLA. It's an experimental, community-maintained
backend and is installed only through the optional extra basal[tpu].

Port to the 2.0 engine (review points from #12)

  • --orders 1/2/auto/2le: the backend no longer decides on its own when to share prefixes. It takes the server's
    own rule, shared = orders != 1 or --soam on, like GraphBackend.
  • run_shared(groups, policy=None, done=None): follows GraphBackend.run_shared. It reuses _units / _chunks
    and calls done(k, res) for each group as soon as all its units are read out, so streaming works with
    inflight=1.
  • Prompt format 2, up to 255 options: LETTER_SLOTS = 256 output-head rows are read per position. The number is
    fixed, so a new set of option codes needs no recompile.
  • Context: --max-len (clamped to the model's positions) sets context / context_reason, so
    --context-overflow works as on the other engines. A group longer than --max-len is bisected, and a single prompt
    longer than that is refused.
  • JAX is an optional extra: tpu = ["jax[tpu]==0.11.1; python_version >= '3.12' and sys_platform == 'linux'"],
    with libtpu also from PyPI. Only basal/tpu.py and basal/tpu_kernels.py import JAX.
    • Install sets: the default install and every existing extra resolve to exactly the same packages. I checked
      this with uv export against main's lock.
    • uv.lock diff: it adds 4 packages for the extra (jax, jaxlib, libtpu, opt-einsum, plus their deps scipy,
      ml-dtypes and requests). The other ~40 changed lines are uv re-normalising markers, which happens with any new
      extra (even tpu = ["numpy"] gives the same −42 lines). No locked version changes.

Engine

  • Compilation: the model is one jax.lax.scan over stacked layer weights, so compiles are short and the HLO
    graphs compact.
  • Weights: safetensors are loaded without torch (np.memmap, ml_dtypes).
  • Shapes: one TPU-specific shape grid (18 lengths up to 3,072 × batches 1–32) with warm-up and the XLA disk cache,
    so serving doesn't recompile.
  • Long prompts: above 3,072 tokens, coarse buckets up to 32k with blocked (online-softmax) attention.
  • Precision: --dtype bfloat16 (default) or float32 (exact mode with HIGHEST-precision matmuls).
  • Selection and benchmarks: --mode tpu is chosen automatically on a TPU VM that has basal[tpu] installed.
  • Not on TPU: evidence spans, --media, early exit, quantisation.

Parity and speed (Colab TPU v5e-1, JAX 0.11.1)

basal-bench, all 44 bundled examples, with transformers fp32 on the CPU as the reference:

model precision 2 orders (mean / p50) dec/s agreement vs fp32 accuracy (fp32 / TPU)
basal-2.0 (4.5B) bf16 16.3 / 15.9 ms 64.7 1.000 0.795 / 0.795
basal-2.0-mini bf16 6.3 / 6.1 ms 188.7 1.000 0.750 / 0.750
basal-2.0-mini fp32 23.1 / 22.8 ms 33.5 1.000 0.750 / 0.750

HTTP (basal-serve defaults, 32 clients): basal-2.0 17.1 ms p50, 59.6 dec/s; mini 7.3 ms p50, 165.5 dec/s.

Identity paths (items from basal/identity.py, each prompt against transformers fp32 alone; 40 readouts per
single path, 60 per request path; prompt p50 1,794 tokens, long states 3.9k–5.7k):

  • fp32 on the TPU (mini): all 8 paths agree 1.000, max |Δp| ≤ 1.7e-5. Packing, batching and blocked attention
    add no error.
  • bf16: 12 of 16 path results agree 1.000. The other four are at 0.975 (three mini paths, one 4.5B path), and
    max |Δp| is 0.01–0.05.
  • The disagreements: each 0.975 is a single flip, always where the fp32 reference's top two options are within
    0.027. With 40 readouts, one flip falls below the 0.999 gate.

basal-2.0-max (11B) doesn't fit in a v5e-1's 16 GB of HBM.

To reproduce on your private development sample:
basal-bench --model Remek/basal-2.0-4.5B --modes eager-fp32 tpu --questions <file>

Docs, tests, notebook

  • Docs:
    • docs/INSTALL.md: TPU install section.
    • docs/SERVING.md: mode row.
    • docs/HARDWARE.md: a draft of the "experimental, community-maintained" section with the numbers above, for you
      to keep, edit or drop.
  • Tests: tests/test_tpu.py has 10 tests. They run on CPU JAX locally and on the TPU when one is present (parity
    vs torch, done= with several roots, bisecting above --max-len, 60 option codes, blocked attention, dtype and
    device errors).
    • Full suite locally: 505 passed, 20 skipped.
    • On the TPU: 83 passed, 4 skipped.
  • Notebook: notebooks/tpu.ipynb is a Colab notebook that installs, runs, serves and benchmarks basal-2.0 on a
    TPU. Colab's TPU image ships torchvision / torchaudio / torch-xla built for torch 2.9, so the notebook uninstalls
    them after the torch upgrade. Closes [Feature] Add Cloud TPU backend via JAX/XLA (--mode tpu) #11. Supersedes feat(engine): add Cloud TPU backend via JAX/XLA (--mode tpu) #12 (closed), ported to basal 2.0.0 as requested in the review there.

Overview

Adds Google TPU inference (--mode tpu), written in plain JAX on XLA. It's an experimental, community-maintained
backend and is installed only through the optional extra basal[tpu].

Port to the 2.0 engine (review points from #12)

  • --orders 1/2/auto/2le: the backend no longer decides on its own when to share prefixes. It takes the server's
    own rule, shared = orders != 1 or --soam on, like GraphBackend.
  • run_shared(groups, policy=None, done=None): follows GraphBackend.run_shared. It reuses _units / _chunks
    and calls done(k, res) for each group as soon as all its units are read out, so streaming works with
    inflight=1.
  • Prompt format 2, up to 255 options: LETTER_SLOTS = 256 output-head rows are read per position. The number is
    fixed, so a new set of option codes needs no recompile.
  • Context: --max-len (clamped to the model's positions) sets context / context_reason, so
    --context-overflow works as on the other engines. A group longer than --max-len is bisected, and a single prompt
    longer than that is refused.
  • JAX is an optional extra: tpu = ["jax[tpu]==0.11.1; python_version >= '3.12' and sys_platform == 'linux'"],
    with libtpu also from PyPI. Only basal/tpu.py and basal/tpu_kernels.py import JAX.
    • Install sets: the default install and every existing extra resolve to exactly the same packages. I checked
      this with uv export against main's lock.
    • uv.lock diff: it adds 4 packages for the extra (jax, jaxlib, libtpu, opt-einsum, plus their deps scipy,
      ml-dtypes and requests). The other ~40 changed lines are uv re-normalising markers, which happens with any new
      extra (even tpu = ["numpy"] gives the same −42 lines). No locked version changes.

Engine

  • Compilation: the model is one jax.lax.scan over stacked layer weights, so compiles are short and the HLO
    graphs compact.
  • Weights: safetensors are loaded without torch (np.memmap, ml_dtypes).
  • Shapes: one TPU-specific shape grid (18 lengths up to 3,072 × batches 1–32) with warm-up and the XLA disk cache,
    so serving doesn't recompile.
  • Long prompts: above 3,072 tokens, coarse buckets up to 32k with blocked (online-softmax) attention.
  • Precision: --dtype bfloat16 (default) or float32 (exact mode with HIGHEST-precision matmuls).
  • Selection and benchmarks: --mode tpu is chosen automatically on a TPU VM that has basal[tpu] installed.
  • Not on TPU: evidence spans, --media, early exit, quantisation.

Parity and speed (Colab TPU v5e-1, JAX 0.11.1)

basal-bench, all 44 bundled examples, with transformers fp32 on the CPU as the reference:

model precision 2 orders (mean / p50) dec/s agreement vs fp32 accuracy (fp32 / TPU)
basal-2.0 (4.5B) bf16 16.3 / 15.9 ms 64.7 1.000 0.795 / 0.795
basal-2.0-mini bf16 6.3 / 6.1 ms 188.7 1.000 0.750 / 0.750
basal-2.0-mini fp32 23.1 / 22.8 ms 33.5 1.000 0.750 / 0.750

HTTP (basal-serve defaults, 32 clients): basal-2.0 17.1 ms p50, 59.6 dec/s; mini 7.3 ms p50, 165.5 dec/s.

Identity paths (items from basal/identity.py, each prompt against transformers fp32 alone; 40 readouts per
single path, 60 per request path; prompt p50 1,794 tokens, long states 3.9k–5.7k):

  • fp32 on the TPU (mini): all 8 paths agree 1.000, max |Δp| ≤ 1.7e-5. Packing, batching and blocked attention
    add no error.
  • bf16: 12 of 16 path results agree 1.000. The other four are at 0.975 (three mini paths, one 4.5B path), and
    max |Δp| is 0.01–0.05.
  • The disagreements: each 0.975 is a single flip, always where the fp32 reference's top two options are within
    0.027. With 40 readouts, one flip falls below the 0.999 gate.

basal-2.0-max (11B) doesn't fit in a v5e-1's 16 GB of HBM.

To reproduce on your private development sample:
basal-bench --model Remek/basal-2.0-4.5B --modes eager-fp32 tpu --questions <file>

Docs, tests, notebook

  • Docs:
    • docs/INSTALL.md: TPU install section.
    • docs/SERVING.md: mode row.
    • docs/HARDWARE.md: a draft of the "experimental, community-maintained" section with the numbers above, for you
      to keep, edit or drop.
  • Tests: tests/test_tpu.py has 10 tests. They run on CPU JAX locally and on the TPU when one is present (parity
    vs torch, done= with several roots, bisecting above --max-len, 60 option codes, blocked attention, dtype and
    device errors).
    • Full suite locally: 505 passed, 20 skipped.
    • On the TPU: 83 passed, 4 skipped.
  • Notebook: notebooks/tpu.ipynb is a Colab notebook that installs, runs, serves and benchmarks basal-2.0 on a
    TPU. Colab's TPU image ships torchvision / torchaudio / torch-xla built for torch 2.9, so the notebook uninstalls
    them after the torch upgrade.

Summary by Sourcery

Add experimental JAX/XLA support for running basal 2.0 inference on Google TPUs.

New Features:

  • Add an experimental Google TPU inference backend using JAX/XLA, selectable explicitly or automatically on supported TPU VMs.
  • Support TPU benchmarking with device and peak-memory reporting, including bfloat16 and fp32 modes.

Enhancements:

  • Integrate TPU inference with basal 2.0 shared-prefix execution, streaming callbacks, prompt format 2, context limits, long-prompt attention, calibration, and existing serving options.

Build:

  • Add the optional basal[tpu] dependency extra with pinned JAX TPU support and update the lockfile.

Documentation:

  • Document TPU installation, serving behavior, hardware limitations, performance, and provide a Colab TPU notebook.

Tests:

  • Add CPU-JAX and TPU coverage for parity, packed execution, long prompts, option counts, context errors, callbacks, dtype/device validation, and compilation behavior.

@sourcery-ai

sourcery-ai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR introduces an optional, experimental plain-JAX/XLA TPU backend for basal 2.0, integrates it with the server and benchmark paths using GraphBackend-compatible sharing and streaming semantics, and covers the implementation with CPU-JAX parity tests, TPU documentation, and a Colab workflow.

Sequence diagram for TPU request batching and streaming

sequenceDiagram
    participant Client
    participant Server
    participant TPUBackend
    participant XLA
    participant TPU
    Client->>Server: submit request
    Server->>TPUBackend: run_shared(groups, policy, done)
    TPUBackend->>TPUBackend: _units(groups)
    TPUBackend->>TPUBackend: _chunks(unit lengths)
    TPUBackend->>XLA: _forward_rows(packed rows)
    XLA->>TPU: forward(params, ids, pos, end)
    TPU-->>XLA: hidden states
    XLA-->>TPUBackend: readout logits
    TPUBackend->>TPUBackend: _softmax(option logits)
    TPUBackend-->>Server: done(group, result)
    Server-->>Client: streamed group result
Loading

Flow diagram for TPU compilation and inference

flowchart TD
    Start[Initialize TPUBackend] --> Config[Load Llama config and safetensors]
    Config --> Params[Stack weights and place on device]
    Params --> Shapes[Build length and batch shape grid]
    Shapes --> Warm[Warm up JAX compiled programs]
    Warm --> Request[Receive packed prompt groups]
    Request --> Context{Prompt within max-len?}
    Context -->|no| Reject[Refuse or apply server context overflow]
    Context -->|yes| Bucket[Select length and batch bucket]
    Bucket --> Attention{Prompt above 3072 tokens?}
    Attention -->|no| Dense[Standard causal attention]
    Attention -->|yes| Blocked[Blocked online-softmax attention]
    Dense --> Readout[Read 256 letter slots]
    Blocked --> Readout
    Readout --> Probabilities[Compute option probabilities]
    Probabilities --> Done[Return group result via done callback]
Loading

File-Level Changes

Change Details Files
Adds an experimental JAX/XLA TPU inference backend with optional dependency isolation and automatic TPU selection.
  • Implements safetensors loading without Torch, Llama configuration validation, stacked parameter preparation, JAX layer-scan execution, letter-only readout, and TPU memory/device reporting.
  • Supports bfloat16 and fp32 execution, fixed 256-row option readouts, shape warm-up and compilation caching, and blocked attention for long prompts.
  • Integrates explicit and automatic tpu modes into serving and benchmarking, including dtype, max-length, device-name, memory, and deterministic-mode handling.
  • Review TPU device detection and optional-import behavior carefully: server default-mode detection imports the TPU availability helper even when TPU support is not installed, and the deterministic setup only affects Torch rather than JAX/XLA.
basal/tpu.py
basal/tpu_kernels.py
basal/bench.py
basal/server.py
basal/engine.py
Ports the backend to the basal 2.0 shared-engine and context contracts.
  • Reuses GraphBackend packing and unit/chunk machinery with orders/shared semantics and per-group done callbacks for streaming.
  • Implements prompt-format-2 option handling up to 255 codes without recompiling for new code sets.
  • Propagates --max-len and context metadata, refuses overlong individual prompts, and bisects oversized groups.
  • Review trie subtree masking, group bisecting, readout-to-unit indexing, and shape bucketing for correctness across multiple roots and shared/non-shared execution.
basal/tpu.py
basal/server.py
Adds TPU packaging, documentation, reproducibility material, and validation coverage.
  • Adds the Python 3.12 Linux-only basal[tpu] extra pinned to JAX 0.11.1 and updates the lockfile.
  • Documents installation, supported models/features, limitations, startup compilation/cache behavior, benchmark results, and server mode selection.
  • Adds CPU-JAX and TPU tests covering Torch parity, packed masks, batching, blocked attention, max-length errors, dtype/device validation, callbacks, group bisecting, and many option codes.
  • Provides a Colab notebook for installation, serving, benchmarking, parity checks, and HTTP usage.
pyproject.toml
uv.lock
tests/test_tpu.py
docs/INSTALL.md
docs/SERVING.md
docs/HARDWARE.md
notebooks/tpu.ipynb

Assessment against linked issues

Issue Objective Addressed Explanation
#11 Add an optional JAX/XLA TPU inference backend selectable as --mode tpu, with TPU-aware automatic selection and installation/documentation support. ✅
#11 Implement TPU model execution and selective candidate-token readout, including the specified transformer kernels and prefix-trie/SOAM attention behavior. ✅
#11 Keep TPU inference practical through stacked-layer lax.scan execution, shape bucketing with warmup and compilation caching, and torch-free safetensors weight loading. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="basal/server.py" line_range="73" />
<code_context>
     "gguf": ("gguf", None, False),          # llama.cpp in process on a GGUF file (--gguf; Metal, CUDA or CPU)
     "ollama": ("ollama", None, False),      # Ollama with the GGUF exports (1.5); --ollama-url, --ollama-model
     "llamacpp": ("llamacpp", None, False),  # llama.cpp server with the GGUF exports (1.5); --llamacpp-url
+    "tpu": ("tpu", None, False),            # Google TPU (experimental, basal[tpu]): JAX / XLA, SOAM, one program per shape
 }

</code_context>
<issue_to_address>
**TPU calibration file is ignored**

When a model directory contains a TPU-specific calibration file and the caller does not pass `--calibration` explicitly, `calibration_name` does not recognize the newly registered `tpu` kind, so `calibration_file` falls back to `CALIBRATION.json` even when the model provides `CALIBRATION.tpu.json`; the TPU then serves with the wrong calibration.

Include `tpu` in the per-engine calibration-name selection and cover it with a calibration-file selection test.
</issue_to_address>

### Comment 2
<location path="basal/server.py" line_range="89-90" />
<code_context>
             return "mlx"
         except ImportError:
             return "mps"
+    from .tpu import tpu_available
+    if tpu_available():
+        return "tpu"
     return "eager"
</code_context>
<issue_to_address>
**Broken JAX prevents CPU startup**

When JAX is discoverable but fails to import or initialize on a machine that would otherwise use eager mode, `default_mode()` calls `tpu_available()`, whose `import jax` is not guarded; when JAX is present but fails during import, the exception escapes and prevents the server from falling back to eager on a non-TPU machine.

Treat JAX import and initialization failures as TPU unavailable in the default-mode probe, while leaving explicit `--mode tpu` errors visible.

Also at `basal/tpu.py:162`.
</issue_to_address>

### Comment 3
<location path="basal/tpu.py" line_range="243-246" />
<code_context>
+            for b in self.BATCHES:
+                if b * L <= self.TOKEN_BUDGET or b == 1:
+                    self._forward_rows([([0] * L, list(range(L)), [0] * L, [L - 1] * R0, [-1])] * b, b, L)
+            h = jnp.zeros((1, L, self.cfg["hidden"]), self.params["embed"].dtype, device=self.device)
+            R = 4
+            while R <= self.WARM_READOUTS:
+                self._read(self.params, h, np.zeros(R, np.int32), np.zeros(R, np.int32), self._lids)
+                R *= 2
+
</code_context>
<issue_to_address>
**Requests stall for JIT compilation**

When a request uses a batch size greater than one, rounds to two readouts, or needs more than 64 readouts, `_warm` compiles `_read` only for batch size 1 and readout counts from 4 through 64, while `_forward_rows` uses the actual batch size and rounds readouts to powers of two. JAX compiles the missing shape during serving, so the request stalls.

Warm `_read` for the batch sizes and padded readout counts that requests can use, including 2 and counts above 64.

Also at `basal/tpu.py:249`, `basal/tpu.py:285`.
</issue_to_address>

### Comment 4
<location path="basal/bench.py" line_range="45-47" />
<code_context>
         if not path:
             raise SystemExit("mode gguf needs --gguf <file.gguf> (or gguf@<file.gguf>)")
         return GGUFBackend(md, path)
+    if mode in ("tpu", "tpu-fp32"):  # Google TPU (basal[tpu]); tpu-fp32: the same engine in fp32 (parity reference)
+        from .tpu import TPUBackend
+        return TPUBackend(md, "float32" if mode == "tpu-fp32" else "bfloat16", warm=False)
     kind, quant, comp = MODES[mode]
     if kind == "eager":
</code_context>
<issue_to_address>
**Default benchmark skips TPU**

When `basal-bench` is run without `--modes` on a TPU VM, `default_modes()` does not use TPU availability when choosing its default modes, so `basal-bench` without `--modes` selects the non-TPU fallback instead of benchmarking the serving default on a TPU VM.

Have `default_modes()` include TPU detection, preferably by sharing the serving default-mode selection logic.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread basal/server.py Resolved
Comment thread basal/server.py Resolved
Comment thread basal/tpu.py Resolved
Comment thread basal/bench.py Resolved
@rkinas

rkinas commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Thanks, clean port, and the parity table is exactly what I need. We'll merge after 2.2.0 (Mon 19 Oct) as an experimental, community-maintained backend. Before that: (1) rebase onto v2.2.0; (2) a line on why tests/test_calibration2.py changes; (3) add yourself to CODEOWNERS for basal/tpu*.py and tests/test_tpu.py; (4) in HARDWARE.md, the bf16 flip rate on a larger public sample (~2,000 rows) next to the 44-example table.

@rkinas

rkinas commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Ok. I am merging it now. It will be in 2.2. Than you for your contribution.

@rkinas
rkinas merged commit 5167f14 into rkinas:main Oct 19, 2026
1 check passed
rkinas added a commit that referenced this pull request Oct 19, 2026
…els (#14, @kardysm)

Conflicts with --mode tpu (#15): both modes in DETERMINISTIC_KINDS, its message and basal-bench --modes help; HARDWARE.md keeps both sections (AMD Strix Halo, then Google TPU).
rkinas added a commit that referenced this pull request Oct 19, 2026
One line per external contributor whose commits are in main or in 2.2, with what they added and the PR: Paweł Kiszczak (#4), Piotr Durlej (#8), Kuba Sołtys (#15), Michał Kardyś (#14); names from their GitHub profiles and commit authors. README and WHATS_NEW 2.2 list basal-export-gguf, --mode tpu and --mode strix; NOTICE names the contributors.
@rkinas

rkinas commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Thank you, Kuba! The TPU backend is merged and ships in basal v2.2.0
(https://github.com/rkinas/basal/releases/tag/v2.2.0) as --mode tpu (extra basal[tpu]), marked experimental and
community-maintained, with your commits exactly as you wrote them. A clean port: one lax.scan over stacked layers,
the prefix trie as subtree ends, and tests that run on CPU JAX and on a TPU.

What we added on top:

  • merged it with the 2.2.0 engine: calibration_name now lists both gguf (new in 2.2.0) and tpu, and uv.lock
    was regenerated with uv 0.10.9. uv export of the default install and of every existing extra is unchanged; the
    tpu extra adds jax, jaxlib, libtpu and opt-einsum;
  • the default-mode probe imports JAX only when libtpu is installed too. Before, a CPU-only start imported (and
    initialised) any JAX that happened to be installed for something else. A TPU VM with basal[tpu] still picks
    --mode tpu. One new test;
  • docs: HARDWARE.md names you as the contributor and maintainer and says that every number in the section is your
    measurement on a Colab TPU v5e-1 (we have no TPU to reproduce them); your tables and the bf16 near-tie sentence are
    unchanged. INSTALL.md installs basal[tpu] from v2.2.0. You are in the README's new "Contributors" section.

Here, tests/test_tpu.py passes 13/13 on CPU JAX 0.11.1 (macOS and Linux), with the full suite green. We could not run
on a TPU; if you have a moment to rerun notebooks/tpu.ipynb at v2.2.0, that would close the loop.

If you'd like, we'd be glad to list you in CODEOWNERS for basal/tpu.py, basal/tpu_kernels.py, tests/test_tpu.py
and notebooks/tpu.ipynb, so that changes there come to you for review. Entirely optional: just say so here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add Cloud TPU backend via JAX/XLA (--mode tpu)

2 participants