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
MMCV
Commits
e7adffb9
Unverified
Commit
e7adffb9
authored
Mar 19, 2023
by
Zaida Zhou
Committed by
GitHub
Mar 19, 2023
Browse files
[Fix] Skip filtered_lrelu ut when cuda is less than 10.2 (#2677)
parent
d31b2212
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
tests/test_ops/test_filtered_lrelu.py
tests/test_ops/test_filtered_lrelu.py
+5
-1
No files found.
tests/test_ops/test_filtered_lrelu.py
View file @
e7adffb9
# Copyright (c) OpenMMLab. All rights reserved.
import
pytest
import
torch
from
mmengine.utils
import
digit_version
from
mmcv.ops
import
filtered_lrelu
...
...
@@ -113,7 +114,10 @@ class TestFilteredLrelu:
self
.
input_tensor
,
bias
=
self
.
bias
,
flip_filter
=
True
)
assert
out
.
shape
==
(
1
,
3
,
16
,
16
)
@
pytest
.
mark
.
skipif
(
not
torch
.
cuda
.
is_available
(),
reason
=
'requires cuda'
)
@
pytest
.
mark
.
skipif
(
not
torch
.
cuda
.
is_available
()
or
digit_version
(
torch
.
version
.
cuda
)
<
digit_version
(
'10.2'
),
reason
=
'requires cuda>=10.2'
)
def
test_filtered_lrelu_cuda
(
self
):
out
=
filtered_lrelu
(
self
.
input_tensor
.
cuda
(),
bias
=
self
.
bias
.
cuda
())
assert
out
.
shape
==
(
1
,
3
,
16
,
16
)
...
...
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