Skip to content

Commit 14010c1

Browse files
Merge pull request #18 from OlafenwaMoses/main
release - hardware acceleration and stereodepth doc
2 parents fbcbe26 + d1af711 commit 14010c1

3 files changed

Lines changed: 119 additions & 110 deletions

File tree

docs/hardware_acceleration.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Hardware Acceleration
2+
3+
vizion3d detects the best available device automatically at runtime — no code changes required. Choose the install extra that matches your hardware.
4+
5+
| Backend | Hardware | Platforms | What drives inference |
6+
|---|---|---|---|
7+
| **CPU** | Any processor | Linux, Windows, macOS | PyTorch CPU kernels |
8+
| **CUDA** | NVIDIA GPU (Kepler+) | Linux, Windows | CUDA cores / Tensor Cores (Ampere+) |
9+
| **MPS** | Apple Silicon (M1 / M2 / M3 / M4) | macOS 12.3+ | Metal GPU via unified memory |
10+
| **ROCm** | AMD GPU (RDNA2+, CDNA, CDNA2, CDNA3) | **Linux only** | ROCm HIP runtime |
11+
12+
---
13+
14+
## CPU (default)
15+
16+
Works on every platform with no additional drivers. **This is the recommended install for most users.** Inference runs on PyTorch's CPU backend and automatically upgrades to NVIDIA CUDA or Apple Silicon MPS if detected at runtime — no separate install needed for those.
17+
18+
**pip**
19+
```bash
20+
pip install "vizion3d[cpu]"
21+
```
22+
23+
**uv**
24+
```bash
25+
uv add "vizion3d[cpu]"
26+
```
27+
28+
> **Mac M-series users:** the standard CPU extra automatically includes Metal Performance Shaders (MPS) support — no separate install needed. vizion3d will use your GPU via MPS as long as you are on macOS 12.3 or later with PyTorch ≥ 2.0.
29+
30+
---
31+
32+
## NVIDIA CUDA
33+
34+
Delivers the highest throughput for depth estimation. On NVIDIA Ampere GPUs and newer (RTX 30xx / A100 and above), PyTorch additionally uses Tensor Cores for mixed-precision acceleration.
35+
36+
### Prerequisites
37+
38+
| Requirement | Minimum version | Link |
39+
|---|---|---|
40+
| NVIDIA GPU driver | 520.61.05 (Linux) / 528.33 (Windows) | [Driver downloads](https://www.nvidia.com/drivers) |
41+
| CUDA Toolkit | 11.8 | [CUDA Toolkit installer](https://developer.nvidia.com/cuda-downloads) |
42+
| cuDNN | 8.x | [cuDNN install guide](https://developer.nvidia.com/cudnn) |
43+
44+
Install CUDA and cuDNN **before** installing vizion3d. The PyTorch wheel bundled with the `cuda` extra already includes its own CUDA runtime libraries, but the driver must be present on the host.
45+
46+
**pip**
47+
```bash
48+
pip install "vizion3d[cuda]"
49+
```
50+
51+
**uv**
52+
```bash
53+
uv add "vizion3d[cuda]"
54+
```
55+
56+
vizion3d detects CUDA via `torch.cuda.is_available()` at runtime and moves models and tensors to the GPU automatically — no configuration needed.
57+
58+
---
59+
60+
## AMD ROCm
61+
62+
Provides GPU-accelerated inference on supported AMD GPUs using the ROCm open-source compute stack. ROCm exposes itself through PyTorch's CUDA namespace (`torch.cuda.is_available()` returns `True`), so vizion3d uses it transparently with no code changes.
63+
64+
> **Platform:** ROCm is supported on **Linux only**. There is no ROCm support for Windows or macOS.
65+
66+
### Supported hardware
67+
68+
| Family | Examples |
69+
|---|---|
70+
| RDNA2 | RX 6700 XT, RX 6800, RX 6900 XT |
71+
| RDNA3 | RX 7800 XT, RX 7900 XTX |
72+
| CDNA | Instinct MI100 |
73+
| CDNA2 | Instinct MI200 series |
74+
| CDNA3 | Instinct MI300 series |
75+
76+
For the full supported GPU list see the [AMD ROCm hardware compatibility guide](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html).
77+
78+
### Prerequisites
79+
80+
Install the ROCm stack on your system before installing the PyTorch ROCm wheel. Follow AMD's official guide:
81+
82+
- [ROCm installation for Linux](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/)
83+
84+
### Install
85+
86+
Because the ROCm PyTorch wheel is hosted on PyTorch's own index (not PyPI), it must be installed **before** vizion3d — vizion3d's base install has no torch dependency and will not overwrite it.
87+
88+
**Step 1 — install ROCm PyTorch**
89+
```bash
90+
pip3 install --pre torch torchvision torchaudio \
91+
--index-url https://download.pytorch.org/whl/nightly/rocm7.2
92+
```
93+
94+
For the full list of available ROCm wheel versions see [PyTorch ROCm install guide](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/3rd-party/pytorch-install.html#using-wheels-package).
95+
96+
**Step 2 — install vizion3d (no extra needed)**
97+
```bash
98+
pip install vizion3d
99+
```
100+
101+
Because `vizion3d` declares no torch dependency in its base install, pip will not touch the ROCm wheel you installed in step 1.
102+
103+
> **Warning:** do **not** run `pip install "vizion3d[cpu]"` or `pip install "vizion3d[cuda]"` after installing the ROCm wheel — those extras pull a standard PyPI torch build and will replace your ROCm installation.
104+
105+
### Limitations
106+
107+
- Linux only — ROCm does not run on Windows or macOS.
108+
- Only GPUs on AMD's official support list are guaranteed to work; consumer RDNA1 cards (RX 5000 series) are not supported.
109+
- Some PyTorch operations fall back to CPU on ROCm; performance for those ops will match CPU speed.

docs/index.md

Lines changed: 4 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Every task is accessible through three consumption modes driven by one shared CQ
1616

1717
Requires **Python 3.12** (Open3D constraint).
1818

19-
PyTorch is **not bundled** in the base install — choose the extra that matches your hardware (see [Hardware acceleration](#hardware-acceleration) below). For most users the `cpu` extra is the right default; it installs the standard PyTorch wheel which covers CPU, NVIDIA CUDA, and Apple Silicon MPS automatically.
19+
PyTorch is **not bundled** in the base install — choose the extra that matches your hardware (see [Hardware Acceleration](hardware_acceleration.md)). For most users the `cpu` extra is the right default; it installs the standard PyTorch wheel which covers CPU, NVIDIA CUDA, and Apple Silicon MPS automatically.
2020

2121
**pip**
2222
```bash
@@ -38,113 +38,9 @@ uv add "vizion3d[cpu]"
3838

3939
## Hardware acceleration
4040

41-
vizion3d detects the best available device automatically at runtime — no code changes required. Choose the install extra that matches your hardware.
41+
vizion3d detects the best available backend automatically at runtime — no code changes required. Supported backends are CPU, NVIDIA CUDA, Apple Silicon MPS, and AMD ROCm.
4242

43-
| Backend | Hardware | Platforms | What drives inference |
44-
|---|---|---|---|
45-
| **CPU** | Any processor | Linux, Windows, macOS | PyTorch CPU kernels |
46-
| **CUDA** | NVIDIA GPU (Kepler+) | Linux, Windows | CUDA cores / Tensor Cores (Ampere+) |
47-
| **MPS** | Apple Silicon (M1 / M2 / M3 / M4) | macOS 12.3+ | Metal GPU via unified memory |
48-
| **ROCm** | AMD GPU (RDNA2+, CDNA, CDNA2, CDNA3) | **Linux only** | ROCm HIP runtime |
49-
50-
---
51-
52-
### CPU (default)
53-
54-
Works on every platform with no additional drivers. **This is the recommended install for most users.** Inference runs on PyTorch's CPU backend and automatically upgrades to NVIDIA CUDA or Apple Silicon MPS if detected at runtime — no separate install needed for those.
55-
56-
**pip**
57-
```bash
58-
pip install "vizion3d[cpu]"
59-
```
60-
61-
**uv**
62-
```bash
63-
uv add "vizion3d[cpu]"
64-
```
65-
66-
> **Mac M-series users:** the standard CPU extra automatically includes Metal Performance Shaders (MPS) support — no separate install needed. vizion3d will use your GPU via MPS as long as you are on macOS 12.3 or later with PyTorch ≥ 2.0.
67-
68-
---
69-
70-
### NVIDIA CUDA
71-
72-
Delivers the highest throughput for depth estimation. On NVIDIA Ampere GPUs and newer (RTX 30xx / A100 and above), PyTorch additionally uses Tensor Cores for mixed-precision acceleration.
73-
74-
#### Prerequisites
75-
76-
| Requirement | Minimum version | Link |
77-
|---|---|---|
78-
| NVIDIA GPU driver | 520.61.05 (Linux) / 528.33 (Windows) | [Driver downloads](https://www.nvidia.com/drivers) |
79-
| CUDA Toolkit | 11.8 | [CUDA Toolkit installer](https://developer.nvidia.com/cuda-downloads) |
80-
| cuDNN | 8.x | [cuDNN install guide](https://developer.nvidia.com/cudnn) |
81-
82-
Install CUDA and cuDNN **before** installing vizion3d. The PyTorch wheel bundled with the `cuda` extra already includes its own CUDA runtime libraries, but the driver must be present on the host.
83-
84-
**pip**
85-
```bash
86-
pip install "vizion3d[cuda]"
87-
```
88-
89-
**uv**
90-
```bash
91-
uv add "vizion3d[cuda]"
92-
```
93-
94-
vizion3d detects CUDA via `torch.cuda.is_available()` at runtime and moves models and tensors to the GPU automatically — no configuration needed.
95-
96-
---
97-
98-
### AMD ROCm
99-
100-
Provides GPU-accelerated inference on supported AMD GPUs using the ROCm open-source compute stack. ROCm exposes itself through PyTorch's CUDA namespace (`torch.cuda.is_available()` returns `True`), so vizion3d uses it transparently with no code changes.
101-
102-
> **Platform:** ROCm is supported on **Linux only**. There is no ROCm support for Windows or macOS.
103-
104-
#### Supported hardware
105-
106-
| Family | Examples |
107-
|---|---|
108-
| RDNA2 | RX 6700 XT, RX 6800, RX 6900 XT |
109-
| RDNA3 | RX 7800 XT, RX 7900 XTX |
110-
| CDNA | Instinct MI100 |
111-
| CDNA2 | Instinct MI200 series |
112-
| CDNA3 | Instinct MI300 series |
113-
114-
For the full supported GPU list see the [AMD ROCm hardware compatibility guide](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html).
115-
116-
#### Prerequisites
117-
118-
Install the ROCm stack on your system before installing the PyTorch ROCm wheel. Follow AMD's official guide:
119-
120-
- [ROCm installation for Linux](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/)
121-
122-
#### Install
123-
124-
Because the ROCm PyTorch wheel is hosted on PyTorch's own index (not PyPI), it must be installed **before** vizion3d — vizion3d's base install has no torch dependency and will not overwrite it.
125-
126-
**Step 1 — install ROCm PyTorch**
127-
```bash
128-
pip3 install --pre torch torchvision torchaudio \
129-
--index-url https://download.pytorch.org/whl/nightly/rocm7.2
130-
```
131-
132-
For the full list of available ROCm wheel versions see [PyTorch ROCm install guide](https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/3rd-party/pytorch-install.html#using-wheels-package).
133-
134-
**Step 2 — install vizion3d (no extra needed)**
135-
```bash
136-
pip install vizion3d
137-
```
138-
139-
Because `vizion3d` declares no torch dependency in its base install, pip will not touch the ROCm wheel you installed in step 1.
140-
141-
> **Warning:** do **not** run `pip install "vizion3d[cpu]"` or `pip install "vizion3d[cuda]"` after installing the ROCm wheel — those extras pull a standard PyPI torch build and will replace your ROCm installation.
142-
143-
#### Limitations
144-
145-
- Linux only — ROCm does not run on Windows or macOS.
146-
- Only GPUs on AMD's official support list are guaranteed to work; consumer RDNA1 cards (RX 5000 series) are not supported.
147-
- Some PyTorch operations fall back to CPU on ROCm; performance for those ops will match CPU speed.
43+
For per-backend prerequisites, install commands, and platform notes, see the [Hardware Acceleration](hardware_acceleration.md) page.
14844

14945
---
15046

@@ -215,4 +111,5 @@ Each task lives in its own module under `vizion3d/<category>/` and exposes exact
215111
| Task | Status | Docs |
216112
|---|---|---|
217113
| Monocular depth estimation | Stable | [Depth Estimation](features/depth_estimation.md) |
114+
| Stereo depth estimation | Stable | [Stereo Depth](features/stereo_depth.md) |
218115

mkdocs.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ plugins:
2424

2525
nav:
2626
- Home: index.md
27+
- Hardware Acceleration: hardware_acceleration.md
2728
- Features:
28-
- Depth Estimation: features/depth_estimation.md
29-
- Depth Estimation Advanced Config: features/depth_estimation_advanced_config.md
30-
- Stereo Depth: features/stereo_depth.md
29+
- Depth Estimation:
30+
- Overview: features/depth_estimation.md
31+
- Advanced Config: features/depth_estimation_advanced_config.md
32+
- Stereo Depth:
33+
- Overview: features/stereo_depth.md
3134
- Depth Estimation vs Stereo Depth: features/depth_estimation_vs_stereo_depth.md
3235
- API Reference:
3336
- Lifting (2D → 3D): api/lifting.md

0 commit comments

Comments
 (0)