Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[performance] FeatGraph TVM kernels support #2136

Closed
wants to merge 165 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
177f293
pass NDArray to python for use of tvm kernel
Jul 13, 2020
ec016e4
Merge
jermainewang Jul 13, 2020
68b7b1d
Merge remote-tracking branch 'upstream/master' into tvm-kernel
Jul 14, 2020
b7ef313
Merge branch 'master' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 15, 2020
c99ba0f
Merge remote-tracking branch 'upstream/master' into tvm-kernel
Jul 15, 2020
a8b4b9c
[Graph][CUDA] Graph on GPU and many refactoring (#1791)
jermainewang Jul 16, 2020
04dc998
upd
yzh119 Jul 16, 2020
37a6807
upd
yzh119 Jul 16, 2020
fdd06fc
integrated tvm featgraph kernel
Jul 17, 2020
4f8732f
upd
yzh119 Jul 17, 2020
6c99ff9
fix
yzh119 Jul 17, 2020
9d61466
upd
yzh119 Jul 17, 2020
5426e4d
upd
yzh119 Jul 17, 2020
d06170a
upd
yzh119 Jul 17, 2020
680d221
upd
yzh119 Jul 17, 2020
414545f
upd
yzh119 Jul 17, 2020
251b36e
trigger
yzh119 Jul 17, 2020
0a877b6
+1s
yzh119 Jul 17, 2020
40855ba
[kernel] Use heterograph index instead of unitgraph index (#1813)
yzh119 Jul 17, 2020
6f29ce2
[Graph] Mutation for Heterograph (#1818)
classicsong Jul 20, 2020
4077795
support max, min, argu/arge
Jul 20, 2020
3645ace
upd
yzh119 Jul 20, 2020
86c02fc
Merge commit '3645ace0' into graph_refactor
yzh119 Jul 20, 2020
735d067
Merge branch 'graph_refactor' of https://github.com/yzh119/dgl into g…
yzh119 Jul 20, 2020
4248073
upd
yzh119 Jul 20, 2020
a84a7d4
upd
yzh119 Jul 20, 2020
1dbf282
upd
yzh119 Jul 20, 2020
2ef52a8
fix
yzh119 Jul 21, 2020
8ffbbf6
[Transfom] Mutable transform (#1833)
classicsong Jul 21, 2020
0c02ed6
Merge branch 'master' of https://github.com/dmlc/dgl into tvm-kernel
Jul 21, 2020
5c26c9d
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into tvm…
Jul 21, 2020
f2ff485
fix idtype
Jul 21, 2020
e711a5f
[Graph] Migrate Batch & Readout module to heterograph (#1836)
jermainewang Jul 21, 2020
48de21a
upd
yzh119 Jul 21, 2020
ee35726
upd
yzh119 Jul 21, 2020
3e11057
upd
yzh119 Jul 21, 2020
d8c345e
idtype behavior; code reorg
jermainewang Jul 21, 2020
c7bf6db
idtype behavior; code reorg
jermainewang Jul 21, 2020
d2a545c
wip: test_basics
jermainewang Jul 21, 2020
d55bc4d
pass test_basics
jermainewang Jul 21, 2020
9a7971d
WIP: from nx/ to nx
jermainewang Jul 21, 2020
db5de23
missing files
jermainewang Jul 21, 2020
e5e2532
upd
yzh119 Jul 21, 2020
8132206
pass test_basics:test_nx_conversion
jermainewang Jul 22, 2020
0522fc0
Fix test
Jul 22, 2020
101a8a9
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
Jul 22, 2020
466dbac
Fix inplace update
Jul 22, 2020
b30b773
pass test_sparse
Jul 22, 2020
43a2fbd
fix
Jul 22, 2020
b5bbef1
WIP: fixing tests
jermainewang Jul 22, 2020
aed521f
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 22, 2020
d12161f
upd
yzh119 Jul 22, 2020
073d776
pass test_transform cpu
jermainewang Jul 22, 2020
083b7b6
pass gpu test_transform
jermainewang Jul 22, 2020
31f7ecb
pass test_batched_graph
jermainewang Jul 22, 2020
b2d68fc
GPU graph auto cast to int32
jermainewang Jul 22, 2020
fe9fa0e
missing file
jermainewang Jul 22, 2020
f1017eb
stash
jermainewang Jul 22, 2020
866d88a
WIP: rgcn-hetero
jermainewang Jul 22, 2020
5d7a0cc
Fix two datasety
Jul 22, 2020
2f5b684
upd
yzh119 Jul 22, 2020
6bf97db
weird
yzh119 Jul 22, 2020
3eb6d17
Fix capsuley
Jul 23, 2020
a78030d
fuck you
yzh119 Jul 23, 2020
005fdf4
fuck matthias
yzh119 Jul 23, 2020
1f62929
Fix dgmg
Jul 23, 2020
92085d2
Merge remote-tracking branch 'upstream/master' into tvm-kernel
Jul 23, 2020
4497621
Merge remote-tracking branch 'origin/master' into graph_refactor
yzh119 Jul 23, 2020
cadba66
fix bug in block degrees; pass rgcn-hetero
jermainewang Jul 23, 2020
fb9844b
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 23, 2020
98f7342
rgcn
jermainewang Jul 23, 2020
93b0237
gat and diffpool fix
Jul 23, 2020
67b7482
Tree LSTM
Jul 23, 2020
ed2e537
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
Jul 23, 2020
4cce526
upd
yzh119 Jul 23, 2020
ba99eb1
pointcloud
jermainewang Jul 23, 2020
79e9214
rrn; wip: sgc
jermainewang Jul 23, 2020
038838d
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 23, 2020
1d30c72
resolve conflicts
yzh119 Jul 23, 2020
d7ab660
resolve conflict
yzh119 Jul 23, 2020
ae4f60c
upd
yzh119 Jul 23, 2020
0bafee6
sgc and reddit dataset
jermainewang Jul 23, 2020
d1df13d
upd
yzh119 Jul 23, 2020
e4093f7
Fix deepwalk, gindt and gcn
Jul 23, 2020
44ec406
fix datasets and sign
jermainewang Jul 23, 2020
5b5c9b8
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 23, 2020
8cccc44
optimization
yzh119 Jul 23, 2020
108f6dc
optimization
yzh119 Jul 23, 2020
087755a
upd
yzh119 Jul 23, 2020
0cf99a7
upd
yzh119 Jul 23, 2020
641ad43
Fix GIN
Jul 23, 2020
9526431
merge
yzh119 Jul 24, 2020
33ce404
fix bug in add_nodes add_edges; tagcn
jermainewang Jul 24, 2020
0d176a1
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 24, 2020
dd0a16b
fix spmm kernel cache
Jul 24, 2020
4a8792f
adaptive sampling and gcmc
Jul 24, 2020
29be930
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
Jul 24, 2020
a83ec10
upd
yzh119 Jul 24, 2020
36d38ee
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
yzh119 Jul 24, 2020
ebe7d76
upd
yzh119 Jul 24, 2020
47c9850
fix geometric
yzh119 Jul 24, 2020
5a67b34
fix
jermainewang Jul 24, 2020
84dcb51
metapath2vec
jermainewang Jul 24, 2020
607ed19
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 24, 2020
7e5b369
fix agnn
yzh119 Jul 24, 2020
3b57a30
fix pickling problem of block
jermainewang Jul 24, 2020
2ef2b4e
upd
yzh119 Jul 24, 2020
0075c4d
fix utests
jermainewang Jul 24, 2020
4dd1f08
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 24, 2020
a704298
miss file
jermainewang Jul 24, 2020
fc2f781
linegraph
jermainewang Jul 24, 2020
b18e64c
upd
yzh119 Jul 24, 2020
4109b56
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
yzh119 Jul 24, 2020
1dfcd71
upd
yzh119 Jul 24, 2020
016db1d
upd
yzh119 Jul 25, 2020
3112e3c
Merge remote-tracking branch 'origin/master' into graph_refactor
yzh119 Jul 25, 2020
f6cae91
graphsage
Jul 25, 2020
b31c8a0
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
Jul 25, 2020
adf9ff2
stgcn_wave
Jul 25, 2020
70c8cde
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
Jul 25, 2020
d8df96a
fix hgt
jermainewang Jul 25, 2020
f4a539e
on unittests
jermainewang Jul 25, 2020
a70753e
Fix transformer
Jul 25, 2020
0e91d64
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
Jul 25, 2020
793bd83
Fix HAN
Jul 25, 2020
8db0097
passed pytorch unittests
jermainewang Jul 25, 2020
34c051d
lint
jermainewang Jul 25, 2020
fedc886
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 25, 2020
f51b731
fix
jermainewang Jul 25, 2020
158455d
Merge branch 'master' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 25, 2020
695c714
Fix cluster gcn
Jul 26, 2020
1b89f65
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into gra…
Jul 26, 2020
dbaa1ab
cluster-gcn is ready
Jul 26, 2020
3983584
on fixing block related codes
jermainewang Jul 26, 2020
e3f58e4
Merge branch 'graph_refactor' of github.com:dmlc/dgl into graph_refactor
jermainewang Jul 26, 2020
523bf6c
2nd order derivative
yzh119 Jul 26, 2020
4c8985f
Revert "2nd order derivative"
yzh119 Jul 26, 2020
5415504
Merge branch 'graph_refactor' of https://github.com/dmlc/dgl into tvm…
Jul 27, 2020
a03f531
add partition to dgl
Aug 4, 2020
ea7b0ff
Merge remote-tracking branch 'upstream/master' into tvm-kernel
Aug 4, 2020
5d9a79a
fix merge
Aug 4, 2020
42f0b51
fix partition
Aug 4, 2020
fe382a7
parallelize partition
Aug 5, 2020
a888499
Merge remote-tracking branch 'upstream/master' into tvm-kernel
Aug 6, 2020
cb12237
Merge remote-tracking branch 'upstream/master' into tvm-kernel
Aug 6, 2020
9db3f3b
sort before partition
Aug 7, 2020
d4b5044
pass test_sparse
Aug 7, 2020
b6cf21f
fix partition
Aug 18, 2020
3062eda
merge master
Aug 24, 2020
808b970
introduce featgraph
Aug 27, 2020
b615190
partition change parameters
Sep 1, 2020
c6aa1c3
minor fix
Sep 1, 2020
2190e6d
Merge remote-tracking branch 'upstream/master' into tvm-kernel
Sep 1, 2020
c69ece7
remove
Sep 1, 2020
d103680
fix gspmm
Sep 2, 2020
d9bc465
add support for old kernels back, switch not yet
kira-lin Sep 3, 2020
970e244
fix edge_mapping
kira-lin Sep 3, 2020
6dfbbc9
change to platform agnostic gather_row
kira-lin Sep 7, 2020
ec0629f
direct access if edge has mapping, otherwise too slow
kira-lin Sep 8, 2020
e535d31
lint
kira-lin Sep 10, 2020
57a2d5c
Merge remote-tracking branch 'origin/master' into tvm-kernel
yzh119 Sep 11, 2020
fd1af56
upd
yzh119 Sep 11, 2020
2bd6539
Merge branch 'master' into tvm-kernel
yzh119 Sep 11, 2020
d75abf7
fix spmm scheduling
kira-lin Sep 14, 2020
7ce287a
docstring
kira-lin Sep 15, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions python/dgl/heterograph_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,18 @@ def adjacency_matrix_scipy(self, etype, transpose, fmt, return_edge_ids=None):
return scipy.sparse.coo_matrix((data, (row, col)), shape=(nrows, ncols))
else:
raise Exception("unknown format")

def get_coo_dlpack(self, etype):
rst = _CAPI_DGLHeteroGetCOOMatrix(self, int(etype))
return rst(0), rst(1), rst(2)

def get_csr_dlpack(self, etype):
rst = _CAPI_DGLHeteroGetCSRMatrix(self, int(etype))
return rst(0), rst(1), rst(2)

def get_csc_dlpack(self, etype):
rst = _CAPI_DGLHeteroGetCSCMatrix(self, int(etype))
return rst(0), rst(1), rst(2)

def incidence_matrix(self, etype, typestr, ctx):
"""Return the incidence matrix representation of this graph.
Expand Down
3 changes: 2 additions & 1 deletion python/dgl/ops/spmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def gspmm(g, op, reduce_op, lhs_data, rhs_data):
lhs_data, rhs_data)
# Replace infinity with zero for isolated nodes when reducer is min/max
if reduce_op in ['min', 'max']:
ret = F.replace_inf_with_zero(ret)
#ret = F.replace_inf_with_zero(ret)
ret[g.in_degrees() == 0] = 0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a framework agnostic operator, we should use the combination of F.scatter and F.nonzero_1d .


# divide in degrees for mean reducer.
if reduce_op == 'mean':
Expand Down
Loading