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
cf754db9
Unverified
Commit
cf754db9
authored
Jan 07, 2022
by
LudoBar
Committed by
GitHub
Jan 07, 2022
Browse files
Fix the cuda compilation error on Windows (#1643)
parent
d30e37d4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mmcv/ops/csrc/common/cuda/riroi_align_rotated_cuda_kernel.cuh
.../ops/csrc/common/cuda/riroi_align_rotated_cuda_kernel.cuh
+2
-2
mmcv/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh
mmcv/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh
+3
-3
No files found.
mmcv/ops/csrc/common/cuda/riroi_align_rotated_cuda_kernel.cuh
View file @
cf754db9
...
...
@@ -47,7 +47,7 @@ __global__ void riroi_align_rotated_forward_cuda_kernel(
// find aligned index
scalar_t
ind_float
=
theta
*
num_orientations
/
(
2
*
M_PI
);
int
ind
=
floor
(
ind_float
);
int
ind
=
floor
f
(
ind_float
);
scalar_t
l_var
=
ind_float
-
(
scalar_t
)
ind
;
scalar_t
r_var
=
1.0
-
l_var
;
// correct start channel
...
...
@@ -150,7 +150,7 @@ __global__ void riroi_align_rotated_backward_cuda_kernel(
// find aligned index
scalar_t
ind_float
=
theta
*
num_orientations
/
(
2
*
M_PI
);
int
ind
=
floor
(
ind_float
);
int
ind
=
floor
f
(
ind_float
);
scalar_t
l_var
=
ind_float
-
(
scalar_t
)
ind
;
scalar_t
r_var
=
1.0
-
l_var
;
// correct start channel
...
...
mmcv/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh
View file @
cf754db9
...
...
@@ -23,20 +23,20 @@ __global__ void dynamic_voxelize_kernel(
// To save some computation
auto
points_offset
=
points
+
index
*
num_features
;
auto
coors_offset
=
coors
+
index
*
NDim
;
int
c_x
=
floor
((
points_offset
[
0
]
-
coors_x_min
)
/
voxel_x
);
int
c_x
=
floor
f
((
points_offset
[
0
]
-
coors_x_min
)
/
voxel_x
);
if
(
c_x
<
0
||
c_x
>=
grid_x
)
{
coors_offset
[
0
]
=
-
1
;
continue
;
}
int
c_y
=
floor
((
points_offset
[
1
]
-
coors_y_min
)
/
voxel_y
);
int
c_y
=
floor
f
((
points_offset
[
1
]
-
coors_y_min
)
/
voxel_y
);
if
(
c_y
<
0
||
c_y
>=
grid_y
)
{
coors_offset
[
0
]
=
-
1
;
coors_offset
[
1
]
=
-
1
;
continue
;
}
int
c_z
=
floor
((
points_offset
[
2
]
-
coors_z_min
)
/
voxel_z
);
int
c_z
=
floor
f
((
points_offset
[
2
]
-
coors_z_min
)
/
voxel_z
);
if
(
c_z
<
0
||
c_z
>=
grid_z
)
{
coors_offset
[
0
]
=
-
1
;
coors_offset
[
1
]
=
-
1
;
...
...
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