Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-sparse
Commits
04da17c7
Commit
04da17c7
authored
Feb 20, 2020
by
rusty1s
Browse files
fix tests
parent
e82eae1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
test/test_metis.py
test/test_metis.py
+2
-2
No files found.
test/test_metis.py
View file @
04da17c7
...
@@ -9,5 +9,5 @@ from .utils import devices
...
@@ -9,5 +9,5 @@ from .utils import devices
def
test_metis
(
device
):
def
test_metis
(
device
):
mat
=
SparseTensor
.
from_dense
(
torch
.
randn
((
6
,
6
),
device
=
device
))
mat
=
SparseTensor
.
from_dense
(
torch
.
randn
((
6
,
6
),
device
=
device
))
mat
,
partptr
,
perm
=
mat
.
partition_kway
(
num_parts
=
2
)
mat
,
partptr
,
perm
=
mat
.
partition_kway
(
num_parts
=
2
)
assert
partptr
.
tolist
()
==
[
0
,
3
,
6
]
assert
partptr
.
numel
()
==
3
assert
perm
.
tolist
()
==
[
0
,
1
,
2
,
3
,
4
,
5
]
assert
perm
.
nume
()
==
6
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment