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

[Feature] Add voxel ops from mmdet3d #1381

Merged
merged 13 commits into from
Oct 21, 2021

Conversation

DCNSW
Copy link
Contributor

@DCNSW DCNSW commented Sep 28, 2021

Motivation

Add voxel operation from mmdet3d (branch: v1.0.0.dev0).

Modification

Several files in mmcv/ops folder.

BC-breaking (Optional)

No.

Use cases (Optional)

from mmcv.ops import DynamicScatter, dynamic_scatter, Voxelization, voxelization

@zhouzaida zhouzaida added the CUDA label Sep 28, 2021
@codecov
Copy link

codecov bot commented Sep 28, 2021

Codecov Report

Merging #1381 (29598d8) into master (8cac7c2) will decrease coverage by 0.35%.
The diff coverage is 30.76%.

❗ Current head 29598d8 differs from pull request most recent head 17d89f3. Consider uploading reports for the commit 17d89f3 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1381      +/-   ##
==========================================
- Coverage   68.59%   68.24%   -0.36%     
==========================================
  Files         164      166       +2     
  Lines       10891    10995     +104     
  Branches     1991     1996       +5     
==========================================
+ Hits         7471     7503      +32     
- Misses       3030     3102      +72     
  Partials      390      390              
Flag Coverage Δ
unittests 68.24% <30.76%> (-0.36%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmcv/ops/voxelize.py 27.45% <27.45%> (ø)
mmcv/ops/scatter_points.py 31.37% <31.37%> (ø)
mmcv/ops/__init__.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 91b8478...17d89f3. Read the comment docs.

Copy link
Member

@grimoire grimoire left a comment

Choose a reason for hiding this comment

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

Better add a voxelize test.

mmcv/ops/csrc/common/cuda/scatter_points_cuda_kernel.cuh Outdated Show resolved Hide resolved
mmcv/ops/csrc/pytorch/cuda/scatter_points_cuda.cu Outdated Show resolved Hide resolved
mmcv/ops/csrc/common/cuda/voxelization_cuda_kernel.cuh Outdated Show resolved Hide resolved
mmcv/ops/csrc/pytorch/voxelization_cpu.cpp Outdated Show resolved Hide resolved
mmcv/ops/csrc/pytorch/cuda/voxelization_cuda.cu Outdated Show resolved Hide resolved
mmcv/ops/csrc/pytorch/voxelization_cpu.cpp Show resolved Hide resolved
mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
@zhouzaida zhouzaida mentioned this pull request Oct 8, 2021
29 tasks
mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
@grimoire
Copy link
Member

Voxelization test failed with:

E           RuntimeError: points.device().is_cpu() INTERNAL ASSERT FAILED at "/home/PJLAB/yaoqian/space/mmcv/mmcv/ops/csrc/pytorch/voxelization_cpu.cpp":99, please report a bug to PyTorch. points must be a CPU tensor

mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
mmcv/ops/voxelize.py Outdated Show resolved Hide resolved
@ZwwWayne ZwwWayne merged commit e3e1dba into open-mmlab:master Oct 21, 2021
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