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
".github/vscode:/vscode.git/clone" did not exist on "5153528cfe7e49fc4c5abb2db8924c26fbd7f9c5"
Commit
35a9fa40
authored
Oct 20, 2021
by
yan.yan
Browse files
fix small bug for msvc
parent
c0c9073d
Changes
2
Hide 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
...
@@ -24,7 +24,7 @@ import re
NAME
=
'spconv'
NAME
=
'spconv'
RELEASE_NAME
=
NAME
RELEASE_NAME
=
NAME
deps
=
[
"cumm"
]
deps
=
[
"cumm"
]
cuda_ver
=
os
.
environ
.
get
(
"CUMM_CUDA_VERSON"
,
""
)
cuda_ver
=
os
.
environ
.
get
(
"CUMM_CUDA_VERS
I
ON"
,
""
)
if
not
cuda_ver
:
if
not
cuda_ver
:
nvcc_version
=
subprocess
.
check_output
([
"nvcc"
,
"--version"
nvcc_version
=
subprocess
.
check_output
([
"nvcc"
,
"--version"
]).
decode
(
"utf-8"
).
strip
()
]).
decode
(
"utf-8"
).
strip
()
...
...
spconv/csrc/sparse/pointops.py
View file @
35a9fa40
...
@@ -399,7 +399,6 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
...
@@ -399,7 +399,6 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
auto N = points.dim(0);
auto N = points.dim(0);
int c;
int c;
TV_ASSERT_RT_ERR(num_features == voxels.dim(2), "your points num features doesn't equal to voxel.");
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){{
tv::dispatch<float, double>(points.dtype(), [&](auto I){{
using T = decltype(I);
using T = decltype(I);
auto points_rw = points.tview<T, 2>();
auto points_rw = points.tview<T, 2>();
...
@@ -443,7 +442,7 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
...
@@ -443,7 +442,7 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
voxels_rw(voxelidx, num, k) = points_rw(i, k);
voxels_rw(voxelidx, num, k) = points_rw(i, k);
}}
}}
num_points_per_voxel_rw(voxelidx) += 1;
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) {{
for (int k = 0; k < num_features; ++k) {{
means_rw(voxelidx, k) +=
means_rw(voxelidx, k) +=
(points_rw(i, k) - means_rw(voxelidx, k)) /
{
self
.
dtype
}
(num + 1);
(points_rw(i, k) - means_rw(voxelidx, k)) /
{
self
.
dtype
}
(num + 1);
...
@@ -453,7 +452,7 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
...
@@ -453,7 +452,7 @@ class Point2VoxelCPU(pccm.ParameterizedClass, pccm.pybind.PybindClassMixin):
}}
}}
for (int i = 0; i < voxel_num; ++i) {{
for (int i = 0; i < voxel_num; ++i) {{
coor_to_voxelidx_rw(
{
codeops
.
unpack
(
"coors_rw"
,
range
(
self
.
ndim
),
left
=
"(i, "
,
right
=
")"
)
}
) = -1;
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);
num = num_points_per_voxel_rw(i);
for (int j = num; j < max_num_points_per_voxel; ++j) {{
for (int j = num; j < max_num_points_per_voxel; ++j) {{
for (int k = 0; k < num_features; ++k) {{
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