@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/dist/src/constants.d.ts
CHANGED
|
@@ -209,4 +209,57 @@ export declare const BEAMER_BETA = 24;
|
|
|
209
209
|
export declare const SSSP_DELTA_FACTOR = 32;
|
|
210
210
|
/** The bit pattern of +Infinity, the unreached sentinel of `dist` (P8 PD-9); interpolated into the prelude as `F32_INF_BITS` so no body types the literal. */
|
|
211
211
|
export declare const F32_INF_BITS = 2139095040;
|
|
212
|
+
/** Design 8.4 "k planned from maxBufferSize and a 25% budget": the share of `maxBufferSize` one betweenness source batch may hold. WebGPU exposes no device memory size, so this is a fraction of the largest buffer, not a memory measurement. */
|
|
213
|
+
export declare const BC_BATCH_BUDGET_FRACTION = 0.25;
|
|
214
|
+
/** Design 10.1's betweenness column: the most sources one betweenness batch runs together. */
|
|
215
|
+
export declare const BC_MAX_BATCH = 64;
|
|
216
|
+
/** Design 8.4 (McLaughlin-Bader): a betweenness batch runs the edge-parallel forward pass when the previous batch's level count is below `BC_EDGE_PARALLEL_GAMMA * log2(n)`. The design names the rule and no value; 2 is unmeasured and a benchmark run re-fixes it. */
|
|
217
|
+
export declare const BC_EDGE_PARALLEL_GAMMA = 2;
|
|
218
|
+
/** Backward-pass levels recorded per submit: each level is one dispatch with its own parameter record, so this bounds the uniform ring. */
|
|
219
|
+
export declare const BC_BACKWARD_LEVELS_PER_SUBMIT = 64;
|
|
220
|
+
/**
|
|
221
|
+
* Design 8.7: all-pairs shortest paths is a blocked Floyd-Warshall over `APSP_TILE x APSP_TILE` tiles. One tile of
|
|
222
|
+
* f32 is 4 KiB of workgroup memory and a workgroup stages at most two (8 KiB), inside the 16 KiB
|
|
223
|
+
* `maxComputeWorkgroupStorageSize` every WebGPU device reports. Interpolated into the prelude as `APSP_TILE`.
|
|
224
|
+
*/
|
|
225
|
+
export declare const APSP_TILE = 32;
|
|
226
|
+
/**
|
|
227
|
+
* The blocked sweep records `3 x ceil(n / APSP_TILE)` dispatches (543 at the 5,792-node ceiling of a 128 MiB binding,
|
|
228
|
+
* 2,175 at a 2 GiB binding's 23,170, 3,072 at a 4 GiB binding's 32,767); above this many the driver splits the sweep
|
|
229
|
+
* into further submits. No binding offered today reaches it, so every sweep is one submit; the cap only stops a
|
|
230
|
+
* device with a binding above 4 GiB (`maxStorageBufferBindingSize` is a GPUSize64) from building one unbounded
|
|
231
|
+
* command buffer.
|
|
232
|
+
*/
|
|
233
|
+
export declare const APSP_MAX_DISPATCHES_PER_SUBMIT = 4096;
|
|
234
|
+
/**
|
|
235
|
+
* Label propagation (design 8.6): passes recorded per submit, with ONE readback of the per-pass changed counts at the
|
|
236
|
+
* end of the submit. A readback costs about 2 ms in Chromium whatever it carries, so at one readback per pass a
|
|
237
|
+
* 10,000-node call spends more on synchronisation than the CPU spends on the whole algorithm
|
|
238
|
+
* (design/decisions/2026-09-26-which-algorithms-earn-the-gpu.md: 101 passes x 2 ms, 0.79x); eight passes per
|
|
239
|
+
* submit is the floor that decision sets. Even, so every submit holds as many descending as ascending passes of the
|
|
240
|
+
* alternating direction rule.
|
|
241
|
+
*/
|
|
242
|
+
export declare const LABEL_PROP_PASSES_PER_SUBMIT = 8;
|
|
243
|
+
/**
|
|
244
|
+
* Boruvka's minimum spanning tree (design 8.5): rounds recorded per submit, with one readback of the counters block
|
|
245
|
+
* per submit. Each readback is a device-to-host synchronisation that costs about 2 ms in Chromium, and at one per
|
|
246
|
+
* round the syncs are 61 % of the 100,000-node call; four rounds per submit amortise them over O(log n) rounds, moving
|
|
247
|
+
* the Chromium crossover from 6,000 to 4,600 nodes (design/decisions/2026-09-26-which-algorithms-earn-the-gpu.md).
|
|
248
|
+
* Declared ahead of the minimum-spanning-tree driver, which reads it when it lands.
|
|
249
|
+
*/
|
|
250
|
+
export declare const BORUVKA_ROUNDS_PER_SUBMIT = 4;
|
|
251
|
+
/** The per-row group-by-key (design 8.6): a row of at most this many arcs is grouped by one thread in registers; a longer row by a workgroup over a global open-addressing region. */
|
|
252
|
+
export declare const GROUP_ROW_THREAD_MAX = 32;
|
|
253
|
+
/** The largest row the thread tier accepts when a caller forces the tier: its pairwise scan is about d^2 / 2 loop steps, and llvmpipe stops every loop of an invocation after 65,535 steps in total. */
|
|
254
|
+
export declare const GROUP_ROW_THREAD_LIMIT = 128;
|
|
255
|
+
/**
|
|
256
|
+
* The most parallel arcs the simple symmetric graph build merges into one weighted arc. The merge sums each run of
|
|
257
|
+
* parallel arcs in one invocation, and llvmpipe stops every loop of an invocation after 65,535 steps in total and
|
|
258
|
+
* then quietly returns a short sum; a weighted build whose pair repeats more often is refused on every adapter.
|
|
259
|
+
*/
|
|
260
|
+
export declare const PARALLEL_MERGE_LIMIT = 65000;
|
|
261
|
+
/** The per-row group-by-key (design 8.6): the global open-addressing region of a workgroup-tier row holds this many slots per arc. */
|
|
262
|
+
export declare const GROUP_HASH_LOAD_FACTOR = 2;
|
|
263
|
+
/** Triangle counting (design 8.5): intersect two oriented rows by merge, but binary-search each element of the shorter row into the longer when their lengths differ by more than this factor. */
|
|
264
|
+
export declare const TRIANGLE_BINARY_SEARCH_RATIO = 32;
|
|
212
265
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0IAA0I;AAC1I,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,4HAA4H;AAC5H,eAAO,MAAM,sBAAsB,QAAQ,CAAC;AAC5C,sGAAsG;AACtG,eAAO,MAAM,YAAY,QAA0C,CAAC;AACpE,sJAAsJ;AACtJ,eAAO,MAAM,OAAO,aAAa,CAAC;AAClC,qMAAqM;AACrM,eAAO,MAAM,UAAU,MAAM,CAAC;AAC9B,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,qHAAqH;AACrH,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,8HAA8H;AAC9H,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,eAAe,QAAQ,CAAC;AACrC,kFAAkF;AAClF,eAAO,MAAM,qBAAqB,IAAI,CAAC;AACvC,yGAAyG;AACzG,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,gGAAgG;AAChG,eAAO,MAAM,yBAAyB,QAAmB,CAAC;AAC1D,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,mDAAmD;AACnD,eAAO,MAAM,oBAAoB,QAAW,CAAC;AAC7C,sFAAsF;AACtF,eAAO,MAAM,yBAAyB,QAAmB,CAAC;AAC1D,qFAAqF;AACrF,eAAO,MAAM,sBAAsB,QAAmB,CAAC;AACvD,yDAAyD;AACzD,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,yKAAyK;AACzK,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,gEAAgE;AAChE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,wO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AC;AAC9B,+JAA+J;AAC/J,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,8JAA8J;AAC9J,eAAO,MAAM,YAAY,aAAa,CAAC;AACvC,mPAAmP;AACnP,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAC7C,8FAA8F;AAC9F,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,yQAAyQ;AACzQ,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,2IAA2I;AAC3I,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAChD;;;;GAIG;AACH,eAAO,MAAM,SAAS,KAAK,CAAC;AAC5B;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,OAAO,CAAC;AACnD;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAC3C,sLAAsL;AACtL,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,wMAAwM;AACxM,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAC3C,sIAAsI;AACtI,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,kMAAkM;AAClM,eAAO,MAAM,4BAA4B,KAAK,CAAC"}
|
package/dist/src/constants.js
CHANGED
|
@@ -209,4 +209,57 @@ export const BEAMER_BETA = 24;
|
|
|
209
209
|
export const SSSP_DELTA_FACTOR = 32;
|
|
210
210
|
/** The bit pattern of +Infinity, the unreached sentinel of `dist` (P8 PD-9); interpolated into the prelude as `F32_INF_BITS` so no body types the literal. */
|
|
211
211
|
export const F32_INF_BITS = 0x7f800000;
|
|
212
|
+
/** Design 8.4 "k planned from maxBufferSize and a 25% budget": the share of `maxBufferSize` one betweenness source batch may hold. WebGPU exposes no device memory size, so this is a fraction of the largest buffer, not a memory measurement. */
|
|
213
|
+
export const BC_BATCH_BUDGET_FRACTION = 0.25;
|
|
214
|
+
/** Design 10.1's betweenness column: the most sources one betweenness batch runs together. */
|
|
215
|
+
export const BC_MAX_BATCH = 64;
|
|
216
|
+
/** Design 8.4 (McLaughlin-Bader): a betweenness batch runs the edge-parallel forward pass when the previous batch's level count is below `BC_EDGE_PARALLEL_GAMMA * log2(n)`. The design names the rule and no value; 2 is unmeasured and a benchmark run re-fixes it. */
|
|
217
|
+
export const BC_EDGE_PARALLEL_GAMMA = 2;
|
|
218
|
+
/** Backward-pass levels recorded per submit: each level is one dispatch with its own parameter record, so this bounds the uniform ring. */
|
|
219
|
+
export const BC_BACKWARD_LEVELS_PER_SUBMIT = 64;
|
|
220
|
+
/**
|
|
221
|
+
* Design 8.7: all-pairs shortest paths is a blocked Floyd-Warshall over `APSP_TILE x APSP_TILE` tiles. One tile of
|
|
222
|
+
* f32 is 4 KiB of workgroup memory and a workgroup stages at most two (8 KiB), inside the 16 KiB
|
|
223
|
+
* `maxComputeWorkgroupStorageSize` every WebGPU device reports. Interpolated into the prelude as `APSP_TILE`.
|
|
224
|
+
*/
|
|
225
|
+
export const APSP_TILE = 32;
|
|
226
|
+
/**
|
|
227
|
+
* The blocked sweep records `3 x ceil(n / APSP_TILE)` dispatches (543 at the 5,792-node ceiling of a 128 MiB binding,
|
|
228
|
+
* 2,175 at a 2 GiB binding's 23,170, 3,072 at a 4 GiB binding's 32,767); above this many the driver splits the sweep
|
|
229
|
+
* into further submits. No binding offered today reaches it, so every sweep is one submit; the cap only stops a
|
|
230
|
+
* device with a binding above 4 GiB (`maxStorageBufferBindingSize` is a GPUSize64) from building one unbounded
|
|
231
|
+
* command buffer.
|
|
232
|
+
*/
|
|
233
|
+
export const APSP_MAX_DISPATCHES_PER_SUBMIT = 4096;
|
|
234
|
+
/**
|
|
235
|
+
* Label propagation (design 8.6): passes recorded per submit, with ONE readback of the per-pass changed counts at the
|
|
236
|
+
* end of the submit. A readback costs about 2 ms in Chromium whatever it carries, so at one readback per pass a
|
|
237
|
+
* 10,000-node call spends more on synchronisation than the CPU spends on the whole algorithm
|
|
238
|
+
* (design/decisions/2026-09-26-which-algorithms-earn-the-gpu.md: 101 passes x 2 ms, 0.79x); eight passes per
|
|
239
|
+
* submit is the floor that decision sets. Even, so every submit holds as many descending as ascending passes of the
|
|
240
|
+
* alternating direction rule.
|
|
241
|
+
*/
|
|
242
|
+
export const LABEL_PROP_PASSES_PER_SUBMIT = 8;
|
|
243
|
+
/**
|
|
244
|
+
* Boruvka's minimum spanning tree (design 8.5): rounds recorded per submit, with one readback of the counters block
|
|
245
|
+
* per submit. Each readback is a device-to-host synchronisation that costs about 2 ms in Chromium, and at one per
|
|
246
|
+
* round the syncs are 61 % of the 100,000-node call; four rounds per submit amortise them over O(log n) rounds, moving
|
|
247
|
+
* the Chromium crossover from 6,000 to 4,600 nodes (design/decisions/2026-09-26-which-algorithms-earn-the-gpu.md).
|
|
248
|
+
* Declared ahead of the minimum-spanning-tree driver, which reads it when it lands.
|
|
249
|
+
*/
|
|
250
|
+
export const BORUVKA_ROUNDS_PER_SUBMIT = 4;
|
|
251
|
+
/** The per-row group-by-key (design 8.6): a row of at most this many arcs is grouped by one thread in registers; a longer row by a workgroup over a global open-addressing region. */
|
|
252
|
+
export const GROUP_ROW_THREAD_MAX = 32;
|
|
253
|
+
/** The largest row the thread tier accepts when a caller forces the tier: its pairwise scan is about d^2 / 2 loop steps, and llvmpipe stops every loop of an invocation after 65,535 steps in total. */
|
|
254
|
+
export const GROUP_ROW_THREAD_LIMIT = 128;
|
|
255
|
+
/**
|
|
256
|
+
* The most parallel arcs the simple symmetric graph build merges into one weighted arc. The merge sums each run of
|
|
257
|
+
* parallel arcs in one invocation, and llvmpipe stops every loop of an invocation after 65,535 steps in total and
|
|
258
|
+
* then quietly returns a short sum; a weighted build whose pair repeats more often is refused on every adapter.
|
|
259
|
+
*/
|
|
260
|
+
export const PARALLEL_MERGE_LIMIT = 65000;
|
|
261
|
+
/** The per-row group-by-key (design 8.6): the global open-addressing region of a workgroup-tier row holds this many slots per arc. */
|
|
262
|
+
export const GROUP_HASH_LOAD_FACTOR = 2;
|
|
263
|
+
/** Triangle counting (design 8.5): intersect two oriented rows by merge, but binary-search each element of the shorter row into the longer when their lengths differ by more than this factor. */
|
|
264
|
+
export const TRIANGLE_BINARY_SEARCH_RATIO = 32;
|
|
212
265
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,0IAA0I;AAC1I,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,4HAA4H;AAC5H,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAC5C,sGAAsG;AACtG,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,GAAG,cAAc,CAAC;AACpE,sJAAsJ;AACtJ,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;AAClC,qMAAqM;AACrM,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC;AAC9B,gFAAgF;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,qHAAqH;AACrH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAAC;AACjC,8HAA8H;AAC9H,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AACtC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AACrC,kFAAkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AACvC,yGAAyG;AACzG,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACxC,gGAAgG;AAChG,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC1D,8EAA8E;AAC9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;A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PAAmP;AACnP,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAC7C,8FAA8F;AAC9F,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAC/B,yQAAyQ;AACzQ,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,2IAA2I;AAC3I,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,CAAC;AAChD;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,CAAC;AAC5B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAC;AACnD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAC9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAC3C,sLAAsL;AACtL,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,wMAAwM;AACxM,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAC1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAM,CAAC;AAC3C,sIAAsI;AACtI,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,kMAAkM;AAClM,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* (Lease, CommandBatch, UniformRing are internal). P3 adds the layout factory, the accelerator, the two default
|
|
9
9
|
* tables, the seeder and the layout / accelerator types. P5 adds the two factories, the two default tables and the
|
|
10
10
|
* two stats records. P4 adds calibrateLayout and its two records. P8 adds the four traversals and their three result
|
|
11
|
-
* records.
|
|
11
|
+
* records. All-pairs shortest paths (design 8.7) adds allPairsShortestPath and its result and option records.
|
|
12
|
+
* test/index.test.ts pins the value list and
|
|
12
13
|
* test/types/public-api.test-d.ts the type list. This comment must never spell the internal
|
|
13
14
|
* JSDoc tag: it is the leading comment of the first export statement, and stripInternal would drop that statement
|
|
14
15
|
* from the emitted declarations.
|
|
@@ -25,18 +26,26 @@ export { connectedComponents } from "./algorithms/components.js";
|
|
|
25
26
|
export { pageRank, personalizedPageRank } from "./algorithms/pagerank.js";
|
|
26
27
|
export { eigenvectorCentrality, hits, katzCentrality } from "./algorithms/spectral.js";
|
|
27
28
|
export { bellmanFord } from "./algorithms/bellman-ford.js";
|
|
29
|
+
export { betweennessCentrality, edgeBetweennessCentrality } from "./algorithms/betweenness.js";
|
|
28
30
|
export { breadthFirstSearch } from "./algorithms/bfs.js";
|
|
29
31
|
export { closenessCentrality } from "./algorithms/closeness.js";
|
|
30
32
|
export { sssp } from "./algorithms/sssp.js";
|
|
33
|
+
export { allPairsShortestPath } from "./algorithms/all-pairs.js";
|
|
34
|
+
export { labelPropagation } from "./algorithms/label-propagation.js";
|
|
35
|
+
export { triangleCount } from "./algorithms/triangles.js";
|
|
31
36
|
export { createAccelerator } from "./accelerator.js";
|
|
32
37
|
export { calibrateLayout } from "./layouts/calibrate.js";
|
|
33
38
|
export { createForceAtlas2 } from "./layouts/forceatlas2.js";
|
|
34
39
|
export { createFruchtermanReingold } from "./layouts/fruchterman-reingold.js";
|
|
35
40
|
export { seedPositions } from "./layouts/seed.js";
|
|
36
41
|
export { createSpringElectrical } from "./layouts/spring-electrical.js";
|
|
37
|
-
export type { AcceleratorOptions, AlgorithmAccelerator, ApspResultLike, BellmanFordResultLike, BetweennessAcceleratorOptions, BfsOptions, BfsResultLike, CommunityResultLike, CorenessResultLike, EdgeScoresResultLike, GpuAccelerator, HitsOptionsLike, HitsResultLike, LabelResultLike, LayoutAccelerator, LayoutSimulation, MstResultLike, PageRankResultLike, ScoresResultLike, SsspOptions, SsspResultLike, } from "./types/accelerator.js";
|
|
42
|
+
export type { AcceleratorOptions, AlgorithmAccelerator, ApspResultLike, BellmanFordResultLike, BetweennessAcceleratorOptions, BfsOptions, BfsResultLike, ClosenessAcceleratorOptions, ClosenessResultLike, CommunityResultLike, CorenessResultLike, EdgeScoresResultLike, GpuAccelerator, HitsOptionsLike, HitsResultLike, LabelResultLike, LayoutAccelerator, LayoutSimulation, MstResultLike, PageRankResultLike, ScoresResultLike, SsspOptions, SsspResultLike, } from "./types/accelerator.js";
|
|
43
|
+
export type { LabelPropagationOptions } from "./types/community.js";
|
|
44
|
+
export type { GpuTriangleResult } from "./types/structure.js";
|
|
38
45
|
export type { GpuBellmanFordResult, GpuBfsResult, GpuSsspResult } from "./types/traversal.js";
|
|
39
|
-
export type {
|
|
46
|
+
export type { GpuBetweennessResult, GpuEdgeScoresResult } from "./types/betweenness.js";
|
|
47
|
+
export type { ApspOptions, GpuApspResult } from "./types/all-pairs.js";
|
|
48
|
+
export type { ComponentsOptions, EigenvectorOptions, GpuClosenessResult, GpuHitsResult, GpuLabelResult, GpuPageRankResult, GpuScoresResult, HitsOptions, KatzOptions, PageRankOptions, } from "./types/algorithms.js";
|
|
40
49
|
export type { AdapterInfoLike, AdapterSummary, DeviceCheck, DeviceCheckMismatch, GpuCaps, GpuContextOptions, LimitPolicy, PlanCaps, PlanLimits, ProbeOptions, ProbeResult, RaisableLimit, } from "./types/context.js";
|
|
41
50
|
export type { CalibrateOptions, ForceAtlas2Stats, ForceAtlas2TraceRecord, FruchtermanReingoldStats, FruchtermanReingoldTraceRecord, GpuCalibration, GpuLayoutSimulation, GpuLayoutTuning, LayoutStatsBase, RunOptions, SpringElectricalStats, SpringElectricalTraceRecord, } from "./types/layout.js";
|
|
42
51
|
export type { CommonLayoutOptions, ForceAtlas2Options, FruchtermanReingoldOptions, SimulationOptions, SpringElectricalOptions, } from "./types/options.js";
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/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AQ,EACR,UAAU,EACV,YAAY,EACZ,WAAW,EACX,aAAa,GAChB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACR,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,wBAAwB,EACxB,8BAA8B,EAC9B,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,UAAU,EACV,qBAAqB,EACrB,2BAA2B,GAC9B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACR,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,GAC1B,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
* (Lease, CommandBatch, UniformRing are internal). P3 adds the layout factory, the accelerator, the two default
|
|
10
10
|
* tables, the seeder and the layout / accelerator types. P5 adds the two factories, the two default tables and the
|
|
11
11
|
* two stats records. P4 adds calibrateLayout and its two records. P8 adds the four traversals and their three result
|
|
12
|
-
* records.
|
|
12
|
+
* records. All-pairs shortest paths (design 8.7) adds allPairsShortestPath and its result and option records.
|
|
13
|
+
* test/index.test.ts pins the value list and
|
|
13
14
|
* test/types/public-api.test-d.ts the type list. This comment must never spell the internal
|
|
14
15
|
* JSDoc tag: it is the leading comment of the first export statement, and stripInternal would drop that statement
|
|
15
16
|
* from the emitted declarations.
|
|
@@ -33,9 +34,15 @@ export { pageRank, personalizedPageRank } from "./algorithms/pagerank.js";
|
|
|
33
34
|
export { eigenvectorCentrality, hits, katzCentrality } from "./algorithms/spectral.js";
|
|
34
35
|
// ==================== algorithms (P8: the frontier family, spec 3.3 lines 807-810, 8.4; the seam's option types in)
|
|
35
36
|
export { bellmanFord } from "./algorithms/bellman-ford.js";
|
|
37
|
+
export { betweennessCentrality, edgeBetweennessCentrality } from "./algorithms/betweenness.js";
|
|
36
38
|
export { breadthFirstSearch } from "./algorithms/bfs.js";
|
|
37
39
|
export { closenessCentrality } from "./algorithms/closeness.js";
|
|
38
40
|
export { sssp } from "./algorithms/sssp.js";
|
|
41
|
+
// ==================== algorithms (all-pairs shortest paths, design 3.3 line 813, 8.7)
|
|
42
|
+
export { allPairsShortestPath } from "./algorithms/all-pairs.js";
|
|
43
|
+
// ==================== algorithms (P11: structure and community, design 3.3 lines 806-807, 8.5, 8.6)
|
|
44
|
+
export { labelPropagation } from "./algorithms/label-propagation.js";
|
|
45
|
+
export { triangleCount } from "./algorithms/triangles.js";
|
|
39
46
|
// ==================== layouts and the accelerator (P3; the two P5 factories; P4's calibrateLayout, spec 2.2)
|
|
40
47
|
export { createAccelerator } from "./accelerator.js";
|
|
41
48
|
export { calibrateLayout } from "./layouts/calibrate.js";
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD;;;;;;;;;;;;;;;GAeG;AAEH,qHAAqH;AACrH,uBAAuB;AACvB,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,sBAAsB,EACtB,YAAY,EACZ,sBAAsB,EACtB,WAAW,EACX,aAAa,EACb,cAAc,GACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,GAEnB,MAAM,aAAa,CAAC;AAErB,uEAAuE;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,+GAA+G;AAC/G,2GAA2G;AAC3G,sDAAsD;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEt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":3,"file":"prelude.d.ts","sourceRoot":"","sources":["../../../src/kernel/prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA2BH;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUpD;AAED,iHAAiH;AACjH,eAAO,MAAM,YAAY,EAAE,MAqDzB,CAAC;AAEH,8GAA8G;AAC9G,eAAO,MAAM,aAAa,EAAE,MAAwC,CAAC;AAErE,qHAAqH;AACrH,eAAO,MAAM,6BAA6B,EAAE,MAmDsE,CAAC;AAEnH,iIAAiI;AACjI,eAAO,MAAM,4BAA4B,EAAE,MA6FuE,CAAC;AAEnH,qNAAqN;AACrN,eAAO,MAAM,mBAAmB,8EAA+E,CAAC;AAEhH;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAchD,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* covers this file's template, so no u32 sentinel or workgroup-size literal is ever typed here.
|
|
10
10
|
*/
|
|
11
11
|
import { INVALID_INDEX } from "@graphty/graph-format";
|
|
12
|
-
import { EXACT_TILES_PER_PASS, F32_INF_BITS, FA2_COINCIDENT_SQ, FA2_DISTANCE_FLOOR, FA2_DISTANCE_FLOOR_SQ, FA2_FLAG_ADAPTIVE, FA2_FLAG_FIRST, FR_COOLING_PATIENCE, FR_COOLING_STEP, GRID_BBOX_MARGIN, GRID_EXTENT_FLOOR, GRID_HUB_CELL, MAX_WORKGROUPS_PER_DIM, RADIX_BINS, U32_MAX, WORKGROUP_SIZE, } from "../constants.js";
|
|
12
|
+
import { APSP_TILE, EXACT_TILES_PER_PASS, F32_INF_BITS, FA2_COINCIDENT_SQ, FA2_DISTANCE_FLOOR, FA2_DISTANCE_FLOOR_SQ, FA2_FLAG_ADAPTIVE, FA2_FLAG_FIRST, FR_COOLING_PATIENCE, FR_COOLING_STEP, GRID_BBOX_MARGIN, GRID_EXTENT_FLOOR, GRID_HUB_CELL, GROUP_HASH_LOAD_FACTOR, MAX_WORKGROUPS_PER_DIM, RADIX_BINS, TRIANGLE_BINARY_SEARCH_RATIO, U32_MAX, WORKGROUP_SIZE, } from "../constants.js";
|
|
13
13
|
import { WebGpuGraphError } from "../errors.js";
|
|
14
14
|
/**
|
|
15
15
|
* Formats a finite number as a WGSL f32 literal that always carries a decimal point or an exponent (`0.01`,
|
|
@@ -47,6 +47,9 @@ const GRID_EXTENT_FLOOR: f32 = ${wgslF32Literal(GRID_EXTENT_FLOOR)};
|
|
|
47
47
|
const GRID_BBOX_MARGIN: f32 = ${wgslF32Literal(GRID_BBOX_MARGIN)};
|
|
48
48
|
const RADIX_BINS: u32 = ${RADIX_BINS}u;
|
|
49
49
|
const RADIX_DIGIT_MASK: u32 = ${RADIX_BINS - 1}u;
|
|
50
|
+
const APSP_TILE: u32 = ${APSP_TILE}u;
|
|
51
|
+
const GROUP_HASH_LOAD_FACTOR: u32 = ${GROUP_HASH_LOAD_FACTOR}u;
|
|
52
|
+
const TRIANGLE_BINARY_SEARCH_RATIO: u32 = ${TRIANGLE_BINARY_SEARCH_RATIO}u;
|
|
50
53
|
const F32_MAX: f32 = 0x1.fffffep+127;
|
|
51
54
|
override WG: u32 = ${WORKGROUP_SIZE}u;
|
|
52
55
|
override USE_PERM: bool = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prelude.js","sourceRoot":"","sources":["../../../src/kernel/prelude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EACH,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,UAAU,EACV,OAAO,EACP,cAAc,GACjB,MAAM,iBAAiB,CAAC;AACzB,OA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AAM,CAAC,MAAM,aAAa,GAAW,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;AAErE,qHAAqH;AACrH,MAAM,CAAC,MAAM,6BAA6B,GAAW,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHAmDkD,CAAC;AAEnH,iIAAiI;AACjI,MAAM,CAAC,MAAM,4BAA4B,GAAW,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHA6FmD,CAAC;AAEnH,qNAAqN;AACrN,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,CAAU,CAAC;AAEhH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB,MAAM,CAAC,MAAM,CAC/D;;;;;;;;;;6CAUyC;KACpC,IAAI,EAAE;KACN,KAAK,CAAC,KAAK,CAAC,CACpB,CAAC"}
|
package/dist/src/kernels.d.ts
CHANGED
|
@@ -12,15 +12,20 @@
|
|
|
12
12
|
* dedupe-claim and dedupe-filter; P8-T4 adds frontier-finalize with the FrontierCounters and FrontierParams blocks;
|
|
13
13
|
* P8-T5 adds advance-expand; P8-T6 adds bfs-contract and sssp-pred; P8-T7 adds bfs-fused; P8-T8 adds bfs-bottom-up,
|
|
14
14
|
* bfs-bitset-build and bfs-unvisited-flags; P8-T9 adds sssp-relax; P8-T10 adds bf-relax with the BfParams and BfFlags
|
|
15
|
-
* blocks; P8-T11 adds closeness-sweep and closeness-reduce
|
|
15
|
+
* blocks; P8-T11 adds closeness-sweep and closeness-reduce; P9 (betweenness) adds bc-finalize, bc-forward,
|
|
16
|
+
* bc-backward, bc-gather, bc-edge-gather and bc-forward-edge with the BcParams block; all-pairs shortest paths
|
|
17
|
+
* (design 8.7) adds apsp-init and apsp-fw with the ApspParams block. P11 (the structure and community phase, plan
|
|
18
|
+
* design/webgpu/plans/2026-09-23-webgpu-p11-structure-and-community.md) adds the graph build on the device (coo-emit,
|
|
19
|
+
* run-flags, coo-scatter), the per-row group-by-key (group-by-key-row), label propagation's step (lpa-step) and
|
|
20
|
+
* triangle counting (orient-flags, tri-intersect). This file is the only importer of src/wgsl/** (spec 3.2;
|
|
16
21
|
* test/layers.test.ts).
|
|
17
22
|
*/
|
|
18
23
|
import { UniformBlock } from "./kernel/struct-block.js";
|
|
19
24
|
import { type BindingDecl, type OverrideDecl, type WgslModuleSpec } from "./kernel/wgsl.js";
|
|
20
25
|
import { type CoreBinding } from "./memory/residency.js";
|
|
21
26
|
import { type Binding } from "./types/memory.js";
|
|
22
|
-
/** Every module id of P1-P4, P7 and
|
|
23
|
-
export type KernelId = "degree" | "reduce" | "fill" | "segmented-reduce" | "fa2-stats-finalize" | "fa2-attraction" | "fa2-repulsion-exact" | "fa2-speed-finalize" | "fa2-integrate" | "fa2-to-scene" | "spmv-pull" | "pr-scale" | "pr-finalize" | "wcc-link-sample" | "wcc-link-edges" | "wcc-compress" | "wcc-sample" | "indirect-finalize" | "scan-block" | "scan-add" | "histogram" | "counting-scatter" | "radix-hist" | "radix-scatter" | "grid-cell-key" | "grid-centroid" | "grid-centroid-hub" | "grid-downsample" | "grid-far-field" | "grid-near-field" | "compact-scatter" | "dedupe-claim" | "dedupe-filter" | "frontier-finalize" | "advance-expand" | "bfs-contract" | "sssp-pred" | "bfs-fused" | "bfs-bottom-up" | "bfs-bitset-build" | "bfs-unvisited-flags" | "bfs-next-degree" | "sssp-relax" | "bf-relax" | "closeness-sweep" | "closeness-reduce";
|
|
27
|
+
/** Every module id of P1-P4, P7, P8, P9 and P11 (later ids are appended, never renamed). */
|
|
28
|
+
export type KernelId = "degree" | "reduce" | "fill" | "segmented-reduce" | "fa2-stats-finalize" | "fa2-attraction" | "fa2-repulsion-exact" | "fa2-speed-finalize" | "fa2-integrate" | "fa2-to-scene" | "spmv-pull" | "pr-scale" | "pr-finalize" | "wcc-link-sample" | "wcc-link-edges" | "wcc-compress" | "wcc-sample" | "indirect-finalize" | "scan-block" | "scan-add" | "histogram" | "counting-scatter" | "radix-hist" | "radix-scatter" | "grid-cell-key" | "grid-centroid" | "grid-centroid-hub" | "grid-downsample" | "grid-far-field" | "grid-near-field" | "compact-scatter" | "dedupe-claim" | "dedupe-filter" | "frontier-finalize" | "advance-expand" | "bfs-contract" | "sssp-pred" | "bfs-fused" | "bfs-bottom-up" | "bfs-bitset-build" | "bfs-unvisited-flags" | "bfs-next-degree" | "sssp-relax" | "bf-relax" | "closeness-sweep" | "closeness-reduce" | "bc-finalize" | "bc-forward" | "bc-backward" | "bc-gather" | "bc-edge-gather" | "bc-forward-edge" | "apsp-init" | "apsp-fw" | "coo-emit" | "run-flags" | "coo-scatter" | "orient-flags" | "tri-intersect" | "group-by-key-row" | "lpa-step";
|
|
24
29
|
/** One registry entry: everything of a WgslModuleSpec except the per-variant overrides and snippets. */
|
|
25
30
|
export interface KernelEntry {
|
|
26
31
|
readonly id: KernelId;
|
|
@@ -34,7 +39,7 @@ export interface KernelEntry {
|
|
|
34
39
|
/** The snippet marker names the body carries (segmented-reduce: ["VALUE"]). */
|
|
35
40
|
readonly snippetSlots: readonly string[];
|
|
36
41
|
/** The phase the entry landed in (documentation and the compile-matrix filter). */
|
|
37
|
-
readonly phase: "P1" | "P2" | "P3" | "P4" | "P7" | "P8";
|
|
42
|
+
readonly phase: "P1" | "P2" | "P3" | "P4" | "P7" | "P8" | "P9" | "P11";
|
|
38
43
|
}
|
|
39
44
|
/** `RangeParams` (uniform, 32 B): rows `[start, end)` @0 / @4 of the dispatch, the bound arc window `[arcBase, arcEnd)` @8 / @12 (0 and arcCount when not windowed), `accumulate` @16 (1 combines into `out[i]` instead of overwriting: the P4 windowed loop), `n` @20 (the node count that bounds neighbour indices), `pad0` @24, `pad1` @28. */
|
|
40
45
|
export declare const RANGE_PARAMS: UniformBlock;
|
|
@@ -93,7 +98,9 @@ export declare const COMPACT_PARAMS: UniformBlock;
|
|
|
93
98
|
* one; every level kernel is a direct dispatch that reads it first -- G8-F5), `nextDegreeSum` @100 (issue #391: the
|
|
94
99
|
* out-degree sum of the vertices the level claimed, accumulated by `bfs-next-degree` at the end of every level and
|
|
95
100
|
* read, subtracted and zeroed by the next boundary -- Beamer's m_f measured on the frontier the boundary decides
|
|
96
|
-
* for, not on the one it has just expanded)
|
|
101
|
+
* for, not on the one it has just expanded); `stackTop` @104 (betweenness: the append cursor of the claim log, which
|
|
102
|
+
* `bc-finalize` also writes into `ends` at every level boundary) and `sigmaOverflow` @108 (betweenness: 1 once a u32
|
|
103
|
+
* path count wrapped) are APPENDED so every earlier word keeps its byte offset. The words nothing writes before P8-T8 / P8-T9 are declared now because
|
|
97
104
|
* the byte layout is what the single result copy decodes.
|
|
98
105
|
*/
|
|
99
106
|
export declare const FRONTIER_COUNTERS: UniformBlock;
|
|
@@ -105,14 +112,25 @@ export declare const FRONTIER_COUNTERS: UniformBlock;
|
|
|
105
112
|
* `arcEnd` @44 (the bound arc window), `predKind` @48 (0 arc, 1 node), `bitsBase` @52, `source` @56, `stride` @60
|
|
106
113
|
* (a grid-stride plan's stride), `firstOfSubmit` @64 (the boundary's index inside its submit, clamped to 1: both
|
|
107
114
|
* the unvisited-count and the unvisited-degree-sum subtraction run at >= 1, issue #391), `iteration` @68 (an
|
|
108
|
-
* `sssp-pred` hop pass, P8-T9), `
|
|
115
|
+
* `sssp-pred` hop pass, P8-T9), `perNode` @72 (`closeness-sweep`: 1 also folds every claim into the per-node
|
|
116
|
+
* distance sums of a sampled run), `pad2` @76. The `slotBase` field that once addressed the selector's indirect slots went with
|
|
109
117
|
* the slots (2026-09-25); `pad2` keeps the block an explicit 80 bytes, the way every block here is padded.
|
|
110
118
|
*/
|
|
111
119
|
export declare const FRONTIER_PARAMS: UniformBlock;
|
|
120
|
+
/** `BcParams` (uniform, 32 B; betweenness): `n` @0, `k` @4 (the batch's sources), `start` @8 (the first log index of a backward level), `count` @12 (a backward level's entries, or the edge count of `bc-forward-edge`), `stride` @16 (a grid-stride plan's stride), `role` @20 (`bc-finalize`: 0 the level boundary, 1 the seed), `pad0` @24, `pad1` @28. */
|
|
121
|
+
export declare const BC_PARAMS: UniformBlock;
|
|
112
122
|
/** `BfParams` (uniform, 16 B; P8-T10): `edgeCount` @0 (the logical edges of the `edgeList` view), `stride` @4 (the grid-stride plan's stride), `maxRetries` @8 (PD-12's compare-exchange bound), `cutoffBits` @12 (the f32 bit pattern of the CPU port's `cutoff`, `+Inf` when absent). */
|
|
113
123
|
export declare const BF_PARAMS: UniformBlock;
|
|
114
124
|
/** `BfFlags` (storage, 16 B; P8-T10): the two words `bf-relax` raises and the host reads back after every batch of rounds -- `changed` @0 (some exchange succeeded), `retryExhausted` @4 (some lane hit `maxRetries`, PD-12), `pad0` @8, `pad1` @12. Bound by the kernel as `array<atomic<u32>>`; the block is the host's decoder. */
|
|
115
125
|
export declare const BF_FLAGS: UniformBlock;
|
|
126
|
+
/** `ApspParams` (uniform, 16 B; design 8.7): `n` @0 (the node count, the matrix side), `round` @4 (the pivot block index of the blocked Floyd-Warshall round), `blocks` @8 (`ceil(n / APSP_TILE)`), `infBits` @12 (`F32_INF_BITS`: a kernel reads `+Infinity` from a uniform because Tint refuses it as a constant expression). */
|
|
127
|
+
export declare const APSP_PARAMS: UniformBlock;
|
|
128
|
+
/** `CooParams` (uniform, 16 B; P11): `count` @0 (the arcs or positions of the dispatch), `pad0` @4, `pad1` @8, `pad2` @12. The one params block of `coo-emit`, `run-flags`, `coo-scatter`, `orient-flags` and `tri-intersect`. */
|
|
129
|
+
export declare const COO_PARAMS: UniformBlock;
|
|
130
|
+
/** `GroupParams` (uniform, 16 B; P11): `rowsBase` @0 (the word of `rows` where the dispatch's row list starts), `basesBase` @4 (the word where the workgroup tier's region offsets start), `count` @8 (the rows of the dispatch), `pad0` @12. */
|
|
131
|
+
export declare const GROUP_PARAMS: UniformBlock;
|
|
132
|
+
/** `LpaParams` (uniform, 16 B; P11): `n` @0, `direction` @4 (0: a pass that moves labels down only, 1: up only), `counterIndex` @8 (the word of `counters` that receives the pass's move count), `pad0` @12. */
|
|
133
|
+
export declare const LPA_PARAMS: UniformBlock;
|
|
116
134
|
/** THE registry (spec 3.5): every entry, keyed by id. */
|
|
117
135
|
export declare const KERNELS: Readonly<Record<KernelId, KernelEntry>>;
|
|
118
136
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernels.d.ts","sourceRoot":"","sources":["../../src/kernels.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"kernels.d.ts","sourceRoot":"","sources":["../../src/kernels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,mBAAmB,CAAC;AA+DjD,4FAA4F;AAC5F,MAAM,MAAM,QAAQ,GACd,QAAQ,GACR,QAAQ,GACR,MAAM,GACN,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,oBAAoB,GACpB,eAAe,GACf,cAAc,GACd,WAAW,GACX,UAAU,GACV,aAAa,GACb,iBAAiB,GACjB,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,mBAAmB,GACnB,YAAY,GACZ,UAAU,GACV,WAAW,GACX,kBAAkB,GAClB,YAAY,GACZ,eAAe,GACf,eAAe,GACf,eAAe,GACf,mBAAmB,GACnB,iBAAiB,GACjB,gBAAgB,GAChB,iBAAiB,GACjB,iBAAiB,GACjB,cAAc,GACd,eAAe,GACf,m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