point-in-rbbox CUDA ops
Project description
# 功能
实现`point-in-rbbox`CUDA算子,用于计算3D旋转框内的点云,相比PyTorch版本显存有明显优化
# 依赖
- CUDA:11.8
- PyTorch:2.0.0
# 安装
- pip安装
```shell
export TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX" # 支持不同GPU架构【可选】
export ENABLE_BF16=1 # 支持BF16【可选,部分GPU可能不支持】
python3 -m pip install points-in-rbbox
```
- 源码安装
```shell
git clone https://github.com/lh9171338/points-in-rbbox.git
cd points-in-rbbox
export TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0 7.5 8.0 8.6 8.9 9.0+PTX" # 支持不同GPU架构【可选】
export ENABLE_BF16=1 # 支持BF16【可选,部分GPU可能不支持】
python3 setup.py install
```
# 使用
```python
from points_in_rbbox import points_in_rbbox_cuda
mask = points_in_rbbox_cuda(points, boxes)
```
# 显存&耗时
| 方法 | dtype | 显存(GB) | 耗时(s) |
| :---: | :---: | :---: | :---: |
| points_in_rbbox_torch | FP32 | 10.0 | 12 |
| points_in_rbbox_torch | FP16 | 5.3 | 10 |
| points_in_rbbox_torch | BF16 | 5.3 | 10 |
| points_in_rbbox_cuda | FP32 | 1.2 | 9 |
| points_in_rbbox_cuda | FP16 | 1.0 | 9 |
| points_in_rbbox_cuda | BF16 | 1.0 | 9 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
points_in_rbbox-1.1.6.tar.gz
(5.5 kB
view details)
File details
Details for the file points_in_rbbox-1.1.6.tar.gz.
File metadata
- Download URL: points_in_rbbox-1.1.6.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5d410d8575c3f23ee3335eed97d7e45657388eb7da258891e0f9e8935830d73
|
|
| MD5 |
bdd9928ac232333e2ee7b3e6b9e84523
|
|
| BLAKE2b-256 |
7de511a83f5d2077a1542385f7832c40233fb48b44caa91d8f7f292adc7de190
|