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
35a9fa40
Commit
35a9fa40
authored
Oct 20, 2021
by
yan.yan
Browse files
fix small bug for msvc
parent
c0c9073d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
setup.py
setup.py
+1
-1
spconv/csrc/sparse/pointops.py
spconv/csrc/sparse/pointops.py
+2
-3
No files found.
setup.py
View file @
35a9fa40
...
...
@@ -24,7 +24,7 @@ import re
NAME
=
'spconv'
RELEASE_NAME
=
NAME
deps
=
[
"cumm"
]
cuda_ver
=
os
.
environ
.
get
(
"CUMM_CUDA_VERSON"
,
""
)
cuda_ver
=
os
.
environ
.
get
(
"CUMM_CUDA_VERS
I
ON"
,
""
)
if
not
cuda_ver
:
nvcc_version
=
subprocess
.
check_output
([
"nvcc"
,
"--version"
]).
decode
(
"utf-8"
).
strip
()
...
...
spconv/csrc/sparse/pointops.py
View file @
35a9fa40
...
...
@@ -399,7 +399,6 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
auto N = points.dim(0);
int c;
TV_ASSERT_RT_ERR(num_features == voxels.dim(2), "your points num features doesn't equal to voxel.");
constexpr bool kUseMean =
{
pccm
.
boolean
(
mean
)
}
;
tv::dispatch<float, double>(points.dtype(), [&](auto I){{
using T = decltype(I);
auto points_rw = points.tview<T, 2>();
...
...
@@ -443,7 +442,7 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
voxels_rw(voxelidx, num, k) = points_rw(i, k);
}}
num_points_per_voxel_rw(voxelidx) += 1;
if TV_IF_CONSTEXPR (
kUseM
ean){{
if TV_IF_CONSTEXPR (
{
pccm
.
boolean
(
m
ean
)
}
)
{{
for (int k = 0; k < num_features; ++k) {{
means_rw(voxelidx, k) +=
(points_rw(i, k) - means_rw(voxelidx, k)) /
{
self
.
dtype
}
(num + 1);
...
...
@@ -453,7 +452,7 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
}}
for (int i = 0; i < voxel_num; ++i) {{
coor_to_voxelidx_rw(
{
codeops
.
unpack
(
"coors_rw"
,
range
(
self
.
ndim
),
left
=
"(i, "
,
right
=
")"
)
}
) = -1;
if TV_IF_CONSTEXPR (
kUseM
ean){{
if TV_IF_CONSTEXPR (
{
pccm
.
boolean
(
m
ean
)
}
)
{{
num = num_points_per_voxel_rw(i);
for (int j = num; j < max_num_points_per_voxel; ++j) {{
for (int k = 0; k < num_features; ++k) {{
...
...
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