@graphty/webgpu-graph-algorithms 0.6.14 → 0.6.16
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 +52 -52
- package/dist/browser.js +1 -1
- package/dist/chunks/{context-Bi6AhScG.js → context-VIvatQOo.js} +69 -34
- package/dist/chunks/context-VIvatQOo.js.map +1 -0
- package/dist/node.js +1 -1
- package/dist/src/accelerator.d.ts +5 -3
- package/dist/src/accelerator.d.ts.map +1 -1
- package/dist/src/accelerator.js +101 -5
- package/dist/src/accelerator.js.map +1 -1
- package/dist/src/algorithms/all-pairs.d.ts +41 -0
- package/dist/src/algorithms/all-pairs.d.ts.map +1 -0
- package/dist/src/algorithms/all-pairs.js +181 -0
- package/dist/src/algorithms/all-pairs.js.map +1 -0
- package/dist/src/algorithms/betweenness.d.ts +70 -0
- package/dist/src/algorithms/betweenness.d.ts.map +1 -0
- package/dist/src/algorithms/betweenness.js +538 -0
- package/dist/src/algorithms/betweenness.js.map +1 -0
- package/dist/src/algorithms/closeness.d.ts +15 -5
- package/dist/src/algorithms/closeness.d.ts.map +1 -1
- package/dist/src/algorithms/closeness.js +112 -26
- package/dist/src/algorithms/closeness.js.map +1 -1
- package/dist/src/algorithms/components.d.ts +9 -1
- package/dist/src/algorithms/components.d.ts.map +1 -1
- package/dist/src/algorithms/components.js +2 -2
- package/dist/src/algorithms/components.js.map +1 -1
- package/dist/src/algorithms/label-propagation.d.ts +31 -0
- package/dist/src/algorithms/label-propagation.d.ts.map +1 -0
- package/dist/src/algorithms/label-propagation.js +254 -0
- package/dist/src/algorithms/label-propagation.js.map +1 -0
- package/dist/src/algorithms/simple-symmetric.d.ts +88 -0
- package/dist/src/algorithms/simple-symmetric.d.ts.map +1 -0
- package/dist/src/algorithms/simple-symmetric.js +347 -0
- package/dist/src/algorithms/simple-symmetric.js.map +1 -0
- package/dist/src/algorithms/triangles.d.ts +34 -0
- package/dist/src/algorithms/triangles.d.ts.map +1 -0
- package/dist/src/algorithms/triangles.js +203 -0
- package/dist/src/algorithms/triangles.js.map +1 -0
- package/dist/src/constants.d.ts +53 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.js +53 -0
- package/dist/src/constants.js.map +1 -1
- package/dist/src/index.d.ts +12 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/kernel/prelude.d.ts.map +1 -1
- package/dist/src/kernel/prelude.js +4 -1
- package/dist/src/kernel/prelude.js.map +1 -1
- package/dist/src/kernels.d.ts +24 -6
- package/dist/src/kernels.d.ts.map +1 -1
- package/dist/src/kernels.js +373 -7
- package/dist/src/kernels.js.map +1 -1
- package/dist/src/memory/residency.js +15 -4
- package/dist/src/memory/residency.js.map +1 -1
- package/dist/src/primitives/coo-to-csr.d.ts +73 -0
- package/dist/src/primitives/coo-to-csr.d.ts.map +1 -0
- package/dist/src/primitives/coo-to-csr.js +183 -0
- package/dist/src/primitives/coo-to-csr.js.map +1 -0
- package/dist/src/primitives/frontier.d.ts +2 -0
- package/dist/src/primitives/frontier.d.ts.map +1 -1
- package/dist/src/primitives/frontier.js +2 -0
- package/dist/src/primitives/frontier.js.map +1 -1
- package/dist/src/primitives/group-by-key.d.ts +82 -0
- package/dist/src/primitives/group-by-key.d.ts.map +1 -0
- package/dist/src/primitives/group-by-key.js +147 -0
- package/dist/src/primitives/group-by-key.js.map +1 -0
- package/dist/src/types/accelerator.d.ts +19 -7
- package/dist/src/types/accelerator.d.ts.map +1 -1
- package/dist/src/types/algorithms.d.ts +4 -0
- package/dist/src/types/algorithms.d.ts.map +1 -1
- package/dist/src/types/all-pairs.d.ts +35 -0
- package/dist/src/types/all-pairs.d.ts.map +1 -0
- package/dist/src/types/all-pairs.js +8 -0
- package/dist/src/types/all-pairs.js.map +1 -0
- package/dist/src/types/betweenness.d.ts +35 -0
- package/dist/src/types/betweenness.d.ts.map +1 -0
- package/dist/src/types/betweenness.js +7 -0
- package/dist/src/types/betweenness.js.map +1 -0
- package/dist/src/types/community.d.ts +18 -0
- package/dist/src/types/community.d.ts.map +1 -0
- package/dist/src/types/community.js +5 -0
- package/dist/src/types/community.js.map +1 -0
- package/dist/src/types/structure.d.ts +27 -0
- package/dist/src/types/structure.d.ts.map +1 -0
- package/dist/src/types/structure.js +8 -0
- package/dist/src/types/structure.js.map +1 -0
- package/dist/src/wgsl/apsp-fw.wgsl.d.ts +25 -0
- package/dist/src/wgsl/apsp-fw.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/apsp-fw.wgsl.js +113 -0
- package/dist/src/wgsl/apsp-fw.wgsl.js.map +1 -0
- package/dist/src/wgsl/apsp-init.wgsl.d.ts +12 -0
- package/dist/src/wgsl/apsp-init.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/apsp-init.wgsl.js +26 -0
- package/dist/src/wgsl/apsp-init.wgsl.js.map +1 -0
- package/dist/src/wgsl/bc-backward.wgsl.d.ts +15 -0
- package/dist/src/wgsl/bc-backward.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/bc-backward.wgsl.js +34 -0
- package/dist/src/wgsl/bc-backward.wgsl.js.map +1 -0
- package/dist/src/wgsl/bc-edge-gather.wgsl.d.ts +12 -0
- package/dist/src/wgsl/bc-edge-gather.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/bc-edge-gather.wgsl.js +36 -0
- package/dist/src/wgsl/bc-edge-gather.wgsl.js.map +1 -0
- package/dist/src/wgsl/bc-finalize.wgsl.d.ts +21 -0
- package/dist/src/wgsl/bc-finalize.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/bc-finalize.wgsl.js +47 -0
- package/dist/src/wgsl/bc-finalize.wgsl.js.map +1 -0
- package/dist/src/wgsl/bc-forward-edge.wgsl.d.ts +15 -0
- package/dist/src/wgsl/bc-forward-edge.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/bc-forward-edge.wgsl.js +76 -0
- package/dist/src/wgsl/bc-forward-edge.wgsl.js.map +1 -0
- package/dist/src/wgsl/bc-forward.wgsl.d.ts +23 -0
- package/dist/src/wgsl/bc-forward.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/bc-forward.wgsl.js +106 -0
- package/dist/src/wgsl/bc-forward.wgsl.js.map +1 -0
- package/dist/src/wgsl/bc-gather.wgsl.d.ts +9 -0
- package/dist/src/wgsl/bc-gather.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/bc-gather.wgsl.js +20 -0
- package/dist/src/wgsl/bc-gather.wgsl.js.map +1 -0
- package/dist/src/wgsl/closeness-reduce.wgsl.d.ts +4 -1
- package/dist/src/wgsl/closeness-reduce.wgsl.d.ts.map +1 -1
- package/dist/src/wgsl/closeness-reduce.wgsl.js +8 -4
- package/dist/src/wgsl/closeness-reduce.wgsl.js.map +1 -1
- package/dist/src/wgsl/closeness-sweep.wgsl.d.ts +4 -2
- package/dist/src/wgsl/closeness-sweep.wgsl.d.ts.map +1 -1
- package/dist/src/wgsl/closeness-sweep.wgsl.js +12 -2
- package/dist/src/wgsl/closeness-sweep.wgsl.js.map +1 -1
- package/dist/src/wgsl/coo-emit.wgsl.d.ts +10 -0
- package/dist/src/wgsl/coo-emit.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/coo-emit.wgsl.js +33 -0
- package/dist/src/wgsl/coo-emit.wgsl.js.map +1 -0
- package/dist/src/wgsl/coo-scatter.wgsl.d.ts +15 -0
- package/dist/src/wgsl/coo-scatter.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/coo-scatter.wgsl.js +32 -0
- package/dist/src/wgsl/coo-scatter.wgsl.js.map +1 -0
- package/dist/src/wgsl/group-by-key-row.wgsl.d.ts +26 -0
- package/dist/src/wgsl/group-by-key-row.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/group-by-key-row.wgsl.js +146 -0
- package/dist/src/wgsl/group-by-key-row.wgsl.js.map +1 -0
- package/dist/src/wgsl/lpa-step.wgsl.d.ts +10 -0
- package/dist/src/wgsl/lpa-step.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/lpa-step.wgsl.js +35 -0
- package/dist/src/wgsl/lpa-step.wgsl.js.map +1 -0
- package/dist/src/wgsl/orient-flags.wgsl.d.ts +9 -0
- package/dist/src/wgsl/orient-flags.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/orient-flags.wgsl.js +21 -0
- package/dist/src/wgsl/orient-flags.wgsl.js.map +1 -0
- package/dist/src/wgsl/run-flags.wgsl.d.ts +8 -0
- package/dist/src/wgsl/run-flags.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/run-flags.wgsl.js +18 -0
- package/dist/src/wgsl/run-flags.wgsl.js.map +1 -0
- package/dist/src/wgsl/tri-intersect.wgsl.d.ts +11 -0
- package/dist/src/wgsl/tri-intersect.wgsl.d.ts.map +1 -0
- package/dist/src/wgsl/tri-intersect.wgsl.js +64 -0
- package/dist/src/wgsl/tri-intersect.wgsl.js.map +1 -0
- package/dist/webgpu-graph-algorithms.js +2828 -321
- package/dist/webgpu-graph-algorithms.js.map +1 -1
- package/package.json +5 -5
- package/src/accelerator.ts +130 -7
- package/src/algorithms/all-pairs.ts +228 -0
- package/src/algorithms/betweenness.ts +739 -0
- package/src/algorithms/closeness.ts +124 -32
- package/src/algorithms/components.ts +2 -2
- package/src/algorithms/label-propagation.ts +280 -0
- package/src/algorithms/simple-symmetric.ts +409 -0
- package/src/algorithms/triangles.ts +240 -0
- package/src/constants.ts +53 -0
- package/src/index.ts +20 -1
- package/src/kernel/prelude.ts +6 -0
- package/src/kernels.ts +411 -10
- package/src/memory/residency.ts +15 -4
- package/src/primitives/coo-to-csr.ts +251 -0
- package/src/primitives/frontier.ts +4 -0
- package/src/primitives/group-by-key.ts +209 -0
- package/src/types/accelerator.ts +26 -6
- package/src/types/algorithms.ts +5 -0
- package/src/types/all-pairs.ts +37 -0
- package/src/types/betweenness.ts +38 -0
- package/src/types/community.ts +18 -0
- package/src/types/structure.ts +28 -0
- package/src/wgsl/apsp-fw.wgsl.ts +112 -0
- package/src/wgsl/apsp-init.wgsl.ts +25 -0
- package/src/wgsl/bc-backward.wgsl.ts +33 -0
- package/src/wgsl/bc-edge-gather.wgsl.ts +35 -0
- package/src/wgsl/bc-finalize.wgsl.ts +46 -0
- package/src/wgsl/bc-forward-edge.wgsl.ts +75 -0
- package/src/wgsl/bc-forward.wgsl.ts +105 -0
- package/src/wgsl/bc-gather.wgsl.ts +19 -0
- package/src/wgsl/closeness-reduce.wgsl.ts +8 -4
- package/src/wgsl/closeness-sweep.wgsl.ts +12 -2
- package/src/wgsl/coo-emit.wgsl.ts +32 -0
- package/src/wgsl/coo-scatter.wgsl.ts +31 -0
- package/src/wgsl/group-by-key-row.wgsl.ts +145 -0
- package/src/wgsl/lpa-step.wgsl.ts +34 -0
- package/src/wgsl/orient-flags.wgsl.ts +20 -0
- package/src/wgsl/run-flags.wgsl.ts +17 -0
- package/src/wgsl/tri-intersect.wgsl.ts +63 -0
- package/dist/chunks/context-Bi6AhScG.js.map +0 -1
package/README.md
CHANGED
|
@@ -127,25 +127,25 @@ caller re-issues its pins with a mask over the new index space), and the simulat
|
|
|
127
127
|
`createForceAtlas2(ctx, options)` and `accelerator.forceAtlas2(options)` take `ForceAtlas2Options` (the same
|
|
128
128
|
names and defaults as the CPU port in `@graphty/layout`) plus the GPU tuning:
|
|
129
129
|
|
|
130
|
-
| Option | Default | Meaning
|
|
131
|
-
| --------------------------------- | ---------------- |
|
|
132
|
-
| `dim` | `2` | `2` or `3`; in 2D every readback writes `z = center[2]` whatever was uploaded
|
|
133
|
-
| `scale`, `center` | `1`, `[0, 0, 0]` | scene units = layout units x `scale` + `center`
|
|
134
|
-
| `seed` | `null` | the LCG seed of the NaN rows (the CPU port's generator, bit for bit); `0` / `null` draws a random seed
|
|
135
|
-
| `maxIter` | `100` | `run()` stops and `settled` turns true after this many iterations since `load()` / `reheat()`
|
|
136
|
-
| `jitterTolerance` | `1` | the speed controller's tolerance
|
|
137
|
-
| `scalingRatio` | `2` | the repulsion constant
|
|
138
|
-
| `gravity` | `1` | toward the centroid (`compat: "paper"`) or the origin (`compat: "networkx"`)
|
|
139
|
-
| `strongGravity` | `false` | gravity proportional to the distance
|
|
140
|
-
| `distributedAction` | `false` | attraction divided by the source's mass
|
|
141
|
-
| `linlog` | `false` | logarithmic attraction
|
|
142
|
-
| `nodeMass` | `null` | `null`: the node column with the role `mass` when present, else `outDegree + 1`; a `Float32Array` of length n; a numeric node column name (a `Record` is `E_UNSUPPORTED`)
|
|
143
|
-
| `nodeSize` | `null` | `E_UNSUPPORTED` when non-null (no overlap prevention)
|
|
144
|
-
| `weight` | unset | `true`: the snapshot's arc weights; an edge column name: that numeric column; unset / `false` / `null`: every edge weighs 1
|
|
145
|
-
| `dissuadeHubs` | `false` | accepted and ignored
|
|
146
|
-
| `settleThreshold`, `settleWindow` | `0.001`, `10` | settled when the mean displacement stayed below `settleThreshold x rmsRadius` AND below an absolute floor (a fraction of the model's length unit: 0.003 `springLength` x (2000 / n)^(1/4) for spring-electrical, 0.002 `k` for Fruchterman-Reingold; ForceAtlas2 has none) for `settleWindow` iterations
|
|
147
|
-
| `iterationsPerStep` | `1` | iterations per `step()` (the Node `run()` uses its own `batch`)
|
|
148
|
-
| `maxInFlight` | `2` | batches in flight before `step()` coalesces; `1` for the strictest freshness
|
|
130
|
+
| Option | Default | Meaning |
|
|
131
|
+
| --------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
132
|
+
| `dim` | `2` | `2` or `3`; in 2D every readback writes `z = center[2]` whatever was uploaded |
|
|
133
|
+
| `scale`, `center` | `1`, `[0, 0, 0]` | scene units = layout units x `scale` + `center` |
|
|
134
|
+
| `seed` | `null` | the LCG seed of the NaN rows (the CPU port's generator, bit for bit); `0` / `null` draws a random seed |
|
|
135
|
+
| `maxIter` | `100` | `run()` stops and `settled` turns true after this many iterations since `load()` / `reheat()` |
|
|
136
|
+
| `jitterTolerance` | `1` | the speed controller's tolerance |
|
|
137
|
+
| `scalingRatio` | `2` | the repulsion constant |
|
|
138
|
+
| `gravity` | `1` | toward the centroid (`compat: "paper"`) or the origin (`compat: "networkx"`) |
|
|
139
|
+
| `strongGravity` | `false` | gravity proportional to the distance |
|
|
140
|
+
| `distributedAction` | `false` | attraction divided by the source's mass |
|
|
141
|
+
| `linlog` | `false` | logarithmic attraction |
|
|
142
|
+
| `nodeMass` | `null` | `null`: the node column with the role `mass` when present, else `outDegree + 1`; a `Float32Array` of length n; a numeric node column name (a `Record` is `E_UNSUPPORTED`) |
|
|
143
|
+
| `nodeSize` | `null` | `E_UNSUPPORTED` when non-null (no overlap prevention) |
|
|
144
|
+
| `weight` | unset | `true`: the snapshot's arc weights; an edge column name: that numeric column; unset / `false` / `null`: every edge weighs 1 |
|
|
145
|
+
| `dissuadeHubs` | `false` | accepted and ignored |
|
|
146
|
+
| `settleThreshold`, `settleWindow` | `0.001`, `10` | settled when the mean displacement stayed below `settleThreshold x rmsRadius` AND below an absolute floor (a fraction of the model's length unit: 0.003 `springLength` x (2000 / n)^(1/4) for spring-electrical, 0.002 `k` for Fruchterman-Reingold; ForceAtlas2 has none) for `settleWindow` iterations |
|
|
147
|
+
| `iterationsPerStep` | `1` | iterations per `step()` (the Node `run()` uses its own `batch`) |
|
|
148
|
+
| `maxInFlight` | `2` | batches in flight before `step()` coalesces; `1` for the strictest freshness |
|
|
149
149
|
|
|
150
150
|
GPU tuning (`GpuLayoutTuning`; also the `layout` field of `createAccelerator`'s options, inherited by every
|
|
151
151
|
simulation the accelerator creates):
|
|
@@ -695,39 +695,39 @@ never relaxed silently.
|
|
|
695
695
|
|
|
696
696
|
<!-- targets-table:nvidia-lovelace-driver580 -->
|
|
697
697
|
|
|
698
|
-
Generated by `pnpm run bench:readme` from `benchmarks/results/targets.json`. Each figure is the best median the row has recorded, the baseline `bench:compare` pins: Node rows across the
|
|
699
|
-
|
|
700
|
-
| Id | What | Target | Measured
|
|
701
|
-
| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
|
|
702
|
-
| T-1 | Upload of the 100k / 1M weighted hot prefix (16.4 MB), Node | <= 10 ms | 5.734 ms
|
|
703
|
-
| T-1 | Upload of the 1M / 10M weighted hot prefix (164 MB), Node | <= 100 ms |
|
|
704
|
-
| T-2 | `degree` + 400 KB readback at 100k (core resident), Node | <= 2 ms | 0.
|
|
705
|
-
| T-3 | Empty submit + 4-byte `readU32` round trip, Dawn in Node | <= 0.1 ms | 0.
|
|
706
|
-
| T-3 | Empty submit + 4-byte `readU32` round trip, Chromium (the <= 0.1 ms target is Dawn's) | recorded | 0.170 ms
|
|
707
|
-
| T-4 | ForceAtlas2 exact tier, GPU time per iteration (profiler) at 10k | <= 1 ms | 0.586 ms
|
|
708
|
-
| T-4 | ForceAtlas2 exact tier, GPU time per iteration (profiler) at 16k | <= 2 ms | 1.052 ms
|
|
709
|
-
| T-5 | ForceAtlas2 per-frame cost, `step(1)` + the 12n readback at 10k, Chromium | <= 6 ms | 2.400 ms
|
|
710
|
-
| T-5 | ForceAtlas2 per-frame cost, `step(1)` + the 12n readback at 10k, Node | recorded | 0.713 ms
|
|
711
|
-
| T-5 | ForceAtlas2 per-frame cost, `step(1)` + the 12n readback at 100k on the grid tier, Chromium | <= 12 ms | 3.700 ms
|
|
712
|
-
| T-5 | ForceAtlas2 per-frame cost, `step(1)` + the 12n readback at 100k on the grid tier, Node | recorded | 1.769 ms
|
|
713
|
-
| T-6 | ForceAtlas2 grid tier, GPU time per iteration (profiler) at 100k 2D | <= 10 ms | 0.
|
|
714
|
-
| T-6 | ForceAtlas2 grid tier, GPU time per iteration (profiler) at 1M 2D | <= 100 ms | 5.303 ms
|
|
715
|
-
| T-6 | ForceAtlas2 grid tier, GPU time per iteration (profiler) at 100k 3D | <= 20 ms | 1.279 ms
|
|
716
|
-
| T-7 | Attraction gather (the `fa2-attraction` pass of the grid tier), GPU time per iteration (profiler) at 1M / 10M | <= 15 ms | 1.475 ms
|
|
717
|
-
| T-8 | PageRank, 100 iterations, wall end to end including the upload, at 100k / 1M | <= 150 ms | 17.204 ms
|
|
718
|
-
| T-8 | PageRank, 100 iterations, wall end to end including the upload, at 1M / 10M | <= 1500 ms | 197.154 ms
|
|
719
|
-
| T-9 | Weakly connected components (Afforest), wall end to end including the upload and the label readback, at 1M / 10M | <= 100 ms |
|
|
720
|
-
| T-9 | Weakly connected components (Afforest), wall end to end including the upload and the label readback, at 100k / 1M | recorded | 12.613 ms
|
|
721
|
-
| T-14 | Fruchterman-Reingold exact tier, GPU time per iteration (profiler) at 10k | recorded | 0.566 ms
|
|
722
|
-
| T-14 | Fruchterman-Reingold exact tier, GPU time per iteration (profiler) at 100k (`repulsion: "exact"`) | recorded | 16.322 ms
|
|
723
|
-
| T-14 | Spring-electrical preset, GPU time per iteration (profiler) at 10k | recorded | 0.648 ms
|
|
724
|
-
| T-14 | Spring-electrical preset, GPU time per iteration (profiler) at 100k (`repulsion: "exact"`) | recorded | 18.154 ms
|
|
725
|
-
| T-10 | BFS direction-optimizing (`breadthFirstSearch`), wall end to end including the upload, from node 0 of the undirected RMAT at 1M / 10M (a contract on the dev box only) | <= 100 ms |
|
|
726
|
-
| T-10 | BFS top-down, the same traversal at 1M / 10M | recorded |
|
|
727
|
-
| T-10 | BFS direction-optimizing, the same traversal at 100k / 1M | recorded |
|
|
728
|
-
| T-10 | BFS on the 1000 x 1000 grid from a corner (1,999 levels), wall including the upload (a contract on the dev box only) | <= 1500 ms |
|
|
729
|
-
| T-10 | `sssp` (the near-far queue), wall end to end including the upload, random f32 weights in [0.1, 10), at 1M / 10M | recorded |
|
|
730
|
-
| T-10 | `sssp`, the same run at 100k / 1M | recorded |
|
|
698
|
+
Generated by `pnpm run bench:readme` from `benchmarks/results/targets.json`. Each figure is the best median the row has recorded, the baseline `bench:compare` pins: Node rows across the 10 session(s) of `benchmarks/results/nvidia-lovelace-driver580.json`, Chromium rows across the 3 of `benchmarks/results/nvidia-lovelace-driver0.json`.
|
|
699
|
+
|
|
700
|
+
| Id | What | Target | Measured | Status |
|
|
701
|
+
| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ---------- | -------- |
|
|
702
|
+
| T-1 | Upload of the 100k / 1M weighted hot prefix (16.4 MB), Node | <= 10 ms | 5.734 ms | met |
|
|
703
|
+
| T-1 | Upload of the 1M / 10M weighted hot prefix (164 MB), Node | <= 100 ms | 74.110 ms | met |
|
|
704
|
+
| T-2 | `degree` + 400 KB readback at 100k (core resident), Node | <= 2 ms | 0.256 ms | met |
|
|
705
|
+
| T-3 | Empty submit + 4-byte `readU32` round trip, Dawn in Node | <= 0.1 ms | 0.037 ms | met |
|
|
706
|
+
| T-3 | Empty submit + 4-byte `readU32` round trip, Chromium (the <= 0.1 ms target is Dawn's) | recorded | 0.170 ms | recorded |
|
|
707
|
+
| T-4 | ForceAtlas2 exact tier, GPU time per iteration (profiler) at 10k | <= 1 ms | 0.586 ms | met |
|
|
708
|
+
| T-4 | ForceAtlas2 exact tier, GPU time per iteration (profiler) at 16k | <= 2 ms | 1.052 ms | met |
|
|
709
|
+
| T-5 | ForceAtlas2 per-frame cost, `step(1)` + the 12n readback at 10k, Chromium | <= 6 ms | 2.400 ms | met |
|
|
710
|
+
| T-5 | ForceAtlas2 per-frame cost, `step(1)` + the 12n readback at 10k, Node | recorded | 0.713 ms | recorded |
|
|
711
|
+
| T-5 | ForceAtlas2 per-frame cost, `step(1)` + the 12n readback at 100k on the grid tier, Chromium | <= 12 ms | 3.700 ms | met |
|
|
712
|
+
| T-5 | ForceAtlas2 per-frame cost, `step(1)` + the 12n readback at 100k on the grid tier, Node | recorded | 1.769 ms | recorded |
|
|
713
|
+
| T-6 | ForceAtlas2 grid tier, GPU time per iteration (profiler) at 100k 2D | <= 10 ms | 0.553 ms | met |
|
|
714
|
+
| T-6 | ForceAtlas2 grid tier, GPU time per iteration (profiler) at 1M 2D | <= 100 ms | 5.303 ms | met |
|
|
715
|
+
| T-6 | ForceAtlas2 grid tier, GPU time per iteration (profiler) at 100k 3D | <= 20 ms | 1.279 ms | met |
|
|
716
|
+
| T-7 | Attraction gather (the `fa2-attraction` pass of the grid tier), GPU time per iteration (profiler) at 1M / 10M | <= 15 ms | 1.475 ms | met |
|
|
717
|
+
| T-8 | PageRank, 100 iterations, wall end to end including the upload, at 100k / 1M | <= 150 ms | 17.204 ms | met |
|
|
718
|
+
| T-8 | PageRank, 100 iterations, wall end to end including the upload, at 1M / 10M | <= 1500 ms | 197.154 ms | met |
|
|
719
|
+
| T-9 | Weakly connected components (Afforest), wall end to end including the upload and the label readback, at 1M / 10M | <= 100 ms | 138.425 ms | missed |
|
|
720
|
+
| T-9 | Weakly connected components (Afforest), wall end to end including the upload and the label readback, at 100k / 1M | recorded | 12.613 ms | recorded |
|
|
721
|
+
| T-14 | Fruchterman-Reingold exact tier, GPU time per iteration (profiler) at 10k | recorded | 0.566 ms | recorded |
|
|
722
|
+
| T-14 | Fruchterman-Reingold exact tier, GPU time per iteration (profiler) at 100k (`repulsion: "exact"`) | recorded | 16.322 ms | recorded |
|
|
723
|
+
| T-14 | Spring-electrical preset, GPU time per iteration (profiler) at 10k | recorded | 0.648 ms | recorded |
|
|
724
|
+
| T-14 | Spring-electrical preset, GPU time per iteration (profiler) at 100k (`repulsion: "exact"`) | recorded | 18.154 ms | recorded |
|
|
725
|
+
| T-10 | BFS direction-optimizing (`breadthFirstSearch`), wall end to end including the upload, from node 0 of the undirected RMAT at 1M / 10M (a contract on the dev box only) | <= 100 ms | 84.989 ms | met |
|
|
726
|
+
| T-10 | BFS top-down, the same traversal at 1M / 10M | recorded | 81.261 ms | recorded |
|
|
727
|
+
| T-10 | BFS direction-optimizing, the same traversal at 100k / 1M | recorded | 12.837 ms | recorded |
|
|
728
|
+
| T-10 | BFS on the 1000 x 1000 grid from a corner (1,999 levels), wall including the upload (a contract on the dev box only) | <= 1500 ms | 369.673 ms | met |
|
|
729
|
+
| T-10 | `sssp` (the near-far queue), wall end to end including the upload, random f32 weights in [0.1, 10), at 1M / 10M | recorded | 256.320 ms | recorded |
|
|
730
|
+
| T-10 | `sssp`, the same run at 100k / 1M | recorded | 47.421 ms | recorded |
|
|
731
731
|
|
|
732
732
|
<!-- /targets-table:nvidia-lovelace-driver580 -->
|
|
733
733
|
|
package/dist/browser.js
CHANGED
|
@@ -102,6 +102,18 @@ const FUSED_FRONTIER_MAX = 4096;
|
|
|
102
102
|
const BEAMER_BETA = 24;
|
|
103
103
|
const SSSP_DELTA_FACTOR = 32;
|
|
104
104
|
const F32_INF_BITS = 2139095040;
|
|
105
|
+
const BC_BATCH_BUDGET_FRACTION = 0.25;
|
|
106
|
+
const BC_MAX_BATCH = 64;
|
|
107
|
+
const BC_EDGE_PARALLEL_GAMMA = 2;
|
|
108
|
+
const BC_BACKWARD_LEVELS_PER_SUBMIT = 64;
|
|
109
|
+
const APSP_TILE = 32;
|
|
110
|
+
const APSP_MAX_DISPATCHES_PER_SUBMIT = 4096;
|
|
111
|
+
const LABEL_PROP_PASSES_PER_SUBMIT = 8;
|
|
112
|
+
const GROUP_ROW_THREAD_MAX = 32;
|
|
113
|
+
const GROUP_ROW_THREAD_LIMIT = 128;
|
|
114
|
+
const PARALLEL_MERGE_LIMIT = 65e3;
|
|
115
|
+
const GROUP_HASH_LOAD_FACTOR = 2;
|
|
116
|
+
const TRIANGLE_BINARY_SEARCH_RATIO = 32;
|
|
105
117
|
const PASSTHROUGH_FORMAT_CODES = Object.freeze(["E_GPU_INELIGIBLE", "E_UNKNOWN_NODE", "E_UNKNOWN_COLUMN", "E_COLUMN_LENGTH"]);
|
|
106
118
|
const EMPTY_DETAILS = Object.freeze({});
|
|
107
119
|
class WebGpuGraphError extends Error {
|
|
@@ -922,6 +934,9 @@ const GRID_EXTENT_FLOOR: f32 = ${wgslF32Literal(GRID_EXTENT_FLOOR)};
|
|
|
922
934
|
const GRID_BBOX_MARGIN: f32 = ${wgslF32Literal(GRID_BBOX_MARGIN)};
|
|
923
935
|
const RADIX_BINS: u32 = ${RADIX_BINS}u;
|
|
924
936
|
const RADIX_DIGIT_MASK: u32 = ${RADIX_BINS - 1}u;
|
|
937
|
+
const APSP_TILE: u32 = ${APSP_TILE}u;
|
|
938
|
+
const GROUP_HASH_LOAD_FACTOR: u32 = ${GROUP_HASH_LOAD_FACTOR}u;
|
|
939
|
+
const TRIANGLE_BINARY_SEARCH_RATIO: u32 = ${TRIANGLE_BINARY_SEARCH_RATIO}u;
|
|
925
940
|
const F32_MAX: f32 = 0x1.fffffep+127;
|
|
926
941
|
override WG: u32 = ${WORKGROUP_SIZE}u;
|
|
927
942
|
override USE_PERM: bool = false;
|
|
@@ -2633,7 +2648,8 @@ class GraphResidency {
|
|
|
2633
2648
|
/**
|
|
2634
2649
|
* Uploads (or finds) a view: outDegree / inDegree / degreeOrder / reverseDegreeOrder upload one array each;
|
|
2635
2650
|
* reverse and edgeList (P7) upload their arrays perArray, never into the arena, and are memoised per record so
|
|
2636
|
-
* a second call uploads nothing (spec 4.3). coo
|
|
2651
|
+
* a second call uploads nothing (spec 4.3). coo uploads its per-arc `src` (P11; the rest aliases the core); mate ->
|
|
2652
|
+
* E_UNSUPPORTED. packViews concatenates a
|
|
2637
2653
|
* reverse or edgeList view into ONE buffer at STORAGE_ALIGN offsets; on any other view `true` is E_UNSUPPORTED
|
|
2638
2654
|
* { option: "packViews" }.
|
|
2639
2655
|
* @param s - the snapshot
|
|
@@ -2700,10 +2716,18 @@ class GraphResidency {
|
|
|
2700
2716
|
break;
|
|
2701
2717
|
}
|
|
2702
2718
|
case "coo":
|
|
2719
|
+
this.assertNotReleased(s);
|
|
2720
|
+
this.assertNonEmpty(s);
|
|
2721
|
+
if (s.arcCount === 0) {
|
|
2722
|
+
return Object.freeze({ view: name, bindings: Object.freeze({}), scalars: Object.freeze({}) });
|
|
2723
|
+
}
|
|
2724
|
+
array = s.coo().src;
|
|
2725
|
+
bindingName = "src";
|
|
2726
|
+
break;
|
|
2703
2727
|
case "mate":
|
|
2704
|
-
throw new WebGpuGraphError("E_UNSUPPORTED",
|
|
2705
|
-
feature:
|
|
2706
|
-
hint: "outDegree, inDegree, degreeOrder, reverseDegreeOrder, reverse and edgeList are uploaded"
|
|
2728
|
+
throw new WebGpuGraphError("E_UNSUPPORTED", "the mate view is not uploaded: no kernel reads it", {
|
|
2729
|
+
feature: "view:mate",
|
|
2730
|
+
hint: "outDegree, inDegree, degreeOrder, reverseDegreeOrder, coo, reverse and edgeList are uploaded"
|
|
2707
2731
|
});
|
|
2708
2732
|
default:
|
|
2709
2733
|
throw invalid("name", name, "a view name");
|
|
@@ -3513,53 +3537,64 @@ class GpuContext {
|
|
|
3513
3537
|
}
|
|
3514
3538
|
}
|
|
3515
3539
|
export {
|
|
3516
|
-
|
|
3540
|
+
SE_SCALE_REFERENCE_NODES as $,
|
|
3541
|
+
APSP_MAX_DISPATCHES_PER_SUBMIT as A,
|
|
3517
3542
|
BufferUsage as B,
|
|
3518
|
-
|
|
3519
|
-
|
|
3543
|
+
LAYOUT_TUNING_DEFAULTS as C,
|
|
3544
|
+
EXACT_MAX_NODES as D,
|
|
3520
3545
|
EXACT_TILES_PER_PASS as E,
|
|
3521
3546
|
FUSED_FRONTIER_MAX as F,
|
|
3522
3547
|
GpuContext as G,
|
|
3523
|
-
|
|
3548
|
+
SETTLE_FLOOR_UNBOUNDED as H,
|
|
3524
3549
|
INDIRECT_ARGS_STRIDE as I,
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3550
|
+
GRID_BBOX_MARGIN as J,
|
|
3551
|
+
GRID_EXTENT_FLOOR as K,
|
|
3552
|
+
LABEL_PROP_PASSES_PER_SUBMIT as L,
|
|
3528
3553
|
MAX_WORKGROUPS_PER_DIM as M,
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3554
|
+
FR_ADAPTIVE_MAX_ITERATIONS as N,
|
|
3555
|
+
FR_START_TEMPERATURE as O,
|
|
3556
|
+
PARALLEL_MERGE_LIMIT as P,
|
|
3557
|
+
FA2_FLAG_ADAPTIVE as Q,
|
|
3533
3558
|
RADIX_BINS as R,
|
|
3534
3559
|
STATE_HEADER_BYTES as S,
|
|
3535
3560
|
TRACE_RECORD_BYTES as T,
|
|
3536
3561
|
UNIFORM_SLOT_BYTES as U,
|
|
3562
|
+
SETTLE_FLOOR_FRACTION as V,
|
|
3537
3563
|
WebGpuGraphError as W,
|
|
3564
|
+
FR_REHEAT_FRACTION as X,
|
|
3565
|
+
FR_DEFAULTS as Y,
|
|
3566
|
+
SE_DEFAULTS as Z,
|
|
3567
|
+
SETTLE_FLOOR_REFERENCE_NODES as _,
|
|
3538
3568
|
WGSL_RESERVED_WORDS as a,
|
|
3569
|
+
ARC_WINDOW_ALIGN as a0,
|
|
3570
|
+
PASSTHROUGH_FORMAT_CODES as a1,
|
|
3571
|
+
STORAGE_ALIGN as a2,
|
|
3572
|
+
WORKGROUP_SIZE as a3,
|
|
3573
|
+
isSoftwareAdapter as a4,
|
|
3539
3574
|
U32_MAX as b,
|
|
3540
3575
|
MAX_LEVELS_PER_SUBMIT as c,
|
|
3541
3576
|
deviceLostError as d,
|
|
3542
3577
|
BEAMER_BETA as e,
|
|
3543
3578
|
SSSP_DELTA_FACTOR as f,
|
|
3544
3579
|
F32_INF_BITS as g,
|
|
3545
|
-
|
|
3580
|
+
BC_EDGE_PARALLEL_GAMMA as h,
|
|
3546
3581
|
isWebGpuGraphError as i,
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3582
|
+
BC_BATCH_BUDGET_FRACTION as j,
|
|
3583
|
+
BC_MAX_BATCH as k,
|
|
3584
|
+
BC_BACKWARD_LEVELS_PER_SUBMIT as l,
|
|
3585
|
+
APSP_TILE as m,
|
|
3586
|
+
GROUP_ROW_THREAD_MAX as n,
|
|
3587
|
+
GROUP_ROW_THREAD_LIMIT as o,
|
|
3588
|
+
GROUP_HASH_LOAD_FACTOR as p,
|
|
3589
|
+
GRID_COARSEST_SIDE as q,
|
|
3590
|
+
GRID_MIN_SIDE as r,
|
|
3591
|
+
GRID_SORT_BITS as s,
|
|
3592
|
+
FA2_DEFAULTS as t,
|
|
3593
|
+
MAX_ITERATIONS_PER_STEP as u,
|
|
3594
|
+
MAX_1D_ITEMS as v,
|
|
3595
|
+
hasErrorCode as w,
|
|
3596
|
+
FA2_FLAG_FIRST as x,
|
|
3597
|
+
PARTIAL_BYTES as y,
|
|
3598
|
+
GRID_HUB_CELL as z
|
|
3564
3599
|
};
|
|
3565
|
-
//# sourceMappingURL=context-
|
|
3600
|
+
//# sourceMappingURL=context-VIvatQOo.js.map
|