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
91b8478c
Unverified
Commit
91b8478c
authored
Oct 15, 2021
by
q.yao
Committed by
GitHub
Oct 15, 2021
Browse files
Reduce ms_deformable_attn test memory usage (#1407)
parent
b484abac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/test_ops/test_ms_deformable_attn.py
tests/test_ops/test_ms_deformable_attn.py
+1
-1
No files found.
tests/test_ops/test_ms_deformable_attn.py
View file @
91b8478c
...
...
@@ -151,7 +151,7 @@ def test_gradient_numerical(channels,
N
,
M
,
_
=
1
,
2
,
2
Lq
,
L
,
P
=
2
,
2
,
2
shapes
=
torch
.
as_tensor
([(
6
,
4
),
(
3
,
2
)],
dtype
=
torch
.
long
).
cuda
()
shapes
=
torch
.
as_tensor
([(
3
,
2
),
(
2
,
1
)],
dtype
=
torch
.
long
).
cuda
()
level_start_index
=
torch
.
cat
((
shapes
.
new_zeros
(
(
1
,
)),
shapes
.
prod
(
1
).
cumsum
(
0
)[:
-
1
]))
S
=
sum
([(
H
*
W
).
item
()
for
H
,
W
in
shapes
])
...
...
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