diff --git a/.github/workflows/core_tests.yml b/.github/workflows/core_tests.yml index ed6e054b1..e0229e0c2 100644 --- a/.github/workflows/core_tests.yml +++ b/.github/workflows/core_tests.yml @@ -25,6 +25,6 @@ jobs: pip install torch==2.0.0 --index-url https://download.pytorch.org/whl/cpu BUILD_NO_CUDA=1 pip install . - name: Run Black Format Check - run: black . diff_rast/ tests/ examples/ --check + run: black . gsplat/ tests/ examples/ --check - name: Run Tests. run: pytest tests/ diff --git a/.gitmodules b/.gitmodules index c62722305..62638584c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "diff_rast/cuda/csrc/third_party/glm"] - path = diff_rast/cuda/csrc/third_party/glm +[submodule "gsplat/cuda/csrc/third_party/glm"] + path = gsplat/cuda/csrc/third_party/glm url = https://github.com/g-truc/glm.git \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in index 47ef70072..34427bf24 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -recursive-include diff_rast/cuda/csrc * +recursive-include gsplat/cuda/csrc * diff --git a/README.md b/README.md index 98b6ebd4f..86c3e5753 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# diff_rast +# gsplat Our version of differentiable gaussian rasterizer @@ -40,7 +40,7 @@ The curret tests that will be triggered by PR: Because we check for black formatting, it is recommend to run black before commit in the code: ```bash -black . diff_rast/ tests/ examples/ +black . gsplat/ tests/ examples/ ``` Since there is no GPU supported on github workflow container, we don't test against those cuda unit tests under `tests/` in PR. So it is recommended to check test pass locally before committing: @@ -67,11 +67,11 @@ sphinx-build docs/source _build # Brief walkthrough -The main python bindings for rasterization are found by importing diff_rast +The main python bindings for rasterization are found by importing gsplat ``` -import diff_rast -help(diff_rast) +import gsplat +help(gsplat) ``` # clangd setup (for Neovim) @@ -117,7 +117,7 @@ sudo apt install bear # # This will save a file at 3dgs-exercise/compile_commands.json, which clangd # should be able to detect. -bear -- pip install -e diff_rast/ +bear -- pip install -e gsplat/ # Make sure the file is not empty! cat compile_commands.json diff --git a/diff_rast/cuda/csrc/third_party/glm b/diff_rast/cuda/csrc/third_party/glm deleted file mode 160000 index 47585fde0..000000000 --- a/diff_rast/cuda/csrc/third_party/glm +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 47585fde0c49fa77a2bf2fb1d2ead06999fd4b6e diff --git a/docs/source/apis/proj.rst b/docs/source/apis/proj.rst index 3f450ffa2..2af03d7ff 100644 --- a/docs/source/apis/proj.rst +++ b/docs/source/apis/proj.rst @@ -1,7 +1,7 @@ ProjectGaussians =================================== -.. currentmodule:: diff_rast +.. currentmodule:: gsplat Given 3D gaussians parametrized by means :math:`μ`, covariances :math:`Σ`, colors :math:`c`, and opacities :math:`o`, the ProjectGaussians function computes the projected 2D gaussians in the camera frame with means :math:`μ'`, covariances :math:`Σ'`, and depths :math:`z` diff --git a/docs/source/apis/rast.rst b/docs/source/apis/rast.rst index 96eedcddd..a9bb35830 100644 --- a/docs/source/apis/rast.rst +++ b/docs/source/apis/rast.rst @@ -1,7 +1,7 @@ RasterizeGaussians =================================== -.. currentmodule:: diff_rast +.. currentmodule:: gsplat Given 2D gaussians that are parametrized by their means :math:`μ'` and covariances :math:`Σ'` as well as their radii and conic parameters, the RasterizeGaussians function first sorts each gaussian such that all gaussians within the bounds of a tile are grouped and sorted by increasing depth :math:`z`, diff --git a/docs/source/apis/utils.rst b/docs/source/apis/utils.rst index 54924e55d..9e8650bbc 100644 --- a/docs/source/apis/utils.rst +++ b/docs/source/apis/utils.rst @@ -3,7 +3,7 @@ Utils In addition to the main projection and rasterization functions, a few CUDA kernel and helper functions are exposed to python with the following bindings: -.. currentmodule:: diff_rast +.. currentmodule:: gsplat .. autoclass:: BinAndSortGaussians diff --git a/docs/source/conf.py b/docs/source/conf.py index 4800c4bdb..c92d164e6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,11 +1,11 @@ __version__ = None -exec(open("../../diff_rast/version.py", "r").read()) +exec(open("../../gsplat/version.py", "r").read()) # -- Project information -project = "diff_rast" -copyright = "2023, Vickie" -author = "Vickie" +project = "gsplat" +copyright = "2023, nerfstudio team" +author = "nerfstudio" release = __version__ diff --git a/docs/source/conventions/data_conventions.rst b/docs/source/conventions/data_conventions.rst index dc1a88741..4534ed0b1 100644 --- a/docs/source/conventions/data_conventions.rst +++ b/docs/source/conventions/data_conventions.rst @@ -1,7 +1,7 @@ Data Conventions =================================== -.. currentmodule:: diff_rast +.. currentmodule:: gsplat Here we explain the various conventions used in our repo. diff --git a/docs/source/examples/simple_trainer.rst b/docs/source/examples/simple_trainer.rst index 1f202ddd9..c021d7092 100644 --- a/docs/source/examples/simple_trainer.rst +++ b/docs/source/examples/simple_trainer.rst @@ -1,7 +1,7 @@ Simple Trainer =================================== -.. currentmodule:: diff_rast +.. currentmodule:: gsplat Training on an image ----------------------------------- diff --git a/docs/source/index.rst b/docs/source/index.rst index e128b40fb..2d05ed296 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -1,4 +1,4 @@ -diff_rast +gsplat =================================== .. image:: imgs/training.gif @@ -8,7 +8,7 @@ diff_rast Overview -------- -*diff_rast* is an open-source library for CUDA accelerated rasterization of gaussians with python bindings. It is inspired by the SIGGRAPH paper "3D Gaussian Splatting for Real-Time Rendering of Radiance Fields" :cite:p:`kerbl3Dgaussians`. +*gsplat* is an open-source library for CUDA accelerated rasterization of gaussians with python bindings. It is inspired by the SIGGRAPH paper "3D Gaussian Splatting for Real-Time Rendering of Radiance Fields" :cite:p:`kerbl3Dgaussians`. This libary contains the neccessary components for efficient 3D to 2D projection, sorting, and alpha compositing of gaussians and their associated backward passes for inverse rendering. Contributing diff --git a/examples/simple_trainer.py b/examples/simple_trainer.py index c0ac65fd0..036538eb0 100644 --- a/examples/simple_trainer.py +++ b/examples/simple_trainer.py @@ -7,8 +7,8 @@ import numpy as np import torch import tyro -from diff_rast.project_gaussians import ProjectGaussians -from diff_rast.rasterize import RasterizeGaussians +from gsplat.project_gaussians import ProjectGaussians +from gsplat.rasterize import RasterizeGaussians from PIL import Image from torch import Tensor, optim diff --git a/diff_rast/__init__.py b/gsplat/__init__.py similarity index 100% rename from diff_rast/__init__.py rename to gsplat/__init__.py diff --git a/diff_rast/_torch_impl.py b/gsplat/_torch_impl.py similarity index 100% rename from diff_rast/_torch_impl.py rename to gsplat/_torch_impl.py diff --git a/diff_rast/bin_and_sort_gaussians.py b/gsplat/bin_and_sort_gaussians.py similarity index 98% rename from diff_rast/bin_and_sort_gaussians.py rename to gsplat/bin_and_sort_gaussians.py index 44c7d5777..ebe6ad5bc 100644 --- a/diff_rast/bin_and_sort_gaussians.py +++ b/gsplat/bin_and_sort_gaussians.py @@ -6,7 +6,7 @@ from torch import Tensor from torch.autograd import Function -import diff_rast.cuda as _C +import gsplat.cuda as _C class BinAndSortGaussians(Function): diff --git a/diff_rast/compute_cumulative_intersects.py b/gsplat/compute_cumulative_intersects.py similarity index 97% rename from diff_rast/compute_cumulative_intersects.py rename to gsplat/compute_cumulative_intersects.py index 1922b0037..bbde8f4a5 100644 --- a/diff_rast/compute_cumulative_intersects.py +++ b/gsplat/compute_cumulative_intersects.py @@ -6,7 +6,7 @@ from torch import Tensor from torch.autograd import Function -import diff_rast.cuda as _C +import gsplat.cuda as _C class ComputeCumulativeIntersects(Function): diff --git a/diff_rast/cov2d_bounds.py b/gsplat/cov2d_bounds.py similarity index 97% rename from diff_rast/cov2d_bounds.py rename to gsplat/cov2d_bounds.py index dda93df58..af5690638 100644 --- a/diff_rast/cov2d_bounds.py +++ b/gsplat/cov2d_bounds.py @@ -7,7 +7,7 @@ from torch import Tensor from torch.autograd import Function -import diff_rast.cuda as _C +import gsplat.cuda as _C class ComputeCov2dBounds(Function): diff --git a/diff_rast/cuda/__init__.py b/gsplat/cuda/__init__.py similarity index 100% rename from diff_rast/cuda/__init__.py rename to gsplat/cuda/__init__.py diff --git a/diff_rast/cuda/_backend.py b/gsplat/cuda/_backend.py similarity index 98% rename from diff_rast/cuda/_backend.py rename to gsplat/cuda/_backend.py index 2d8ce35d0..c8f9294c2 100644 --- a/diff_rast/cuda/_backend.py +++ b/gsplat/cuda/_backend.py @@ -33,7 +33,7 @@ def cuda_toolkit_version(): return cuda_version -name = "diff_rast_cuda" +name = "gsplat_cuda" build_dir = _get_build_directory(name, verbose=False) extra_include_paths = [os.path.join(PATH, "csrc/third_party/glm")] extra_cflags = ["-O3"] @@ -53,7 +53,7 @@ def cuda_toolkit_version(): try: # try to import the compiled module (via setup.py) - from diff_rast import csrc as _C + from gsplat import csrc as _C except ImportError: # if failed, try with JIT compilation if cuda_toolkit_available(): diff --git a/diff_rast/cuda/csrc/CMakeLists.txt b/gsplat/cuda/csrc/CMakeLists.txt similarity index 98% rename from diff_rast/cuda/csrc/CMakeLists.txt rename to gsplat/cuda/csrc/CMakeLists.txt index 12a4ba8e3..a4db5b33b 100644 --- a/diff_rast/cuda/csrc/CMakeLists.txt +++ b/gsplat/cuda/csrc/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.12) # You can adjust the minimum required version set(CMAKE_CUDA_ARCHITECTURES 70 75 89) # Ti 2080 uses 75. V100 uses 70. RTX 4090 uses 89. -project(diff_rast CXX CUDA) +project(gsplat CXX CUDA) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CUDA_STANDARD 17) diff --git a/diff_rast/cuda/csrc/backward.cu b/gsplat/cuda/csrc/backward.cu similarity index 100% rename from diff_rast/cuda/csrc/backward.cu rename to gsplat/cuda/csrc/backward.cu diff --git a/diff_rast/cuda/csrc/backward.cuh b/gsplat/cuda/csrc/backward.cuh similarity index 100% rename from diff_rast/cuda/csrc/backward.cuh rename to gsplat/cuda/csrc/backward.cuh diff --git a/diff_rast/cuda/csrc/bindings.cu b/gsplat/cuda/csrc/bindings.cu similarity index 100% rename from diff_rast/cuda/csrc/bindings.cu rename to gsplat/cuda/csrc/bindings.cu diff --git a/diff_rast/cuda/csrc/bindings.h b/gsplat/cuda/csrc/bindings.h similarity index 100% rename from diff_rast/cuda/csrc/bindings.h rename to gsplat/cuda/csrc/bindings.h diff --git a/diff_rast/cuda/csrc/config.h b/gsplat/cuda/csrc/config.h similarity index 100% rename from diff_rast/cuda/csrc/config.h rename to gsplat/cuda/csrc/config.h diff --git a/diff_rast/cuda/csrc/ext.cpp b/gsplat/cuda/csrc/ext.cpp similarity index 100% rename from diff_rast/cuda/csrc/ext.cpp rename to gsplat/cuda/csrc/ext.cpp diff --git a/diff_rast/cuda/csrc/forward.cu b/gsplat/cuda/csrc/forward.cu similarity index 100% rename from diff_rast/cuda/csrc/forward.cu rename to gsplat/cuda/csrc/forward.cu diff --git a/diff_rast/cuda/csrc/forward.cuh b/gsplat/cuda/csrc/forward.cuh similarity index 100% rename from diff_rast/cuda/csrc/forward.cuh rename to gsplat/cuda/csrc/forward.cuh diff --git a/diff_rast/cuda/csrc/helpers.cuh b/gsplat/cuda/csrc/helpers.cuh similarity index 100% rename from diff_rast/cuda/csrc/helpers.cuh rename to gsplat/cuda/csrc/helpers.cuh diff --git a/diff_rast/cuda/csrc/rasterize.cu b/gsplat/cuda/csrc/rasterize.cu similarity index 100% rename from diff_rast/cuda/csrc/rasterize.cu rename to gsplat/cuda/csrc/rasterize.cu diff --git a/diff_rast/cuda/csrc/rasterize.h b/gsplat/cuda/csrc/rasterize.h similarity index 100% rename from diff_rast/cuda/csrc/rasterize.h rename to gsplat/cuda/csrc/rasterize.h diff --git a/diff_rast/cuda/csrc/serial_backward.cu b/gsplat/cuda/csrc/serial_backward.cu similarity index 100% rename from diff_rast/cuda/csrc/serial_backward.cu rename to gsplat/cuda/csrc/serial_backward.cu diff --git a/diff_rast/cuda/csrc/serial_backward.cuh b/gsplat/cuda/csrc/serial_backward.cuh similarity index 100% rename from diff_rast/cuda/csrc/serial_backward.cuh rename to gsplat/cuda/csrc/serial_backward.cuh diff --git a/diff_rast/cuda/csrc/sh.cuh b/gsplat/cuda/csrc/sh.cuh similarity index 100% rename from diff_rast/cuda/csrc/sh.cuh rename to gsplat/cuda/csrc/sh.cuh diff --git a/diff_rast/get_tile_bin_edges.py b/gsplat/get_tile_bin_edges.py similarity index 97% rename from diff_rast/get_tile_bin_edges.py rename to gsplat/get_tile_bin_edges.py index ab7539e2e..5042cccb7 100644 --- a/diff_rast/get_tile_bin_edges.py +++ b/gsplat/get_tile_bin_edges.py @@ -6,7 +6,7 @@ from torch import Tensor from torch.autograd import Function -import diff_rast.cuda as _C +import gsplat.cuda as _C class GetTileBinEdges(Function): diff --git a/diff_rast/map_gaussian_to_intersects.py b/gsplat/map_gaussian_to_intersects.py similarity index 98% rename from diff_rast/map_gaussian_to_intersects.py rename to gsplat/map_gaussian_to_intersects.py index f05bbcde6..9a3c3b735 100644 --- a/diff_rast/map_gaussian_to_intersects.py +++ b/gsplat/map_gaussian_to_intersects.py @@ -6,7 +6,7 @@ from torch import Tensor from torch.autograd import Function -import diff_rast.cuda as _C +import gsplat.cuda as _C class MapGaussiansToIntersects(Function): diff --git a/diff_rast/project_gaussians.py b/gsplat/project_gaussians.py similarity index 99% rename from diff_rast/project_gaussians.py rename to gsplat/project_gaussians.py index 31dad6c3e..708af0479 100644 --- a/diff_rast/project_gaussians.py +++ b/gsplat/project_gaussians.py @@ -6,7 +6,7 @@ from torch import Tensor from torch.autograd import Function -import diff_rast.cuda as _C +import gsplat.cuda as _C class ProjectGaussians(Function): diff --git a/diff_rast/rasterize.py b/gsplat/rasterize.py similarity index 99% rename from diff_rast/rasterize.py rename to gsplat/rasterize.py index 39934dbf2..3e84187d9 100644 --- a/diff_rast/rasterize.py +++ b/gsplat/rasterize.py @@ -7,7 +7,7 @@ from torch import Tensor from torch.autograd import Function -import diff_rast.cuda as _C +import gsplat.cuda as _C class RasterizeGaussians(Function): diff --git a/diff_rast/rasterize_forward_kernel.py b/gsplat/rasterize_forward_kernel.py similarity index 99% rename from diff_rast/rasterize_forward_kernel.py rename to gsplat/rasterize_forward_kernel.py index 45bb5db8a..f6ceb17d9 100644 --- a/diff_rast/rasterize_forward_kernel.py +++ b/gsplat/rasterize_forward_kernel.py @@ -7,7 +7,7 @@ from torch import Tensor from torch.autograd import Function -import diff_rast.cuda as _C +import gsplat.cuda as _C class RasterizeForwardKernel(Function): diff --git a/diff_rast/sh.py b/gsplat/sh.py similarity index 97% rename from diff_rast/sh.py rename to gsplat/sh.py index d70498f9d..10220c436 100644 --- a/diff_rast/sh.py +++ b/gsplat/sh.py @@ -1,6 +1,6 @@ """Python bindings for SH""" -import diff_rast.cuda as _C +import gsplat.cuda as _C from jaxtyping import Float from torch import Tensor diff --git a/diff_rast/version.py b/gsplat/version.py similarity index 100% rename from diff_rast/version.py rename to gsplat/version.py diff --git a/setup.py b/setup.py index 1d3cf24bb..a078c52e4 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from setuptools import find_packages, setup __version__ = None -exec(open("diff_rast/version.py", "r").read()) +exec(open("gsplat/version.py", "r").read()) URL = "" # TODO @@ -26,7 +26,7 @@ def get_extensions(): from torch.__config__ import parallel_info from torch.utils.cpp_extension import CUDAExtension - extensions_dir = osp.join("diff_rast", "cuda", "csrc") + extensions_dir = osp.join("gsplat", "cuda", "csrc") sources = glob.glob(osp.join(extensions_dir, "*.cu")) + glob.glob( osp.join(extensions_dir, "*.cpp") ) @@ -44,7 +44,7 @@ def get_extensions(): define_macros = [] if sys.platform == "win32": - define_macros += [("diff_rast_EXPORTS", None)] + define_macros += [("gsplat_EXPORTS", None)] extra_compile_args = {"cxx": ["-O3"]} if not os.name == "nt": # Not on Windows: @@ -83,7 +83,7 @@ def get_extensions(): extra_compile_args["nvcc"] = nvcc_flags extension = CUDAExtension( - f"diff_rast.csrc", + f"gsplat.csrc", sources, include_dirs=[osp.join(extensions_dir, "third_party", "glm")], define_macros=define_macros, @@ -96,7 +96,7 @@ def get_extensions(): setup( - name="diff_rast", + name="gsplat", version=__version__, description=" Python package for differentiable rasterization of gaussians", keywords="gaussian, splatting, cuda", @@ -110,7 +110,7 @@ def get_extensions(): "typing_extensions; python_version<'3.8'", ], extras_require={ - # dev dependencies. Install them by `pip install diff_rast[dev]` + # dev dependencies. Install them by `pip install gsplat[dev]` "dev": [ "black[jupyter]==22.3.0", "isort==5.10.1", diff --git a/tests/test_bin_and_sort_gaussians.py b/tests/test_bin_and_sort_gaussians.py index cb044b79c..b38bcd2d6 100644 --- a/tests/test_bin_and_sort_gaussians.py +++ b/tests/test_bin_and_sort_gaussians.py @@ -7,8 +7,8 @@ @pytest.mark.skipif(not torch.cuda.is_available(), reason="No CUDA device") def test_bin_and_sort_gaussians(): - from diff_rast import _torch_impl - from diff_rast.bin_and_sort_gaussians import BinAndSortGaussians + from gsplat import _torch_impl + from gsplat.bin_and_sort_gaussians import BinAndSortGaussians torch.manual_seed(42) diff --git a/tests/test_cov2d_bounds.py b/tests/test_cov2d_bounds.py index 74c931601..c79806b4d 100644 --- a/tests/test_cov2d_bounds.py +++ b/tests/test_cov2d_bounds.py @@ -7,8 +7,8 @@ @pytest.mark.skipif(not torch.cuda.is_available(), reason="No CUDA device") def test_compare_binding_to_pytorch(): - from diff_rast._torch_impl import compute_cov2d_bounds as _compute_cov2d_bounds - from diff_rast.cov2d_bounds import ComputeCov2dBounds + from gsplat._torch_impl import compute_cov2d_bounds as _compute_cov2d_bounds + from gsplat.cov2d_bounds import ComputeCov2dBounds torch.manual_seed(42) diff --git a/tests/test_cumulative_intersects.py b/tests/test_cumulative_intersects.py index 8285ae34d..cf69692d7 100644 --- a/tests/test_cumulative_intersects.py +++ b/tests/test_cumulative_intersects.py @@ -7,7 +7,7 @@ @pytest.mark.skipif(not torch.cuda.is_available(), reason="No CUDA device") def test_cumulative_intersects(): - from diff_rast.compute_cumulative_intersects import ComputeCumulativeIntersects + from gsplat.compute_cumulative_intersects import ComputeCumulativeIntersects torch.manual_seed(42) diff --git a/tests/test_get_tile_bin_edges.py b/tests/test_get_tile_bin_edges.py index b943b973d..b50c780f3 100644 --- a/tests/test_get_tile_bin_edges.py +++ b/tests/test_get_tile_bin_edges.py @@ -7,8 +7,8 @@ @pytest.mark.skipif(not torch.cuda.is_available(), reason="No CUDA device") def test_get_tile_bin_edges(): - from diff_rast import _torch_impl - from diff_rast.get_tile_bin_edges import GetTileBinEdges + from gsplat import _torch_impl + from gsplat.get_tile_bin_edges import GetTileBinEdges torch.manual_seed(42) diff --git a/tests/test_map_gaussians.py b/tests/test_map_gaussians.py index 915138574..663d22624 100644 --- a/tests/test_map_gaussians.py +++ b/tests/test_map_gaussians.py @@ -7,8 +7,8 @@ @pytest.mark.skipif(not torch.cuda.is_available(), reason="No CUDA device") def test_map_gaussians(): - from diff_rast import _torch_impl - from diff_rast.map_gaussian_to_intersects import MapGaussiansToIntersects + from gsplat import _torch_impl + from gsplat.map_gaussian_to_intersects import MapGaussiansToIntersects torch.manual_seed(42) diff --git a/tests/test_project_gaussians.py b/tests/test_project_gaussians.py index 242e8b4b7..999155927 100644 --- a/tests/test_project_gaussians.py +++ b/tests/test_project_gaussians.py @@ -7,8 +7,8 @@ @pytest.mark.skipif(not torch.cuda.is_available(), reason="No CUDA device") def test_project_gaussians_forward(): - from diff_rast import _torch_impl - import diff_rast.cuda as _C + from gsplat import _torch_impl + import gsplat.cuda as _C torch.manual_seed(42) diff --git a/tests/test_rasterize_forward_kernel.py b/tests/test_rasterize_forward_kernel.py index 39e7390bd..6ca0853dd 100644 --- a/tests/test_rasterize_forward_kernel.py +++ b/tests/test_rasterize_forward_kernel.py @@ -7,8 +7,8 @@ @pytest.mark.skipif(not torch.cuda.is_available(), reason="No CUDA device") def test_rasterize_forward_kernel(): - from diff_rast import _torch_impl - from diff_rast.rasterize_forward_kernel import RasterizeForwardKernel + from gsplat import _torch_impl + from gsplat.rasterize_forward_kernel import RasterizeForwardKernel torch.manual_seed(42) diff --git a/tests/test_sh.py b/tests/test_sh.py index 5bda5c951..3b12f2002 100644 --- a/tests/test_sh.py +++ b/tests/test_sh.py @@ -7,8 +7,8 @@ @pytest.mark.skipif(not torch.cuda.is_available(), reason="No CUDA device") def test_sh(): - from diff_rast import _torch_impl - from diff_rast import sh + from gsplat import _torch_impl + from gsplat import sh num_points = 1 degree = 4