Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dkx/support diopi #2368

Open
wants to merge 92 commits into
base: master
Choose a base branch
from
Open

Conversation

CokeDong
Copy link
Contributor

support diopi for mmcv extension ops

@CokeDong
Copy link
Contributor Author

CokeDong commented Oct 31, 2022

依赖的PR;
https://github.com/ParrotsDL/senseparrots/pull/387 parrots仓 需要导出include/parrots/diopi.hpp,增加extension链接文件和路径等

https://github.com/ParrotsDL/DIOPI/pull/18/commits/ca1eb977e1be9a0fb25933aa601c68f6d6987802 diopi仓 MMCV的nms算子接口需要增加offset参数

@CokeDong CokeDong marked this pull request as draft October 31, 2022 07:07
@CokeDong

This comment was marked as resolved.

@CokeDong

This comment was marked as off-topic.

@@ -0,0 +1,3 @@
[submodule "DIOPI"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里暂时还没有开源,需要讨论怎么开源

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已开源。


extern "C" {

diopiError_t diopiNms(diopiContextHandle_t ctx, diopiTensorHandle_t* out, const diopiTensorHandle_t dets,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个API定义正好在diopi仓库已经定义过,如果不在的话,需要考虑补充进去

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

接口已经定义,待合入:DeepLink-org/DIOPI#13

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 IoU3DBoxesOverlapBevForwardCUDAKernelLauncher(const int num_a,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是需要删除的代码建议直接删除

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已删除

setup.py Outdated
@@ -208,9 +208,17 @@ def get_extensions():
# define_macros = [('MMCV_USE_PARROTS', None)]
define_macros = []
include_dirs = []
op_files = glob.glob('./mmcv/ops/csrc/pytorch/cuda/*.cu') +\
# op_files = glob.glob('./mmcv/ops/csrc/pytorch/cuda/*.cu') +\
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是需要删除的代码建议直接删除

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已删除

@CokeDong CokeDong marked this pull request as ready for review March 23, 2023 08:15
@CokeDong CokeDong changed the base branch from master to main April 6, 2023 03:42
@CokeDong CokeDong changed the base branch from main to master April 6, 2023 03:42
@CLAassistant
Copy link

CLAassistant commented Apr 20, 2023

CLA assistant check
All committers have signed the CLA.

@CokeDong
Copy link
Contributor Author

will replaced by :
open-mmlab/mmengine#1127
and
#2790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants