Skip to content

Commit

Permalink
update. (dmlc#1857)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <[email protected]>
  • Loading branch information
zheng-da and Ubuntu authored Jul 24, 2020
1 parent 53fc639 commit 0e896a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/dgl/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def metis_partition_assignment(g, k, balance_ntypes=None, balance_edges=False):
nids = F.asnumpy(F.nonzero_1d(balance_ntypes == ntype))
degs = np.zeros((g.number_of_nodes(),), np.int64)
degs[nids] = F.asnumpy(g.in_degrees(nids))
vwgt.append(F.tensor(degs))
vwgt.append(F.zerocopy_from_numpy(degs))

# The vertex weights have to be stored in a vector.
if len(vwgt) > 0:
Expand Down
2 changes: 1 addition & 1 deletion python/dgl/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ def metis_partition_assignment(g, k, balance_ntypes=None, balance_edges=False):
nids = F.asnumpy(F.nonzero_1d(balance_ntypes == ntype))
degs = np.zeros((g.number_of_nodes(),), np.int64)
degs[nids] = F.asnumpy(g.in_degrees(nids))
vwgt.append(F.tensor(degs))
vwgt.append(F.zerocopy_from_numpy(degs))

# The vertex weights have to be stored in a vector.
if len(vwgt) > 0:
Expand Down
2 changes: 1 addition & 1 deletion third_party/METIS

0 comments on commit 0e896a9

Please sign in to comment.