File size: 5,712 Bytes
7e173d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>drAIML WebGPU Helper</title>
<style>
  :root { --bg:#fbfaf7; --fg:#1d1d1b; --mut:#66645e; --line:#e3e0d8; --card:#fff; --ok:#1f7a4d; --warn:#a15c00; --bad:#a32222; --acc:#7a3fd0; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg:#16161a; --fg:#ecebe6; --mut:#a3a19a; --line:#2c2c33; --card:#1e1e24; --ok:#4cc38a; --warn:#e6a23c; --bad:#ef6b6b; --acc:#b38cff; } }
  :root[data-theme="dark"] { --bg:#16161a; --fg:#ecebe6; --mut:#a3a19a; --line:#2c2c33; --card:#1e1e24; --ok:#4cc38a; --warn:#e6a23c; --bad:#ef6b6b; --acc:#b38cff; }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; min-width: 360px; }
  main { max-width: 640px; margin: 0 auto; padding: 16px; }
  header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
  header img { width: 28px; height: 28px; }
  header h1 { font-size: 15px; margin: 0; }
  header small { color: var(--mut); display: block; font-weight: 400; }
  .verdict { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 12px 14px; border-left: 5px solid var(--mut); }
  .verdict[data-v="ready"] { border-left-color: var(--ok); }
  .verdict[data-v="software"], .verdict[data-v="no-adapter"] { border-left-color: var(--warn); }
  .verdict[data-v="missing"], .verdict[data-v="broken"] { border-left-color: var(--bad); }
  .verdict h2 { font-size: 15px; margin: 0 0 4px; }
  .verdict p { margin: 0; color: var(--mut); }
  ol { padding-left: 20px; margin: 12px 0; }
  li { margin: 0 0 8px; }
  button, .btn { font: inherit; border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 7px; padding: 4px 10px; cursor: pointer; }
  button.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
  code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; word-break: break-all; }
  .step-actions { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
  .row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
  details { margin-top: 12px; }
  summary { cursor: pointer; color: var(--mut); }
  pre { font: 11px ui-monospace, monospace; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px; overflow: auto; max-height: 260px; }
  .mut { color: var(--mut); font-size: 12px; }
  a { color: var(--acc); }
  .get { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 8px; }
  .get h2 { font-size: 15px; }
  .get li { margin-bottom: 6px; }
</style>
</head>
<body>
<main>
  <header>
    <img src="extension/icons/icon48.png" alt="" />
    <h1>drAIML WebGPU helper <small>Can this browser use your graphics card? The check below runs right here.</small></h1>
  </header>
  <div class="verdict" id="verdict" data-v="checking"><h2 id="title">Checking WebGPU…</h2><p id="summary">Asking the browser for a graphics adapter.</p></div>
  <ol id="steps"></ol>
  <div class="row">
    <button class="primary" id="again">Check again</button>
    <button id="copy">Copy report</button>
    <a class="btn" id="draiml" href="https://huggingface.co/spaces/PYTHAI/drAIML" target="_blank" rel="noopener">Open drAIML</a>
  </div>
  <details><summary>Details</summary><pre id="report">…</pre></details>
  <section class="get">
    <h2>Get the helper</h2>
    <p><b>Browser extension</b> (Chrome, Brave, Edge, Vivaldi, Opera, Firefox): a toolbar button that runs this check, shows the result
      as a badge, and opens the right flag pages in one click. It reads nothing from the sites you visit; on drAIML it only tells the
      donation panel it is installed.</p>
    <ul>
      <li><a href="draiml-webgpu-helper-0.1.0.zip" download>draiml-webgpu-helper-0.1.0.zip</a> · unzip it, then:
        <ul>
          <li>Chrome, Brave, Edge, Vivaldi, Opera: open <code>chrome://extensions</code>, switch on <i>Developer mode</i>, choose <i>Load unpacked</i>, pick the unzipped folder.</li>
          <li>Firefox: open <code>about:debugging#/runtime/this-firefox</code>, choose <i>Load Temporary Add-on</i>, pick <code>manifest.json</code>. It stays until Firefox restarts.</li>
        </ul></li>
    </ul>
    <p><b>Installer</b>: switches WebGPU on for every browser on this computer, as chrome://flags or about:config would. Nothing is
      downloaded or installed into the system; close the browsers first. <code>--undo</code> removes exactly what it added.</p>
    <ul>
      <li>Linux, macOS: <a href="installer/webgpu-enable.sh" download>webgpu-enable.sh</a> · <code>bash webgpu-enable.sh --dry-run</code>, then <code>bash webgpu-enable.sh</code> (add <code>--firefox</code> for Firefox)</li>
      <li>Windows: <a href="installer/webgpu-enable.ps1" download>webgpu-enable.ps1</a> · <code>powershell -ExecutionPolicy Bypass -File webgpu-enable.ps1 -DryRun</code>, then without <code>-DryRun</code></li>
    </ul>
    <p class="mut">The “Unsafe WebGPU Support” flag lets every site use WebGPU, not only drAIML; that is what it means by unsafe. Undo
      it any time in chrome://flags or with the installer's undo. Without WebGPU, drAIML still works: Bonsai runs on the processor.</p>
  </section>
  <p class="mut">Runs only in this browser. Nothing is sent anywhere. The test runs one small shader over 65,536 numbers and checks every result.</p>
</main>
<script type="module" src="extension/popup.js"></script>
</body>
</html>