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
4e773820
"git@developer.sourcefind.cn:OpenDAS/megatron-lm.git" did not exist on "be1a575e8581cc01fbffc21963a62f82b0d94f6f"
Unverified
Commit
4e773820
authored
Mar 02, 2022
by
Wenhao Wu
Committed by
GitHub
Mar 02, 2022
Browse files
support fp16 training with gather_points op (#1758)
parent
fd3a1a16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
mmcv/ops/gather_points.py
mmcv/ops/gather_points.py
+2
-2
No files found.
mmcv/ops/gather_points.py
View file @
4e773820
...
...
@@ -26,7 +26,7 @@ class GatherPoints(Function):
B
,
npoint
=
indices
.
size
()
_
,
C
,
N
=
features
.
size
()
output
=
torch
.
cuda
.
FloatTensor
(
B
,
C
,
npoint
)
output
=
features
.
new_zeros
(
(
B
,
C
,
npoint
)
)
ext_module
.
gather_points_forward
(
features
,
indices
,
output
,
b
=
B
,
c
=
C
,
n
=
N
,
npoints
=
npoint
)
...
...
@@ -41,7 +41,7 @@ class GatherPoints(Function):
idx
,
C
,
N
=
ctx
.
for_backwards
B
,
npoint
=
idx
.
size
()
grad_features
=
torch
.
cuda
.
FloatTensor
(
B
,
C
,
N
)
.
zero_
(
)
grad_features
=
grad_out
.
new_zeros
(
(
B
,
C
,
N
))
grad_out_data
=
grad_out
.
data
.
contiguous
()
ext_module
.
gather_points_backward
(
grad_out_data
,
...
...
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