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-cluster
Commits
199be867
Commit
199be867
authored
Nov 14, 2018
by
rusty1s
Browse files
skip if cuda not available
parent
1f2c3c31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
test/test_fps.py
test/test_fps.py
+2
-0
No files found.
test/test_fps.py
View file @
199be867
...
...
@@ -9,6 +9,7 @@ from .utils import tensor, grad_dtypes
devices
=
[
torch
.
device
(
'cuda'
)]
@
pytest
.
mark
.
skipif
(
not
torch
.
cuda
.
is_available
(),
reason
=
'CUDA not available'
)
@
pytest
.
mark
.
parametrize
(
'dtype,device'
,
product
(
grad_dtypes
,
devices
))
def
test_fps
(
dtype
,
device
):
x
=
tensor
([
...
...
@@ -27,6 +28,7 @@ def test_fps(dtype, device):
assert
out
.
tolist
()
==
[
0
,
2
,
4
,
6
]
@
pytest
.
mark
.
skipif
(
not
torch
.
cuda
.
is_available
(),
reason
=
'CUDA not available'
)
@
pytest
.
mark
.
parametrize
(
'dtype,device'
,
product
(
grad_dtypes
,
devices
))
def
test_fps_speed
(
dtype
,
device
):
return
...
...
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