Skip to content

Commit

Permalink
Reduce ms_deformable_attn test memory usage (#1407)
Browse files Browse the repository at this point in the history
  • Loading branch information
q.yao authored Oct 15, 2021
1 parent b484aba commit 91b8478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_ops/test_ms_deformable_attn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 91b8478

Please sign in to comment.