isl-org / isl-org/Open3D

How building open3d for various CUDA architectures?

Open
#5,579 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

Hello. I have a problem when running open3d built on the same GPU version with other GPU versions. I used the build script https://github.com/isl-org/Open3D/blob/master/docker/docker_build.sh cuda_wheel_py310_dev on my 1080TI GPU machine (sm_code 61). After successfully building the *whl file, I install open3d on a machine with a V100 GPU (sm_code 70). Installation succeeds, but an error occurs when using functions

```src/segmentator.py:91: in predict_mask
results = self.model(inputs["data"])
/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/torch/nn/modules/module.py:1130: in _call_impl
return forward_call(*input, **kwargs)
/opt/open3d-ml/ml3d/torch/models/sparseconvnet.py:86: forward
feat_list = self.sub_sparse_conv(feat_list, pos_list, voxel_size=1.0)
/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/torch/nn/modules/module.py:1130: in _call_impl
return forward_call(*input, **kwargs)
/opt/open3d-ml/ml3d/torch/models/sparseconvnet.py:390: forward
out_feat.append(self.net(feat, in_pos, out_pos, voxel_size))
/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/torch/nn/modules/module.py:1130: in _call_impl
return forward_call(*input, **kwargs)
/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/open3d/ml/torch/python/layers/convolutions.py:501: in forward
self.nns = self.fixed_radius_search(
/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/torch/nn/modules/module.py:1130: in _call_impl
return forward_call(*input, **kwargs)
/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/open3d/ml/torch/python/layers/neighbor_search.py:154: in forward
result = ops.fixed_radius_search(
/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/open3d/ml/torch/python/ops.py:877: in fixed_radius_search
*_torch.ops.open3d.fixed_radius_search(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = , args = ()
kwargs = {'hash_table_cell_splits': tensor([ 0, 0, 0, -1215135857, -1247819812,
92484002...a:0', dtype=torch.int32), 'hash_table_splits': tensor([ 0, 384], dtype=torch.int32), 'ignore_query_point': False, ...}

def __call__(self, *args, **kwargs):
# overloading __call__ to ensure torch.ops.foo.bar()
# is still callable from JIT
# We save the function ptr as the `op` attribute on
# OpOverloadPacket to access it here.
> return self._op(*args, **kwargs or {})
E RuntimeError: Trying to create tensor with negative dimension -5394801434127068701: [-5394801434127068701]

/root/.pyenv/versions/3.10.7/lib/python3.10/site-packages/torch/_ops.py:143: RuntimeError
```

This error is eliminated if open3d building a machine with GPU v100.

I know cmake has options to set architectures. For example:
-DCMAKE_CUDA_ARCHITECTURES="60;61;70"

How to pass these flags to the build tool https://github.com/isl-org/Open3D/blob/master/docker/docker_build.sh and is it possible to build open3d for different CUDA architectures?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.