Skip to content

Commit

Permalink
Merging main update from original repository
Browse files Browse the repository at this point in the history
  • Loading branch information
inuex35 committed Dec 14, 2024
2 parents b0e978d + ff2da2e commit a3f628c
Show file tree
Hide file tree
Showing 45 changed files with 930 additions and 883 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@ jobs:
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
BUILD_NO_CUDA=1 python -m build
twine upload --username __token__ --password $PYPI_TOKEN dist/*
shell: bash
shell: bash
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
recursive-include gsplat/cuda/csrc *
recursive-include gsplat/cuda/include *
6 changes: 5 additions & 1 deletion examples/simple_trainer_2dgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def rasterize_splats(
**kwargs,
)
elif self.model_type == "2dgs-inria":
render_colors, render_alphas, info = rasterization_2dgs_inria_wrapper(
renders, info = rasterization_2dgs_inria_wrapper(
means=means,
quats=quats,
scales=scales,
Expand Down Expand Up @@ -577,6 +577,10 @@ def train(self):
step=step,
info=info,
)
masks = data["mask"].to(device) if "mask" in data else None
if masks is not None:
pixels = pixels * masks[..., None]
colors = colors * masks[..., None]

# loss
l1loss = F.l1_loss(colors, pixels)
Expand Down
4 changes: 2 additions & 2 deletions examples/simple_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def main(local_rank: int, world_rank, world_size: int, args):
quats, # [N, 4]
scales, # [N, 3]
opacities, # [N]
colors, # [N, 3]
colors, # [N, S, 3]
viewmats, # [C, 4, 4]
Ks, # [C, 3, 3]
width,
Expand Down Expand Up @@ -181,7 +181,7 @@ def viewer_render_fn(camera_state: nerfview.CameraState, img_wh: Tuple[int, int]
quats, # [N, 4]
scales, # [N, 3]
opacities, # [N]
colors, # [N, 3]
colors, # [N, S, 3]
viewmat[None], # [1, 4, 4]
K[None], # [1, 3, 3]
width,
Expand Down
2 changes: 1 addition & 1 deletion gsplat/cuda/_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def cuda_toolkit_version():
current_dir = os.path.dirname(os.path.abspath(__file__))
glm_path = os.path.join(current_dir, "csrc", "third_party", "glm")

extra_include_paths = [os.path.join(PATH, "csrc/"), glm_path]
extra_include_paths = [os.path.join(PATH, "include/"), glm_path]
extra_cflags = ["-O3"]
if NO_FAST_MATH:
extra_cuda_cflags = ["-O3"]
Expand Down
2 changes: 0 additions & 2 deletions gsplat/cuda/csrc/adam.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
1 change: 1 addition & 0 deletions gsplat/cuda/csrc/compute_sh_bwd.cu
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "bindings.h"
#include "helpers.cuh"
#include "spherical_harmonics.cuh"
#include "types.cuh"

Expand Down
3 changes: 2 additions & 1 deletion gsplat/cuda/csrc/fully_fused_projection_2dgs_bwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "transform.cuh"
#include "2dgs.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
3 changes: 2 additions & 1 deletion gsplat/cuda/csrc/fully_fused_projection_2dgs_fwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "transform.cuh"
#include "2dgs.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
4 changes: 4 additions & 0 deletions gsplat/cuda/csrc/fully_fused_projection_bwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "quat.cuh"
#include "quat_scale_to_covar_preci.cuh"
#include "proj.cuh"
#include "transform.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
4 changes: 3 additions & 1 deletion gsplat/cuda/csrc/fully_fused_projection_fwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "quat_scale_to_covar_preci.cuh"
#include "proj.cuh"
#include "transform.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
3 changes: 2 additions & 1 deletion gsplat/cuda/csrc/fully_fused_projection_packed_2dgs_bwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "transform.cuh"
#include "2dgs.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
3 changes: 2 additions & 1 deletion gsplat/cuda/csrc/fully_fused_projection_packed_2dgs_fwd.cu
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "quat.cuh"
#include "transform.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
4 changes: 4 additions & 0 deletions gsplat/cuda/csrc/fully_fused_projection_packed_bwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "quat.cuh"
#include "quat_scale_to_covar_preci.cuh"
#include "proj.cuh"
#include "transform.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
4 changes: 3 additions & 1 deletion gsplat/cuda/csrc/fully_fused_projection_packed_fwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "quat_scale_to_covar_preci.cuh"
#include "proj.cuh"
#include "transform.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
1 change: 0 additions & 1 deletion gsplat/cuda/csrc/isect_tiles.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "bindings.h"
#include "helpers.cuh"
#include "types.cuh"
#include <cooperative_groups.h>
#include <cub/cub.cuh>
Expand Down
3 changes: 1 addition & 2 deletions gsplat/cuda/csrc/proj_bwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "proj.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
3 changes: 1 addition & 2 deletions gsplat/cuda/csrc/proj_fwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "proj.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
4 changes: 2 additions & 2 deletions gsplat/cuda/csrc/quat_scale_to_covar_preci_bwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "quat.cuh"
#include "quat_scale_to_covar_preci.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
3 changes: 1 addition & 2 deletions gsplat/cuda/csrc/quat_scale_to_covar_preci_fwd.cu
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "bindings.h"
#include "helpers.cuh"
#include "utils.cuh"
#include "quat_scale_to_covar_preci.cuh"

#include <cooperative_groups.h>
#include <cooperative_groups/reduce.h>
Expand Down
1 change: 0 additions & 1 deletion gsplat/cuda/csrc/rasterize_to_indices_in_range.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "bindings.h"
#include "helpers.cuh"
#include "types.cuh"
#include <cooperative_groups.h>
#include <cub/cub.cuh>
Expand Down
3 changes: 1 addition & 2 deletions gsplat/cuda/csrc/rasterize_to_indices_in_range_2dgs.cu
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "bindings.h"
#include "helpers.cuh"
#include "types.cuh"
#include "utils.cuh"
#include "2dgs.cuh"
#include <cooperative_groups.h>
#include <cub/cub.cuh>
#include <cuda_runtime.h>
Expand Down
2 changes: 1 addition & 1 deletion gsplat/cuda/csrc/rasterize_to_pixels_2dgs_bwd.cu
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "bindings.h"
#include "helpers.cuh"
#include "types.cuh"
#include "utils.cuh"
#include "2dgs.cuh"
#include <cooperative_groups.h>
#include <cub/cub.cuh>
#include <cuda_runtime.h>
Expand Down
3 changes: 1 addition & 2 deletions gsplat/cuda/csrc/rasterize_to_pixels_2dgs_fwd.cu
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "bindings.h"
#include "helpers.cuh"
#include "types.cuh"
#include "utils.cuh"
#include "2dgs.cuh"
#include <cooperative_groups.h>
#include <cub/cub.cuh>
#include <cuda_runtime.h>
Expand Down
1 change: 0 additions & 1 deletion gsplat/cuda/csrc/rasterize_to_pixels_fwd.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "bindings.h"
#include "helpers.cuh"
#include "types.cuh"
#include <cooperative_groups.h>
#include <cub/cub.cuh>
Expand Down
2 changes: 1 addition & 1 deletion gsplat/cuda/csrc/third_party/glm
Loading

0 comments on commit a3f628c

Please sign in to comment.