Commit 76379f8b authored by rusty1s's avatar rusty1s
Browse files

try to build with metis

parent 76ccc51d
...@@ -60,6 +60,7 @@ jobs: ...@@ -60,6 +60,7 @@ jobs:
install: install:
- source script/cuda.sh - source script/cuda.sh
- source script/conda.sh - source script/conda.sh
- source script/metis.sh
- conda create --yes -n test python="${PYTHON_VERSION}" - conda create --yes -n test python="${PYTHON_VERSION}"
- source activate test - source activate test
- conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch --yes - conda install pytorch=${TORCH_VERSION} ${TOOLKIT} -c pytorch --yes
......
#!/bin/bash
METIS=metis-5.1.0
wget -nv http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/${METIS}.tar.gz
tar -xvzf ${METIS}.tar.gz
cd ${METIS} || exit
sed -i.bak -e 's/IDXTYPEWIDTH 32/IDXTYPEWIDTH 64/g' include/metis.h
make config
make
make install
import pytest
import torch
from torch_sparse.tensor import SparseTensor
from .utils import devices
@pytest.mark.parametrize('device', devices)
def test_metis(device):
mat = SparseTensor.from_dense(torch.randn((6, 6), device=device))
mat, partptr, perm = mat.partition_kway(num_parts=2)
assert partptr.tolist() == [0, 3, 6]
assert perm.tolist() == [0, 1, 2, 3, 4, 5]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment