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
4e768bf3
Unverified
Commit
4e768bf3
authored
Apr 06, 2023
by
CokeDong
Committed by
GitHub
Apr 06, 2023
Browse files
[Fix] Fix parrots CI (#2737)
* Chery pick from PR #2515 and #2684 * Fix
parent
d429df1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
51 deletions
+7
-51
mmcv/ops/bbox.py
mmcv/ops/bbox.py
+4
-0
mmcv/ops/csrc/parrots/cudabind.cpp
mmcv/ops/csrc/parrots/cudabind.cpp
+0
-51
setup.py
setup.py
+3
-0
No files found.
mmcv/ops/bbox.py
View file @
4e768bf3
...
@@ -116,6 +116,10 @@ def bbox_overlaps(bboxes1: torch.Tensor,
...
@@ -116,6 +116,10 @@ def bbox_overlaps(bboxes1: torch.Tensor,
if
rows
*
cols
==
0
:
if
rows
*
cols
==
0
:
return
ious
return
ious
if
bboxes1
.
device
.
type
==
'cpu'
and
torch
.
__version__
==
'parrots'
:
return
_bbox_overlaps_cpu
(
bboxes1
,
bboxes2
,
mode
=
mode
,
aligned
=
aligned
,
offset
=
offset
)
ext_module
.
bbox_overlaps
(
ext_module
.
bbox_overlaps
(
bboxes1
,
bboxes2
,
ious
,
mode
=
mode_flag
,
aligned
=
aligned
,
offset
=
offset
)
bboxes1
,
bboxes2
,
ious
,
mode
=
mode_flag
,
aligned
=
aligned
,
offset
=
offset
)
...
...
mmcv/ops/csrc/parrots/cudabind.cpp
View file @
4e768bf3
...
@@ -564,57 +564,6 @@ REGISTER_DEVICE_IMPL(group_points_forward_impl, CUDA,
...
@@ -564,57 +564,6 @@ REGISTER_DEVICE_IMPL(group_points_forward_impl, CUDA,
REGISTER_DEVICE_IMPL
(
group_points_backward_impl
,
CUDA
,
REGISTER_DEVICE_IMPL
(
group_points_backward_impl
,
CUDA
,
group_points_backward_cuda
);
group_points_backward_cuda
);
void
IoU3DBoxesOverlapBevForwardCUDAKernelLauncher
(
const
int
num_a
,
const
Tensor
boxes_a
,
const
int
num_b
,
const
Tensor
boxes_b
,
Tensor
ans_overlap
);
void
IoU3DNMS3DForwardCUDAKernelLauncher
(
const
Tensor
boxes
,
Tensor
&
keep
,
Tensor
&
keep_num
,
float
nms_overlap_thresh
);
void
IoU3DNMS3DNormalForwardCUDAKernelLauncher
(
const
Tensor
boxes
,
Tensor
&
keep
,
Tensor
&
keep_num
,
float
nms_overlap_thresh
);
void
iou3d_boxes_overlap_bev_forward_cuda
(
const
int
num_a
,
const
Tensor
boxes_a
,
const
int
num_b
,
const
Tensor
boxes_b
,
Tensor
ans_overlap
)
{
IoU3DBoxesOverlapBevForwardCUDAKernelLauncher
(
num_a
,
boxes_a
,
num_b
,
boxes_b
,
ans_overlap
);
};
void
iou3d_nms3d_forward_cuda
(
const
Tensor
boxes
,
Tensor
&
keep
,
Tensor
&
keep_num
,
float
nms_overlap_thresh
)
{
IoU3DNMS3DForwardCUDAKernelLauncher
(
boxes
,
keep
,
keep_num
,
nms_overlap_thresh
);
};
void
iou3d_nms3d_normal_forward_cuda
(
const
Tensor
boxes
,
Tensor
&
keep
,
Tensor
&
keep_num
,
float
nms_overlap_thresh
)
{
IoU3DNMS3DNormalForwardCUDAKernelLauncher
(
boxes
,
keep
,
keep_num
,
nms_overlap_thresh
);
};
void
iou3d_boxes_overlap_bev_forward_impl
(
const
int
num_a
,
const
Tensor
boxes_a
,
const
int
num_b
,
const
Tensor
boxes_b
,
Tensor
ans_overlap
);
void
iou3d_nms3d_forward_impl
(
const
Tensor
boxes
,
Tensor
&
keep
,
Tensor
&
keep_num
,
float
nms_overlap_thresh
);
void
iou3d_nms3d_normal_forward_impl
(
const
Tensor
boxes
,
Tensor
&
keep
,
Tensor
&
keep_num
,
float
nms_overlap_thresh
);
REGISTER_DEVICE_IMPL
(
iou3d_boxes_overlap_bev_forward_impl
,
CUDA
,
iou3d_boxes_overlap_bev_forward_cuda
);
REGISTER_DEVICE_IMPL
(
iou3d_nms3d_forward_impl
,
CUDA
,
iou3d_nms3d_forward_cuda
);
REGISTER_DEVICE_IMPL
(
iou3d_nms3d_normal_forward_impl
,
CUDA
,
iou3d_nms3d_normal_forward_cuda
);
void
KNNForwardCUDAKernelLauncher
(
int
b
,
int
n
,
int
m
,
int
nsample
,
void
KNNForwardCUDAKernelLauncher
(
int
b
,
int
n
,
int
m
,
int
nsample
,
const
Tensor
xyz
,
const
Tensor
new_xyz
,
const
Tensor
xyz
,
const
Tensor
new_xyz
,
Tensor
idx
,
Tensor
dist2
);
Tensor
idx
,
Tensor
dist2
);
...
...
setup.py
View file @
4e768bf3
...
@@ -153,6 +153,9 @@ def get_extensions():
...
@@ -153,6 +153,9 @@ def get_extensions():
glob
.
glob
(
'./mmcv/ops/csrc/parrots/*.cpp'
)
glob
.
glob
(
'./mmcv/ops/csrc/parrots/*.cpp'
)
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common'
))
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common'
))
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common/cuda'
))
include_dirs
.
append
(
os
.
path
.
abspath
(
'./mmcv/ops/csrc/common/cuda'
))
op_files
.
remove
(
'./mmcv/ops/csrc/pytorch/cuda/iou3d_cuda.cu'
)
op_files
.
remove
(
'./mmcv/ops/csrc/pytorch/cpu/bbox_overlaps_cpu.cpp'
)
op_files
.
remove
(
'./mmcv/ops/csrc/pytorch/cuda/bias_act_cuda.cu'
)
cuda_args
=
os
.
getenv
(
'MMCV_CUDA_ARGS'
)
cuda_args
=
os
.
getenv
(
'MMCV_CUDA_ARGS'
)
extra_compile_args
=
{
extra_compile_args
=
{
'nvcc'
:
[
cuda_args
,
'-std=c++14'
]
if
cuda_args
else
[
'-std=c++14'
],
'nvcc'
:
[
cuda_args
,
'-std=c++14'
]
if
cuda_args
else
[
'-std=c++14'
],
...
...
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