Skip to content

Commit

Permalink
Fix shape of node_weight in METIS (#342)
Browse files Browse the repository at this point in the history
* update

* update
  • Loading branch information
rusty1s authored Sep 12, 2023
1 parent 14781cb commit 3246352
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
- name: Install main package
run: |
pip install scipy
python setup.py develop
env:
WITH_METIS: 1
Expand Down
2 changes: 1 addition & 1 deletion torch_sparse/metis.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def partition(
value = None

if balance_edge:
node_weight = col.new_zeros(col.size(0))
node_weight = col.new_zeros(rowptr.numel() - 1)
node_weight.scatter_add_(0, col, torch.ones_like(col))

if node_weight is not None:
Expand Down

0 comments on commit 3246352

Please sign in to comment.