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
mmdetection3d
Commits
ed3e1b77
Commit
ed3e1b77
authored
Jun 18, 2020
by
zhangwenwei
Browse files
Fix compilation failure in PyTorch1.5
parent
b5f1f52f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
10 deletions
+14
-10
mmdet3d/ops/ball_query/src/ball_query.cpp
mmdet3d/ops/ball_query/src/ball_query.cpp
+1
-1
mmdet3d/ops/furthest_point_sample/src/furthest_point_sample.cpp
...d/ops/furthest_point_sample/src/furthest_point_sample.cpp
+1
-1
mmdet3d/ops/gather_points/src/gather_points.cpp
mmdet3d/ops/gather_points/src/gather_points.cpp
+2
-2
mmdet3d/ops/group_points/src/group_points.cpp
mmdet3d/ops/group_points/src/group_points.cpp
+2
-2
mmdet3d/ops/interpolate/src/interpolate.cpp
mmdet3d/ops/interpolate/src/interpolate.cpp
+3
-3
setup.py
setup.py
+5
-1
No files found.
mmdet3d/ops/ball_query/src/ball_query.cpp
View file @
ed3e1b77
...
@@ -33,7 +33,7 @@ int ball_query_wrapper(int b, int n, int m, float radius, int nsample,
...
@@ -33,7 +33,7 @@ int ball_query_wrapper(int b, int n, int m, float radius, int nsample,
const
float
*
xyz
=
xyz_tensor
.
data_ptr
<
float
>
();
const
float
*
xyz
=
xyz_tensor
.
data_ptr
<
float
>
();
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
ball_query_kernel_launcher
(
b
,
n
,
m
,
radius
,
nsample
,
new_xyz
,
xyz
,
idx
,
ball_query_kernel_launcher
(
b
,
n
,
m
,
radius
,
nsample
,
new_xyz
,
xyz
,
idx
,
stream
);
stream
);
return
1
;
return
1
;
...
...
mmdet3d/ops/furthest_point_sample/src/furthest_point_sample.cpp
View file @
ed3e1b77
...
@@ -24,7 +24,7 @@ int furthest_point_sampling_wrapper(int b, int n, int m,
...
@@ -24,7 +24,7 @@ int furthest_point_sampling_wrapper(int b, int n, int m,
float
*
temp
=
temp_tensor
.
data_ptr
<
float
>
();
float
*
temp
=
temp_tensor
.
data_ptr
<
float
>
();
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
furthest_point_sampling_kernel_launcher
(
b
,
n
,
m
,
points
,
temp
,
idx
,
stream
);
furthest_point_sampling_kernel_launcher
(
b
,
n
,
m
,
points
,
temp
,
idx
,
stream
);
return
1
;
return
1
;
}
}
...
...
mmdet3d/ops/gather_points/src/gather_points.cpp
View file @
ed3e1b77
...
@@ -32,7 +32,7 @@ int gather_points_wrapper(int b, int c, int n, int npoints,
...
@@ -32,7 +32,7 @@ int gather_points_wrapper(int b, int c, int n, int npoints,
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
float
*
out
=
out_tensor
.
data_ptr
<
float
>
();
float
*
out
=
out_tensor
.
data_ptr
<
float
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
gather_points_kernel_launcher
(
b
,
c
,
n
,
npoints
,
points
,
idx
,
out
,
stream
);
gather_points_kernel_launcher
(
b
,
c
,
n
,
npoints
,
points
,
idx
,
out
,
stream
);
return
1
;
return
1
;
}
}
...
@@ -45,7 +45,7 @@ int gather_points_grad_wrapper(int b, int c, int n, int npoints,
...
@@ -45,7 +45,7 @@ int gather_points_grad_wrapper(int b, int c, int n, int npoints,
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
float
*
grad_points
=
grad_points_tensor
.
data_ptr
<
float
>
();
float
*
grad_points
=
grad_points_tensor
.
data_ptr
<
float
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
gather_points_grad_kernel_launcher
(
b
,
c
,
n
,
npoints
,
grad_out
,
idx
,
gather_points_grad_kernel_launcher
(
b
,
c
,
n
,
npoints
,
grad_out
,
idx
,
grad_points
,
stream
);
grad_points
,
stream
);
return
1
;
return
1
;
...
...
mmdet3d/ops/group_points/src/group_points.cpp
View file @
ed3e1b77
...
@@ -32,7 +32,7 @@ int group_points_grad_wrapper(int b, int c, int n, int npoints, int nsample,
...
@@ -32,7 +32,7 @@ int group_points_grad_wrapper(int b, int c, int n, int npoints, int nsample,
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
const
float
*
grad_out
=
grad_out_tensor
.
data_ptr
<
float
>
();
const
float
*
grad_out
=
grad_out_tensor
.
data_ptr
<
float
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
group_points_grad_kernel_launcher
(
b
,
c
,
n
,
npoints
,
nsample
,
grad_out
,
idx
,
group_points_grad_kernel_launcher
(
b
,
c
,
n
,
npoints
,
nsample
,
grad_out
,
idx
,
grad_points
,
stream
);
grad_points
,
stream
);
...
@@ -46,7 +46,7 @@ int group_points_wrapper(int b, int c, int n, int npoints, int nsample,
...
@@ -46,7 +46,7 @@ int group_points_wrapper(int b, int c, int n, int npoints, int nsample,
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
float
*
out
=
out_tensor
.
data_ptr
<
float
>
();
float
*
out
=
out_tensor
.
data_ptr
<
float
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
group_points_kernel_launcher
(
b
,
c
,
n
,
npoints
,
nsample
,
points
,
idx
,
out
,
group_points_kernel_launcher
(
b
,
c
,
n
,
npoints
,
nsample
,
points
,
idx
,
out
,
stream
);
stream
);
...
...
mmdet3d/ops/interpolate/src/interpolate.cpp
View file @
ed3e1b77
...
@@ -48,7 +48,7 @@ void three_nn_wrapper(int b, int n, int m, at::Tensor unknown_tensor,
...
@@ -48,7 +48,7 @@ void three_nn_wrapper(int b, int n, int m, at::Tensor unknown_tensor,
float
*
dist2
=
dist2_tensor
.
data_ptr
<
float
>
();
float
*
dist2
=
dist2_tensor
.
data_ptr
<
float
>
();
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
three_nn_kernel_launcher
(
b
,
n
,
m
,
unknown
,
known
,
dist2
,
idx
,
stream
);
three_nn_kernel_launcher
(
b
,
n
,
m
,
unknown
,
known
,
dist2
,
idx
,
stream
);
}
}
...
@@ -61,7 +61,7 @@ void three_interpolate_wrapper(int b, int c, int m, int n,
...
@@ -61,7 +61,7 @@ void three_interpolate_wrapper(int b, int c, int m, int n,
float
*
out
=
out_tensor
.
data_ptr
<
float
>
();
float
*
out
=
out_tensor
.
data_ptr
<
float
>
();
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
three_interpolate_kernel_launcher
(
b
,
c
,
m
,
n
,
points
,
idx
,
weight
,
out
,
three_interpolate_kernel_launcher
(
b
,
c
,
m
,
n
,
points
,
idx
,
weight
,
out
,
stream
);
stream
);
}
}
...
@@ -76,7 +76,7 @@ void three_interpolate_grad_wrapper(int b, int c, int n, int m,
...
@@ -76,7 +76,7 @@ void three_interpolate_grad_wrapper(int b, int c, int n, int m,
float
*
grad_points
=
grad_points_tensor
.
data_ptr
<
float
>
();
float
*
grad_points
=
grad_points_tensor
.
data_ptr
<
float
>
();
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
const
int
*
idx
=
idx_tensor
.
data_ptr
<
int
>
();
cudaStream_t
stream
=
THCState_
getCurrentStream
(
state
);
cudaStream_t
stream
=
at
::
cuda
::
getCurrent
CUDA
Stream
(
).
stream
(
);
three_interpolate_grad_kernel_launcher
(
b
,
c
,
n
,
m
,
grad_out
,
idx
,
weight
,
three_interpolate_grad_kernel_launcher
(
b
,
c
,
n
,
m
,
grad_out
,
idx
,
weight
,
grad_points
,
stream
);
grad_points
,
stream
);
}
}
...
...
setup.py
View file @
ed3e1b77
...
@@ -229,7 +229,11 @@ if __name__ == '__main__':
...
@@ -229,7 +229,11 @@ if __name__ == '__main__':
name
=
'sparse_conv_ext'
,
name
=
'sparse_conv_ext'
,
module
=
'mmdet3d.ops.spconv'
,
module
=
'mmdet3d.ops.spconv'
,
extra_include_path
=
[
extra_include_path
=
[
os
.
path
.
join
(
*
'mmdet3d.ops.spconv'
.
split
(
'.'
),
'include/'
)
# PyTorch 1.5 uses ninjia, which requires absolute path
# of included files, relative path will cause failure.
os
.
path
.
abspath
(
os
.
path
.
join
(
*
'mmdet3d.ops.spconv'
.
split
(
'.'
),
'include/'
))
],
],
sources
=
[
sources
=
[
'src/all.cc'
,
'src/all.cc'
,
...
...
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