@antv/webgpu-graph
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

AntV Graph Algorithm based on WebGPU

webgpu-graph is a GPU accelerated graph analytics library, with functionality like WebGPU which provides modern features such as compute shader(in WGSL). Compared with CPU version, we almost gain ~100x speed up with big datasets.

It's inspired by cuGraph and other implementations based on CUDA.

Docs:

Prerequisite

How to use WebGPU

For our examples, we use origin trial. The origin trial is expected to end in Chrome 101 (May 18, 2022).

Since we are using latest syntax of WGSL, you'd better update your Chrome to the latest version.

Usage

import { pageRank, WebGPUGraph } from '@antv/webgpu-graph';

// initialize WebGPU context
const graph = new WebGPUGraph();

// call async method
const result = await graph.pageRank(graph_data, eps, alpha, max_iter);

Building

  • Install dependencies: yarn install
  • For production, compile the project: yarn build

Benchmark

name vertices and edges CPU time elapsed GPU time elapsed Speed up
SSSP 1k vertices & 5k edges 27687.10 ms 261.60 ms ~100x
PageRank 1k vertices & 500k edges 13641.50 ms 130.20 ms ~100x

Package Sidebar

Install

npm i @antv/webgpu-graph

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.03 MB

Total Files

42

Last publish

Collaborators

  • lvisei
  • yisi.wang
  • basketduck
  • biupiubiupiu
  • flash1
  • dreammy23
  • laixingui.lxg
  • zhangjunjie-loki
  • rainy25ghz
  • zeyuwang
  • yanxiong
  • susiwen8
  • freestyle21
  • soundquiet
  • elaine.q.10
  • sturuby
  • sakuya223
  • serializedowen
  • xdzhao
  • yangzhanmei
  • wjgogogo
  • leungwensen
  • dori
  • iaaron
  • yard
  • simaq
  • dxq613
  • intchous
  • susan_ann
  • jinke.li
  • lzxue
  • army8735
  • atool
  • baizn
  • dengfuping
  • neoddish
  • jeffy2012
  • zqlu
  • afc163
  • pomelo-nwu
  • kopiluwaky
  • ccnuzindex
  • panyuqi
  • bubkoo
  • zengyue
  • kasmine
  • boyu.zlj
  • l1ud0ngq1
  • newbyvector
  • winniexing
  • chenluli
  • kn9117
  • xdddst
  • semious2020
  • esora
  • nadia_liu
  • bbsqq
  • mxz96102
  • openwayne
  • pearmini
  • pddpd
  • yiqianyao
  • zhanba
  • cxxxxxn