Skip to content

Commit 660f356

Browse files
committed
Merge branch 'master' of github.com:zzhang-cn/dgl into 0.2.x
2 parents c4082be + 2ade0ef commit 660f356

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

python/dgl/nodeflow.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,10 @@ def block_edges(self, block_id):
413413
The edge ids.
414414
"""
415415
layer0_size = self._layer_offsets[block_id + 1] - self._layer_offsets[block_id]
416-
rst = _CAPI_NodeFlowGetBlockAdj(self._graph._handle, "coo", layer0_size,
417-
self._layer_offsets[block_id + 1],
418-
self._layer_offsets[block_id + 2])
416+
rst = _CAPI_NodeFlowGetBlockAdj(self._graph._handle, "coo",
417+
int(layer0_size),
418+
int(self._layer_offsets[block_id + 1]),
419+
int(self._layer_offsets[block_id + 2]))
419420
idx = utils.toindex(rst(0)).tousertensor()
420421
eid = utils.toindex(rst(1))
421422
num_edges = int(len(idx) / 2)
@@ -446,9 +447,10 @@ def block_adjacency_matrix(self, block_id, ctx):
446447
fmt = F.get_preferred_sparse_format()
447448
# We need to extract two layers.
448449
layer0_size = self._layer_offsets[block_id + 1] - self._layer_offsets[block_id]
449-
rst = _CAPI_NodeFlowGetBlockAdj(self._graph._handle, fmt, layer0_size,
450-
self._layer_offsets[block_id + 1],
451-
self._layer_offsets[block_id + 2])
450+
rst = _CAPI_NodeFlowGetBlockAdj(self._graph._handle, fmt,
451+
int(layer0_size),
452+
int(self._layer_offsets[block_id + 1]),
453+
int(self._layer_offsets[block_id + 2]))
452454
num_rows = self.layer_size(block_id + 1)
453455
num_cols = self.layer_size(block_id)
454456

tests/scripts/build_dgl.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ popd
1515
pushd python
1616
rm -rf build *.egg-info dist
1717
pip3 uninstall -y dgl
18+
# test install
1819
python3 setup.py install
20+
# test inplace build (for cython)
21+
python3 setup.py build_ext --inplace
1922
popd

0 commit comments

Comments
 (0)