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
11 changes: 11 additions & 0 deletions web/e2e/smoke.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ test.describe("Compiler Explorer smoke", () => {
await expect(page.getByText("bit-exact").first()).toBeVisible();
});

test("the tiny-tpu tab shows the array, cycle by cycle, from the RTL trace", async ({ page }) => {
await page.goto("/app");
await page.getByRole("button", { name: "Compile & run" }).click();
await expect(page.getByText("bit-exact").first()).toBeVisible({ timeout: 150_000 });
await page.getByRole("tab", { name: "tiny-tpu" }).click();
await expect(page.getByRole("img", { name: /^PE\[0\]\[0\] / }).first()).toBeVisible();
await expect(page.getByText(/cycle 0 \/ \d+ · IDLE|cycle 0 \/ \d+ · LOAD_WEIGHTS/)).toBeVisible();
await page.getByRole("button", { name: "pass 2" }).click();
await expect(page.getByText(/cycle 0 \/ \d+/)).toBeVisible();
});

test("a rejected program is shown as an error, not a crash", async ({ page }) => {
await page.goto("/app");
await page.getByLabel("source").fill("input A : i8[2, 2]\nC = A @ A +\noutput C\n");
Expand Down
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"dependencies": {
"@astrojs/react": "^4.0.0",
"astro": "^5.0.0",
"framer-motion": "^12.43.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
38 changes: 38 additions & 0 deletions web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion web/src/components/Explorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useMemo, useState } from "react";
import { analyze } from "../lib/compiler";
import { EXAMPLES } from "../lib/examples.generated";
import { runTpu, type TpuRun } from "../lib/tpu";
import TpuSchedule from "./TpuSchedule";
import { tpuExact } from "../lib/verify";
import type { Analysis, GpuRun } from "../lib/types";

Expand Down Expand Up @@ -184,6 +185,12 @@ export default function Explorer() {
(estimate)
</p>
<Code>{analysis.tpu.tile ?? ""}</Code>
<h3 style={{ fontSize: 15, marginTop: 16 }}>Array, cycle by cycle</h3>
{tpuRun ? (
<TpuSchedule run={tpuRun} />
) : (
<p className="muted">{tpuError ?? "Running on the tiny-tpu RTL…"}</p>
)}
</>
)}
</>
Expand Down Expand Up @@ -269,7 +276,7 @@ function Compare({
<tr>
<td>cycles</td>
<td>{gpuRun ? `${gpuRun.cycles}` : "—"}</td>
<td>{tpuRun ? `${tpuRun.totalCycles} (${tpuRun.passes} pass${tpuRun.passes === 1 ? "" : "es"} × 15)` : "—"}</td>
<td>{tpuRun ? `${tpuRun.totalCycles} (${tpuRun.passes.length} pass${tpuRun.passes.length === 1 ? "" : "es"})` : "—"}</td>
</tr>
<tr>
<td>instructions</td>
Expand Down
Loading
Loading