@jax-js/jax 0.0.1 → 0.0.3
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/README.md +21 -15
- package/dist/backend-BqDtPGaR.js +3673 -0
- package/dist/backend-D2C4MJRP.cjs +3937 -0
- package/dist/chunk-Cl8Af3a2.js +11 -0
- package/dist/index.cjs +4705 -6069
- package/dist/index.d.cts +1110 -665
- package/dist/index.d.ts +1107 -665
- package/dist/index.js +4605 -3474
- package/dist/webgpu-CNg9JGva.js +612 -0
- package/dist/webgpu-fqhx41TC.cjs +612 -0
- package/package.json +30 -24
- package/dist/chunk-B2GFURUN.js +0 -1978
- package/dist/webgpu-QNXDOQZP.js +0 -559
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# jax-js: JAX in pure JavaScript
|
|
2
2
|
|
|
3
|
-
[Website](https://www.ekzhang.com/jax-js/)
|
|
3
|
+
[Website](https://www.ekzhang.com/jax-js/) | [API Reference](https://www.ekzhang.com/jax-js/docs/)
|
|
4
4
|
|
|
5
5
|
This is a machine learning framework for the browser. It aims to bring JAX-style, high-performance
|
|
6
6
|
CPU and GPU kernels to JavaScript, so you can run numerical applications on the web.
|
|
@@ -55,20 +55,24 @@ const y = np.dot(x.ref, x); // JIT-compiled into a matrix multiplication kernel
|
|
|
55
55
|
Under construction.
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
pnpm install
|
|
59
|
+
pnpm run build:watch
|
|
60
|
+
|
|
61
|
+
# Run tests
|
|
62
|
+
pnpm exec playwright install
|
|
63
|
+
pnpm test
|
|
61
64
|
```
|
|
62
65
|
|
|
63
66
|
## Next on Eric's mind
|
|
64
67
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
68
|
+
- Finish CLIP inference demo and associated features (depthwise convolution, vmap of gather, etc.)
|
|
69
|
+
- Fix jit-of-grad returning very incorrect result
|
|
70
|
+
- Improve perf of MNIST neural network
|
|
71
|
+
- Optimize conv2d further (maybe blocks -> local dims?)
|
|
72
|
+
- Add fused epilogue to JIT
|
|
73
|
+
- Reduce kernel overhead of constants / inline expressions
|
|
67
74
|
- Investigate why jax-js Matmul is 2x slower on Safari TP than unroll kernel
|
|
68
75
|
- How many threads to create per workgroup, depends on hardware
|
|
69
|
-
- Need to break up kernel dispatches if workgroup count exceeds 65536
|
|
70
|
-
- Think about two-stage `cumsum()`
|
|
71
|
-
- Frontend transformations need to match backend type for pureArray() and zeros() calls
|
|
72
76
|
|
|
73
77
|
## Milestones
|
|
74
78
|
|
|
@@ -88,15 +92,17 @@ npm test
|
|
|
88
92
|
- [x] `jit()` support via Jaxprs and kernel fusion
|
|
89
93
|
- [x] We figure out the `dispose()` / refcount / linear types stuff
|
|
90
94
|
- [ ] `dispose()` for saved "const" tracers in Jaxprs
|
|
91
|
-
- [ ] Garbage collection for JIT programs
|
|
95
|
+
- [ ] Garbage collection for JIT programs
|
|
92
96
|
- [ ] Memory scheduling, buffer allocation (can be tricky)
|
|
93
97
|
- [ ] Demos: Navier-Stokes, neural networks, statistics
|
|
94
|
-
- [
|
|
95
|
-
- [
|
|
96
|
-
- [
|
|
97
|
-
- [
|
|
98
|
-
- [
|
|
98
|
+
- [x] Features for neural networks
|
|
99
|
+
- [x] Convolution
|
|
100
|
+
- [x] Random and initializers
|
|
101
|
+
- [x] Optimizers (optax package?)
|
|
102
|
+
- [x] Wasm backend (needs malloc)
|
|
103
|
+
- [x] Better memory allocation that frees buffers
|
|
99
104
|
- [ ] SIMD support for Wasm backend
|
|
105
|
+
- [ ] Async / multithreading Wasm support
|
|
100
106
|
- [ ] Device switching with `.to()` between webgpu/cpu/wasm
|
|
101
107
|
- [ ] numpy/jax API compatibility table
|
|
102
108
|
- [ ] Import tfjs models
|