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
eaebb306
Unverified
Commit
eaebb306
authored
Aug 01, 2021
by
Shilong Zhang
Committed by
GitHub
Aug 01, 2021
Browse files
fix dcn forward and backward when batchsize is larger than im2col_step (#1212)
parent
571e3e5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
mmcv/ops/csrc/parrots/deform_conv_cuda.cu
mmcv/ops/csrc/parrots/deform_conv_cuda.cu
+4
-0
mmcv/ops/csrc/pytorch/deform_conv_cuda.cu
mmcv/ops/csrc/pytorch/deform_conv_cuda.cu
+2
-0
No files found.
mmcv/ops/csrc/parrots/deform_conv_cuda.cu
View file @
eaebb306
...
@@ -278,6 +278,8 @@ void DeformConvForwardCUDAKernelLauncher(Tensor input, Tensor weight,
...
@@ -278,6 +278,8 @@ void DeformConvForwardCUDAKernelLauncher(Tensor input, Tensor weight,
}
}
columns
=
columns
=
columns
.
view
({
columns
.
size
(
0
)
*
columns
.
size
(
1
),
columns
.
size
(
2
)});
columns
.
view
({
columns
.
size
(
0
)
*
columns
.
size
(
1
),
columns
.
size
(
2
)});
weight
=
weight
.
view
({
weight
.
size
(
0
)
*
weight
.
size
(
1
),
weight
.
size
(
2
),
weight
.
size
(
3
),
weight
.
size
(
4
)});
}
}
output_buffer
=
output_buffer
.
view
(
output_buffer
=
output_buffer
.
view
(
...
@@ -384,6 +386,8 @@ void DeformConvBackwardInputCUDAKernelLauncher(
...
@@ -384,6 +386,8 @@ void DeformConvBackwardInputCUDAKernelLauncher(
deformable_col2im
(
columns
,
offset
[
elt
],
nInputPlane
,
inputHeight
,
deformable_col2im
(
columns
,
offset
[
elt
],
nInputPlane
,
inputHeight
,
inputWidth
,
kH
,
kW
,
padH
,
padW
,
dH
,
dW
,
dilationH
,
inputWidth
,
kH
,
kW
,
padH
,
padW
,
dH
,
dW
,
dilationH
,
dilationW
,
im2col_step
,
deformable_group
,
gradInput
[
elt
]);
dilationW
,
im2col_step
,
deformable_group
,
gradInput
[
elt
]);
weight
=
weight
.
view
({
weight
.
size
(
0
)
*
weight
.
size
(
1
),
weight
.
size
(
2
),
weight
.
size
(
3
),
weight
.
size
(
4
)});
}
}
gradOutput
.
transpose_
(
1
,
2
);
gradOutput
.
transpose_
(
1
,
2
);
...
...
mmcv/ops/csrc/pytorch/deform_conv_cuda.cu
View file @
eaebb306
...
@@ -386,6 +386,8 @@ void DeformConvBackwardInputCUDAKernelLauncher(
...
@@ -386,6 +386,8 @@ void DeformConvBackwardInputCUDAKernelLauncher(
deformable_col2im
(
columns
,
offset
[
elt
],
nInputPlane
,
inputHeight
,
deformable_col2im
(
columns
,
offset
[
elt
],
nInputPlane
,
inputHeight
,
inputWidth
,
kH
,
kW
,
padH
,
padW
,
dH
,
dW
,
dilationH
,
inputWidth
,
kH
,
kW
,
padH
,
padW
,
dH
,
dW
,
dilationH
,
dilationW
,
im2col_step
,
deformable_group
,
gradInput
[
elt
]);
dilationW
,
im2col_step
,
deformable_group
,
gradInput
[
elt
]);
weight
=
weight
.
view
({
weight
.
size
(
0
)
*
weight
.
size
(
1
),
weight
.
size
(
2
),
weight
.
size
(
3
),
weight
.
size
(
4
)});
}
}
gradOutput
.
transpose_
(
1
,
2
);
gradOutput
.
transpose_
(
1
,
2
);
...
...
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