wgblas 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +36 -54
- package/dist/wgblas.browser.js +779 -34
- package/index.d.mts +13 -0
- package/index.mjs +8 -0
- package/package.json +56 -3
- package/src/dasum/dasum.d.mts +2 -2
- package/src/dasum/dasum.mjs +6 -4
- package/src/idamax/idamax.d.mts +51 -0
- package/src/idamax/idamax.mjs +128 -0
- package/src/init.mjs +9 -1
- package/src/isamax/isamax.d.mts +1 -1
- package/src/sasum/sasum.d.mts +1 -1
- package/src/saxpy/saxpy.d.mts +1 -1
- package/src/scopy/scopy.d.mts +1 -1
- package/src/sdot/sdot.d.mts +1 -1
- package/src/sgemm/sgemm.d.mts +102 -0
- package/src/sgemm/sgemm.mjs +195 -0
- package/src/sgemmtr/sgemmtr.d.mts +104 -0
- package/src/sgemmtr/sgemmtr.mjs +203 -0
- package/src/sgemv/sgemv.d.mts +1 -38
- package/src/sgemv/sgemv.mjs +4 -0
- package/src/sger/sger.d.mts +1 -34
- package/src/sger/sger.mjs +2 -0
- package/src/shaders/block_transfer.wgsl +42 -0
- package/src/shaders/browser-shaders.mjs +26 -0
- package/src/shaders/dasum.wgsl +3 -2
- package/src/shaders/f64/dekker.wgsl +4 -85
- package/src/shaders/f64/utils/abs.wgsl +10 -0
- package/src/shaders/f64/utils/add.wgsl +77 -0
- package/src/shaders/f64/utils/equal.wgsl +7 -0
- package/src/shaders/f64/utils/greater.wgsl +12 -0
- package/src/shaders/f64/utils/multiply.wgsl +81 -0
- package/src/shaders/idamax.wgsl +96 -0
- package/src/shaders/reduction/argmaxF64.wgsl +50 -0
- package/src/shaders/reduction/sumF64.wgsl +2 -2
- package/src/shaders/sgemm_large.wgsl +117 -0
- package/src/shaders/sgemm_small.wgsl +112 -0
- package/src/shaders/sgemmtr_large.wgsl +117 -0
- package/src/shaders/sgemmtr_small.wgsl +110 -0
- package/src/shaders/symmetrize.wgsl +31 -0
- package/src/shaders/triangularize.wgsl +44 -0
- package/src/snrm2/snrm2.d.mts +1 -1
- package/src/srot/srot.d.mts +1 -1
- package/src/srotm/srotm.d.mts +1 -1
- package/src/sscal/sscal.d.mts +1 -1
- package/src/sswap/sswap.d.mts +1 -1
- package/src/ssymm/ssymm.d.mts +103 -0
- package/src/ssymm/ssymm.mjs +209 -0
- package/src/ssymv/ssymv.d.mts +1 -36
- package/src/ssymv/ssymv.mjs +2 -0
- package/src/ssyr/ssyr.d.mts +1 -30
- package/src/ssyr/ssyr.mjs +2 -0
- package/src/ssyr2/ssyr2.d.mts +1 -34
- package/src/ssyr2/ssyr2.mjs +2 -0
- package/src/ssyr2k/ssyr2k.d.mts +100 -0
- package/src/ssyr2k/ssyr2k.mjs +201 -0
- package/src/ssyrk/ssyrk.d.mts +90 -0
- package/src/ssyrk/ssyrk.mjs +176 -0
- package/src/strmm/strmm.d.mts +100 -0
- package/src/strmm/strmm.mjs +211 -0
- package/src/strmv/strmv.d.mts +1 -36
- package/src/strmv/strmv.mjs +2 -0
- package/src/strsm/strsm.d.mts +99 -0
- package/src/strsm/strsm.mjs +342 -0
- package/src/strsv/strsv.d.mts +1 -32
- package/src/strsv/strsv.mjs +2 -0
- package/src/util/buffer.mjs +4 -2
- package/src/util/compute.mjs +6 -3
- package/src/util/f64.mjs +3 -3
package/LICENSE
CHANGED
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright [2026] [
|
|
189
|
+
Copyright [2026] [Manit Roy]
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
package/README.md
CHANGED
|
@@ -1,60 +1,8 @@
|
|
|
1
1
|
# wgblas
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Available Functions
|
|
6
|
-
|
|
7
|
-
- [sscal](https://manit2004.github.io/wgblas/functions/docs.sscal.html)
|
|
8
|
-
- [sswap](https://manit2004.github.io/wgblas/functions/docs.sswap.html)
|
|
9
|
-
- [saxpy](https://manit2004.github.io/wgblas/functions/docs.saxpy.html)
|
|
10
|
-
- [scopy](https://manit2004.github.io/wgblas/functions/docs.scopy.html)
|
|
11
|
-
- [sdot](https://manit2004.github.io/wgblas/functions/docs.sdot.html)
|
|
12
|
-
- [sasum](https://manit2004.github.io/wgblas/functions/docs.sasum.html)
|
|
13
|
-
- [snrm2](https://manit2004.github.io/wgblas/functions/docs.snrm2.html)
|
|
14
|
-
- [isamax](https://manit2004.github.io/wgblas/functions/docs.isamax.html)
|
|
15
|
-
- [srot](https://manit2004.github.io/wgblas/functions/docs.srot.html)
|
|
16
|
-
- [srotm](https://manit2004.github.io/wgblas/functions/docs.srotm.html)
|
|
17
|
-
- [sgemv](https://manit2004.github.io/wgblas/functions/docs.sgemv.html)
|
|
18
|
-
- [ssymv](https://manit2004.github.io/wgblas/functions/docs.ssymv.html)
|
|
19
|
-
- [strmv](https://manit2004.github.io/wgblas/functions/docs.strmv.html)
|
|
20
|
-
- [strsv](https://manit2004.github.io/wgblas/functions/docs.strsv.html)
|
|
21
|
-
- [sger](https://manit2004.github.io/wgblas/functions/docs.sger.html)
|
|
22
|
-
- [ssyr](https://manit2004.github.io/wgblas/functions/docs.ssyr.html)
|
|
23
|
-
- [ssyr2](https://manit2004.github.io/wgblas/functions/docs.ssyr2.html)
|
|
24
|
-
|
|
25
|
-
## Browser Support
|
|
3
|
+
[](https://github.com/manit2004/wgblas/actions/workflows/test-gpu.yml)
|
|
26
4
|
|
|
27
|
-
wgblas
|
|
28
|
-
|
|
29
|
-
### Chrome (recommended)
|
|
30
|
-
|
|
31
|
-
For full WebGPU control, enable all three flags at `chrome://flags` and relaunch:
|
|
32
|
-
|
|
33
|
-
| Flag | What it does |
|
|
34
|
-
|------|--------------|
|
|
35
|
-
| `#enable-unsafe-webgpu` | Enables WebGPU |
|
|
36
|
-
| `#force-enable-webgpu-interop` | Uses the real GPU via Vulkan (Linux) — without this Chrome may fall back to SwiftShader, a CPU-based software renderer |
|
|
37
|
-
| `#enable-webgpu-developer-features` | Unlocks additional GPU features |
|
|
38
|
-
|
|
39
|
-
You can verify which GPU is being used at [webgpureport.org](https://webgpureport.org) — if the adapter name shows **SwiftShader**, the real GPU is not being used.
|
|
40
|
-
|
|
41
|
-
### Firefox
|
|
42
|
-
|
|
43
|
-
WebGPU must be enabled manually via `about:config`. Search for each preference and set it:
|
|
44
|
-
|
|
45
|
-
| Preference | Value | What it does |
|
|
46
|
-
|------------|-------|--------------|
|
|
47
|
-
| `dom.webgpu.enabled` | `true` | Enables WebGPU |
|
|
48
|
-
| `dom.webgpu.wgpu-backend` | `vulkan` | Forces the real GPU via Vulkan — without this Firefox may use a software renderer |
|
|
49
|
-
| `gfx.webgpu.ignore-blocklist` | `true` | Bypasses the GPU blocklist |
|
|
50
|
-
|
|
51
|
-
Note: `dom.webgpu.wgpu-backend` is a **string** preference — click the pencil icon to edit it and type `vulkan`.
|
|
52
|
-
|
|
53
|
-
Restart Firefox after making changes.
|
|
54
|
-
|
|
55
|
-
> **Note:** Firefox's WebGPU implementation is incomplete and some routines may not work correctly. Chrome is recommended.
|
|
56
|
-
>
|
|
57
|
-
> **Multi-GPU:** Firefox only exposes one WebGPU adapter (the display GPU, typically integrated) even on dual-GPU systems — verified via `about:support` → Graphics → WebGPU Default Adapter. Chrome picks the discrete GPU via `powerPreference: "high-performance"`; Firefox does not.
|
|
5
|
+
`wgblas` implements all the standard single-precision level 1, 2, and 3 BLAS routines on top of WebGPU. Next up: double-precision routines, and single- and double-precision complex routines.
|
|
58
6
|
|
|
59
7
|
## Requirements
|
|
60
8
|
|
|
@@ -162,3 +110,37 @@ yGpu.destroy();
|
|
|
162
110
|
|
|
163
111
|
cleanup();
|
|
164
112
|
```
|
|
113
|
+
|
|
114
|
+
## Browser Support
|
|
115
|
+
|
|
116
|
+
wgblas runs in any browser with WebGPU enabled. Check if it's working in your browser at [webgpureport.org](https://webgpureport.org).
|
|
117
|
+
|
|
118
|
+
### Chrome (recommended)
|
|
119
|
+
|
|
120
|
+
For full WebGPU control, enable all three flags at `chrome://flags` and relaunch:
|
|
121
|
+
|
|
122
|
+
| Flag | What it does |
|
|
123
|
+
|------|--------------|
|
|
124
|
+
| `#enable-unsafe-webgpu` | Enables WebGPU |
|
|
125
|
+
| `#force-enable-webgpu-interop` | Uses the real GPU via Vulkan (Linux) — without this Chrome may fall back to SwiftShader, a CPU-based software renderer |
|
|
126
|
+
| `#enable-webgpu-developer-features` | Unlocks additional GPU features |
|
|
127
|
+
|
|
128
|
+
You can verify which GPU is being used at [webgpureport.org](https://webgpureport.org) — if the adapter name shows **SwiftShader**, the real GPU is not being used.
|
|
129
|
+
|
|
130
|
+
### Firefox
|
|
131
|
+
|
|
132
|
+
WebGPU must be enabled manually via `about:config`. Search for each preference and set it:
|
|
133
|
+
|
|
134
|
+
| Preference | Value | What it does |
|
|
135
|
+
|------------|-------|--------------|
|
|
136
|
+
| `dom.webgpu.enabled` | `true` | Enables WebGPU |
|
|
137
|
+
| `dom.webgpu.wgpu-backend` | `vulkan` | Forces the real GPU via Vulkan — without this Firefox may use a software renderer |
|
|
138
|
+
| `gfx.webgpu.ignore-blocklist` | `true` | Bypasses the GPU blocklist |
|
|
139
|
+
|
|
140
|
+
Note: `dom.webgpu.wgpu-backend` is a **string** preference — click the pencil icon to edit it and type `vulkan`.
|
|
141
|
+
|
|
142
|
+
Restart Firefox after making changes.
|
|
143
|
+
|
|
144
|
+
> **Note:** Firefox's WebGPU implementation is incomplete and some routines may not work correctly. Chrome is recommended.
|
|
145
|
+
>
|
|
146
|
+
> **Multi-GPU:** Firefox only exposes one WebGPU adapter (the display GPU, typically integrated) even on dual-GPU systems — verified via `about:support` → Graphics → WebGPU Default Adapter. Chrome picks the discrete GPU via `powerPreference: "high-performance"`; Firefox does not.
|