Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
116092ec
Commit
116092ec
authored
Jun 05, 2020
by
yanyan
Browse files
small change
parent
d17a00e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
5 deletions
+1
-5
spconv/pool.py
spconv/pool.py
+0
-5
test/benchmark.py
test/benchmark.py
+1
-0
No files found.
spconv/pool.py
View file @
116092ec
...
...
@@ -60,8 +60,6 @@ class SparseMaxPool(SparseModule):
indices
=
input
.
indices
spatial_shape
=
input
.
spatial_shape
batch_size
=
input
.
batch_size
torch
.
cuda
.
synchronize
()
t
=
time
.
time
()
if
not
self
.
subm
:
out_spatial_shape
=
ops
.
get_conv_output_size
(
spatial_shape
,
self
.
kernel_size
,
self
.
stride
,
self
.
padding
,
...
...
@@ -75,9 +73,6 @@ class SparseMaxPool(SparseModule):
out_features
=
Fsp
.
indice_maxpool
(
features
,
indice_pairs
.
to
(
device
),
indice_pairs_num
.
to
(
device
),
outids
.
shape
[
0
])
torch
.
cuda
.
synchronize
()
print
(
"maxpool"
,
spatial_shape
,
time
.
time
()
-
t
)
out_tensor
=
spconv
.
SparseConvTensor
(
out_features
,
outids
,
out_spatial_shape
,
batch_size
)
out_tensor
.
indice_dict
=
input
.
indice_dict
...
...
test/benchmark.py
View file @
116092ec
...
...
@@ -56,6 +56,7 @@ class Net(nn.Module):
spconv
.
SubMConv3d
(
256
,
256
,
3
,
bias
=
False
,
indice_key
=
"c6"
),
)
max_batch_size
=
1
# grid (dense map) is used for indice generation. use pre-allocated grid can run faster.
self
.
grid
=
torch
.
full
([
max_batch_size
,
*
shape
],
-
1
,
dtype
=
torch
.
int32
).
cuda
()
# self.grid = None
self
.
shape
=
shape
...
...
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