-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathperformance.html
More file actions
389 lines (380 loc) · 18 KB
/
performance.html
File metadata and controls
389 lines (380 loc) · 18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
<!DOCTYPE html>
<html class="writer-html5" data-content_root="./" lang="en">
<head>
<meta charset="utf-8"/><meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<title>Performance Benchmarks — DGL 2.5 documentation</title>
<link href="_static/pygments.css?v=80d5e7a1" rel="stylesheet" type="text/css"/>
<link href="_static/css/theme.css?v=e59714d7" rel="stylesheet" type="text/css"/>
<link href="_static/graphviz.css?v=4ae1632d" rel="stylesheet" type="text/css"/>
<link href="_static/copybutton.css?v=76b2166b" rel="stylesheet" type="text/css"/>
<link href="_static/sg_gallery.css?v=d2d258e8" rel="stylesheet" type="text/css"/>
<link href="_static/sg_gallery-binder.css?v=f4aeca0c" rel="stylesheet" type="text/css"/>
<link href="_static/sg_gallery-dataframe.css?v=2082cf3c" rel="stylesheet" type="text/css"/>
<link href="_static/sg_gallery-rendered-html.css?v=1277b6f3" rel="stylesheet" type="text/css"/>
<link href="_static/css/custom.css?v=0bf289b5" rel="stylesheet" type="text/css"/>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=38d273f4"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
<script src="_static/copybutton.js?v=ccdb6887"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^1.0.1/dist/embed-amd.js"></script>
<script src="_static/js/theme.js"></script>
<link href="genindex.html" rel="index" title="Index"/>
<link href="search.html" rel="search" title="Search"/>
<link href="faq.html" rel="next" title="Frequently Asked Questions (FAQ)"/>
<link href="developer/ffi.html" rel="prev" title="DGL Foreign Function Interface (FFI)"/>
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav class="wy-nav-side" data-toggle="wy-nav-shift">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a class="icon icon-home" href="index.html">
DGL
</a>
<div role="search">
<form action="search.html" class="wy-form" id="rtd-search-form" method="get">
<input aria-label="Search docs" name="q" placeholder="Search docs" type="text"/>
<input name="check_keywords" type="hidden" value="yes"/>
<input name="area" type="hidden" value="default"/>
</form>
</div>
</div><div aria-label="Navigation menu" class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation">
<p class="caption" role="heading"><span class="caption-text">Get Started</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="install/index.html">Install and Setup</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/blitz/index.html">A Blitz Introduction to DGL</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Advanced Materials</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="stochastic_training/index.html">🆕 Stochastic Training of GNNs with GraphBolt</a></li>
<li class="toctree-l1"><a class="reference internal" href="guide/index.html">User Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="guide_cn/index.html">用户指南【包含过时信息】</a></li>
<li class="toctree-l1"><a class="reference internal" href="guide_ko/index.html">사용자 가이드[시대에 뒤쳐진]</a></li>
<li class="toctree-l1"><a class="reference internal" href="graphtransformer/index.html">🆕 Tutorial: Graph Transformer</a></li>
<li class="toctree-l1"><a class="reference internal" href="notebooks/sparse/index.html">Tutorials: dgl.sparse</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/cpu/index.html">Training on CPUs</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/multi/index.html">Training on Multiple GPUs</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/dist/index.html">Distributed training</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/models/index.html">Paper Study with DGL</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">API Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.html">dgl</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.data.html">dgl.data</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.dataloading.html">dgl.dataloading</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.DGLGraph.html">dgl.DGLGraph</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.distributed.html">dgl.distributed</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.function.html">dgl.function</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.geometry.html">dgl.geometry</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.graphbolt.html">🆕 dgl.graphbolt</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/nn-pytorch.html">dgl.nn (PyTorch)</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/nn.functional.html">dgl.nn.functional</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.ops.html">dgl.ops</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.optim.html">dgl.optim</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.sampling.html">dgl.sampling</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.sparse_v0.html">dgl.sparse</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/dgl.multiprocessing.html">dgl.multiprocessing</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/transforms.html">dgl.transforms</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/python/udf.html">User-defined Functions</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Notes</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="contribute.html">Contribute to DGL</a></li>
<li class="toctree-l1"><a class="reference internal" href="developer/ffi.html">DGL Foreign Function Interface (FFI)</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Performance Benchmarks</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#integrated-benchmarks">Integrated Benchmarks</a></li>
<li class="toctree-l2"><a class="reference internal" href="#v0-6-benchmarks">v0.6 Benchmarks</a></li>
<li class="toctree-l2"><a class="reference internal" href="#v0-5-benchmarks">v0.5 Benchmarks</a></li>
<li class="toctree-l2"><a class="reference internal" href="#v0-4-3-benchmarks">v0.4.3 Benchmarks</a></li>
</ul>
</li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Misc</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="faq.html">Frequently Asked Questions (FAQ)</a></li>
<li class="toctree-l1"><a class="reference internal" href="env_var.html">Environment Variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="resources.html">Resources</a></li>
</ul>
</div>
</div>
</nav>
<section class="wy-nav-content-wrap" data-toggle="wy-nav-shift"><nav aria-label="Mobile navigation menu" class="wy-nav-top">
<i class="fa fa-bars" data-toggle="wy-nav-top"></i>
<a href="index.html">DGL</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div aria-label="Page navigation" role="navigation">
<ul class="wy-breadcrumbs">
<li><a aria-label="Home" class="icon icon-home" href="index.html"></a></li>
<li class="breadcrumb-item active">Performance Benchmarks</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/performance.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div class="document" itemscope="itemscope" itemtype="http://schema.org/Article" role="main">
<div itemprop="articleBody">
<section id="performance-benchmarks">
<h1>Performance Benchmarks<a class="headerlink" href="#performance-benchmarks" title="Link to this heading"></a></h1>
<section id="integrated-benchmarks">
<h2>Integrated Benchmarks<a class="headerlink" href="#integrated-benchmarks" title="Link to this heading"></a></h2>
<p>DGL continuously evaluates the speed of its core APIs, kernels as well as the training speed
of the state-of-the-art GNN models. The benchmark code is available at
<a class="reference external" href="https://github.com/dmlc/dgl/tree/master/benchmarks">the main repository</a>. They are triggered
for every nightly-built version and the results are published to
<a class="reference external" href="https://asv.dgl.ai">https://asv.dgl.ai/</a>.</p>
</section>
<section id="v0-6-benchmarks">
<h2>v0.6 Benchmarks<a class="headerlink" href="#v0-6-benchmarks" title="Link to this heading"></a></h2>
<p>To understand the performance gain of DGL v0.6, we re-evaluated it on the v0.5 benchmarks
plus some new ones for graph classification tasks against the updated baselines. The results
are available in <a class="reference external" href="https://github.com/dglai/dgl-0.5-benchmark">a standalone repository</a>.</p>
</section>
<section id="v0-5-benchmarks">
<h2>v0.5 Benchmarks<a class="headerlink" href="#v0-5-benchmarks" title="Link to this heading"></a></h2>
<p>Check out our paper <a class="reference external" href="https://arxiv.org/abs/1909.01315">Deep Graph Library:
A Graph-Centric, Highly-Performant Package for Graph Neural Networks</a>.</p>
</section>
<section id="v0-4-3-benchmarks">
<h2>v0.4.3 Benchmarks<a class="headerlink" href="#v0-4-3-benchmarks" title="Link to this heading"></a></h2>
<p><strong>Microbenchmark on speed and memory usage</strong>:
While leaving tensor and autograd functions to backend frameworks (e.g.
PyTorch, MXNet, and TensorFlow), DGL aggressively optimizes storage and
computation with its own kernels. Here’s a comparison to another popular
package – PyTorch Geometric (PyG). The short story is that raw speed is
similar, but DGL has much better memory management.</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head" rowspan="2"><p>Dataset</p></th>
<th class="head" rowspan="2"><p>Model</p></th>
<th class="head" rowspan="2"><p>Accuracy</p></th>
<th class="head" colspan="2"><p>Time</p></th>
<th class="head" colspan="2"><p>Memory</p></th>
</tr>
<tr class="row-even"><th class="head"><p>PyG</p></th>
<th class="head"><p>DGL</p></th>
<th class="head"><p>PyG</p></th>
<th class="head"><p>DGL</p></th>
</tr>
</thead>
<tbody>
<tr class="row-odd"><td rowspan="2"><p>Cora</p></td>
<td><p>GCN</p></td>
<td><p>81.31 ± 0.88</p></td>
<td><p><strong>0.478</strong></p></td>
<td><p>0.666</p></td>
<td><p>1.1</p></td>
<td><p>1.1</p></td>
</tr>
<tr class="row-even"><td><p>GAT</p></td>
<td><p>83.98 ± 0.52</p></td>
<td><p>1.608</p></td>
<td><p><strong>1.399</strong></p></td>
<td><p>1.2</p></td>
<td><p><strong>1.1</strong></p></td>
</tr>
<tr class="row-odd"><td rowspan="2"><p>CiteSeer</p></td>
<td><p>GCN</p></td>
<td><p>70.98 ± 0.68</p></td>
<td><p><strong>0.490</strong></p></td>
<td><p>0.674</p></td>
<td><p>1.1</p></td>
<td><p>1.1</p></td>
</tr>
<tr class="row-even"><td><p>GAT</p></td>
<td><p>69.96 ± 0.53</p></td>
<td><p>1.606</p></td>
<td><p><strong>1.399</strong></p></td>
<td><p>1.3</p></td>
<td><p><strong>1.1</strong></p></td>
</tr>
<tr class="row-odd"><td rowspan="2"><p>PubMed</p></td>
<td><p>GCN</p></td>
<td><p>79.00 ± 0.41</p></td>
<td><p><strong>0.491</strong></p></td>
<td><p>0.690</p></td>
<td><p>1.1</p></td>
<td><p>1.1</p></td>
</tr>
<tr class="row-even"><td><p>GAT</p></td>
<td><p>77.65 ± 0.32</p></td>
<td><p>1.946</p></td>
<td><p><strong>1.393</strong></p></td>
<td><p>1.6</p></td>
<td><p><strong>1.1</strong></p></td>
</tr>
<tr class="row-odd"><td><p>Reddit</p></td>
<td><p>GCN</p></td>
<td><p>93.46 ± 0.06</p></td>
<td><p>OOM</p></td>
<td><p><strong>28.6</strong></p></td>
<td><p>OOM</p></td>
<td><p><strong>11.7</strong></p></td>
</tr>
<tr class="row-even"><td><p>Reddit-S</p></td>
<td><p>GCN</p></td>
<td><p>N/A</p></td>
<td><p>29.12</p></td>
<td><p><strong>9.44</strong></p></td>
<td><p>15.7</p></td>
<td><p><strong>3.6</strong></p></td>
</tr>
</tbody>
</table>
<p>Table: Training time(in seconds) for 200 epochs and memory consumption(GB)</p>
<p>Here is another comparison of DGL on TensorFlow backend with other TF-based GNN tools (training time in seconds for one epoch):</p>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head"><p>Dateset</p></th>
<th class="head"><p>Model</p></th>
<th class="head"><p>DGL</p></th>
<th class="head"><p>GraphNet</p></th>
<th class="head"><p>tf_geometric</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>Core</p></td>
<td><p>GCN</p></td>
<td><p>0.0148</p></td>
<td><p>0.0152</p></td>
<td><p>0.0192</p></td>
</tr>
<tr class="row-odd"><td><p>Reddit</p></td>
<td><p>GCN</p></td>
<td><p>0.1095</p></td>
<td><p>OOM</p></td>
<td><p>OOM</p></td>
</tr>
<tr class="row-even"><td><p>PubMed</p></td>
<td><p>GCN</p></td>
<td><p>0.0156</p></td>
<td><p>0.0553</p></td>
<td><p>0.0185</p></td>
</tr>
<tr class="row-odd"><td><p>PPI</p></td>
<td><p>GCN</p></td>
<td><p>0.09</p></td>
<td><p>0.16</p></td>
<td><p>0.21</p></td>
</tr>
<tr class="row-even"><td><p>Cora</p></td>
<td><p>GAT</p></td>
<td><p>0.0442</p></td>
<td><p>n/a</p></td>
<td><p>0.058</p></td>
</tr>
<tr class="row-odd"><td><p>PPI</p></td>
<td><p>GAT</p></td>
<td><p>0.398</p></td>
<td><p>n/a</p></td>
<td><p>0.752</p></td>
</tr>
</tbody>
</table>
<p>High memory utilization allows DGL to push the limit of single-GPU performance, as seen in below images.</p>
<img alt="http://data.dgl.ai/asset/image/DGLvsPyG-time1.png" src="http://data.dgl.ai/asset/image/DGLvsPyG-time1.png"/>
<img alt="http://data.dgl.ai/asset/image/DGLvsPyG-time2.png" src="http://data.dgl.ai/asset/image/DGLvsPyG-time2.png"/>
<p><strong>Scalability</strong>:
DGL has fully leveraged multiple GPUs in both one machine and clusters for
increasing training speed, and has better performance than alternatives, as
seen in below images.</p>
<img alt="http://data.dgl.ai/asset/image/one-four-GPUs.png" src="http://data.dgl.ai/asset/image/one-four-GPUs.png"/>
<img alt="http://data.dgl.ai/asset/image/one-four-GPUs-DGLvsGraphVite.png" src="http://data.dgl.ai/asset/image/one-four-GPUs-DGLvsGraphVite.png"/>
<img alt="http://data.dgl.ai/asset/image/one-fourMachines.png" src="http://data.dgl.ai/asset/image/one-fourMachines.png"/>
<p><strong>Further reading</strong>:
Detailed comparison of DGL and other alternatives can be found
[here](<a class="reference external" href="https://arxiv.org/abs/1909.01315">https://arxiv.org/abs/1909.01315</a>).</p>
</section>
</section>
</div>
</div>
<footer><div aria-label="Footer" class="rst-footer-buttons" role="navigation">
<a accesskey="p" class="btn btn-neutral float-left" href="developer/ffi.html" rel="prev" title="DGL Foreign Function Interface (FFI)"><span aria-hidden="true" class="fa fa-arrow-circle-left"></span> Previous</a>
<a accesskey="n" class="btn btn-neutral float-right" href="faq.html" rel="next" title="Frequently Asked Questions (FAQ)">Next <span aria-hidden="true" class="fa fa-arrow-circle-right"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2018, DGL Team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div aria-label="Versions" class="rst-versions" data-toggle="rst-versions" role="note">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Read the Docs</span>
<span id="version-placeholder">v: latest</span>
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>Versions</dt>
<div id="version-list">
</div>
</dl>
<dl>
<dt>Downloads</dt>
</dl>
<dl>
<dt>On Read the Docs</dt>
<dd><a href="//doc-build.dgl.ai/projects/dgl/?fromdocs=dgl">Project Home</a></dd>
<dd><a href="//doc-build.dgl.ai/builds/dgl/?fromdocs=dgl">Builds</a></dd>
</dl>
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
fetch('/dgl_docs/branches.json')
.then(response => response.json())
.then(data => {
var versionListDiv = document.getElementById('version-list');
data.branches.forEach(function(branch) {
var dd = document.createElement('dd');
var a = document.createElement('a');
a.href = branch.url;
a.textContent = branch.name;
dd.appendChild(a);
versionListDiv.appendChild(dd);
});
})
.catch(error => console.error('Error loading branches:', error));
});
document.addEventListener("DOMContentLoaded", function() {
// 获取当前路径
var path = window.location.pathname;
var versionPlaceholder = document.getElementById('version-placeholder');
if (path.includes('/en/')) {
var parts = path.split('/en/');
if (parts[1]) {
var folders = parts[1].split('/');
if (folders.length > 0 && folders[0]) {
versionPlaceholder.textContent = 'v: ' + folders[0];
} else {
versionPlaceholder.textContent = 'v: latest';
}
} else {
versionPlaceholder.textContent = 'v: latest';
}
} else {
versionPlaceholder.textContent = 'v: latest';
}
});
</script>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>