gsplat on ROCm installation#
2025-10-01
4 min read time
System requirements#
To use gsplat (Gaussian splatting), you need the following prerequisites:
ROCm: version 6.4.3 (recommended)
Operating system: Ubuntu 24.04
GPU platform: AMD Instinct™ MI300X
PyTorch: version 2.6 (ROCm-enabled)
Python: version 3.12
Install gsplat#
To install gsplat for ROCm, you have the following options:
Using Docker with requirements preinstalled#
You need to install PyTorch to begin. The easiest way is to use the official ROCm-enabled PyTorch Docker image. Docker is the recommended method to set up your environment, as it avoids potential installation issues.
Download the latest compatible public PyTorch Docker image.
docker pull rocm/pytorch:rocm6.4.3_ubuntu24.04_py3.12_pytorch_release_2.6.0
Launch and connect to the container
docker run --cap-add=SYS_PTRACE --ipc=host --privileged=true \ --shm-size=128GB --network=host --device=/dev/kfd --device=/dev/dri \ --group-add video -it -v $HOME:$HOME --name rocm_pytorch rocm/pytorch:rocm6.4.3_ubuntu24.04_py3.12_pytorch_release_2.6.0
After setting up the container, install gsplat from the AMD-hosted PyPI repository:
pip install gsplat --index-url=https://pypi.amd.com/simple
Verify the installation:
pip show gsplat
The output should show as follows:
Name: gsplat Version: 1.0.0+4ae1c82 Summary: Python package for differentiable rasterization of Gaussians Home-page: https://github.com/rocm/gsplat Author: AMD Corporation License: Apache 2.0 Location: /opt/conda/envs/py_3.12/lib/python3.12/site-packages Requires: jaxtyping, ninja, numpy, rich, torch
Build gsplat from source#
You can choose to setup the development environment and build the gsplat library manually with the following steps.
Prerequisites#
Before building gsplat from source, ensure you have the following installed:
To verify your setup, check the ROCm installation and GPU architecture:
rocminfo | grep gfx
The output should be as follows:
Name: gfx942 Name: amdgcn-amd-amdhsa--gfx942:sramecc+:xnack- Name: amdgcn-amd-amdhsa--gfx9-4-generic:sramecc+:xnack-
Confirm that PyTorch is installed and accessible:
python3 -c 'import torch' 2> /dev/null && echo 'Success' || echo 'Failure'
Confirm that the GPU is accessible from PyTorch:
python3 -c 'import torch; print(torch.cuda.is_available())'
Build steps#
Clone the repository with submodules:
git clone --recurse-submodules https://github.com/rocm/gsplat.git
Install the GLM dependency:
cd gsplat/cuda/csrc/third_party/glm cmake \ -DGLM_BUILD_TESTS=OFF \ -DBUILD_SHARED_LIBS=OFF \ -B build . \ -DCMAKE_INSTALL_PREFIX:PATH=~/.local cmake --build build -- all cmake --build build -- install
Build the gsplat wheel:
cd ../../../.. python setup.py bdist_wheel
Install the wheel:
pip install dist/gsplat*.whl
Verify the installation:
pip show gsplat
Run unit tests and verify the installation#
The tests/
folder provides automatic test scripts that verify if the GPU implementations agree with those of PyTorch.
They primarily focus on validating the functionality of the Gaussian Splatting (GS) and 3D rendering components.
These tests ensure the correctness, performance, and stability of the core features implemented in the gsplat library.
To run the tests, first install the Nerfacc dependency:
git clone https://github.com/nerfstudio-project/nerfacc.git cd nerfacc python setup.py bdist_wheel pip install dist/nerfacc*.whl
Run specific tests from the
tests
directory:cd tests pytest -s -v test_2dgs.py::test_fully_fused_projection_packed_2dgs pytest -s -v test_2dgs.py pytest -s -v test_basic.py
Run a gsplat example#
A set of examples is available to help you get started. See run a gsplat example for more details.
Benchmarking and evaluation#
The ROCm/gsplat repository includes a standalone script that reproduces the
official Gaussian Splatting results with matching performance on PSNR
, SSIM
, LPIPS
, and the converged number of Gaussians.
See benchmarks for more details.
Known issues and limitations#
Compression of
splat parameters
(positions
,scales
,rotations
,colors
, andfeatures
) using PNG image encoding is not supported.Usage of
Fused SSIM
andFused Bilagrid
in the simple trainer is not supported (torch-based implementations are used instead).Distributed training with the
packed
option is not supported.