Skip to content

Commit 5f05af5

Browse files
author
Prapti Devansh Trivedi
committed
solved syntax errors
1 parent 7f4935d commit 5f05af5

File tree

5 files changed

+32
-9
lines changed

5 files changed

+32
-9
lines changed

cuda_rasterizer/forward.cu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ __global__ void preprocessCUDABatched(
511511
const int W, int H, const float* tan_fovx, const float* tan_fovy,
512512
int* radii, float2* points_xy_image, float* depths, float* cov3Ds,
513513
float* rgb, float4* conic_opacity, const dim3 grid, uint32_t* tiles_touched,
514-
bool prefiltered, int num_viewpoints)
514+
bool prefiltered, const int num_viewpoints)
515515
{
516516
auto point_idx = cg::this_grid().thread_rank();
517517
auto viewpoint_idx = blockIdx.y;
@@ -614,7 +614,7 @@ void FORWARD::preprocess_batch(int P, int D, int M,
614614
const dim3 grid,
615615
uint32_t* tiles_touched,
616616
bool prefiltered,
617-
int num_viewpoints)
617+
const int num_viewpoints)
618618
{
619619
preprocessCUDABatched<NUM_CHANNELS><<<grid, ONE_DIM_BLOCK_SIZE>>>(
620620
P, D, M,
@@ -641,5 +641,6 @@ void FORWARD::preprocess_batch(int P, int D, int M,
641641
grid,
642642
tiles_touched,
643643
prefiltered,
644+
num_viewpoints
644645
);
645646
}

cuda_rasterizer/forward.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ namespace FORWARD
7272
const dim3 grid,
7373
uint32_t* tiles_touched,
7474
bool prefiltered,
75-
int num_viewpoints
75+
const int num_viewpoints
7676
);
7777

7878
// Main rasterization method.

cuda_rasterizer/rasterizer.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,31 @@ namespace CudaRasterizer
6565
bool debug,//raster_settings
6666
const pybind11::dict &args);
6767

68+
static int preprocessForwardBatches(
69+
float2* means2D,
70+
float* depths,
71+
int* radii,
72+
float* cov3D,
73+
float4* conic_opacity,
74+
float* rgb,
75+
bool* clamped,//the above are all per-Gaussian intemediate results.
76+
const int P, int D, int M,
77+
const int width, int height,
78+
const float* means3D,
79+
const float* scales,
80+
const float* rotations,
81+
const float* shs,
82+
const float* opacities,//3dgs parameters
83+
const float scale_modifier,
84+
const float* viewmatrix,
85+
const float* projmatrix,
86+
const float* cam_pos,
87+
const float* tan_fovx, float* tan_fovy,
88+
const bool prefiltered,
89+
const int num_viewpoints,
90+
bool debug,//raster_settings
91+
const pybind11::dict &args);
92+
6893
static void preprocessBackward(
6994
const int* radii,
7095
const float* cov3D,

cuda_rasterizer/rasterizer_impl.cu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,8 @@ int CudaRasterizer::Rasterizer::preprocessForwardBatches(
499499
conic_opacity,
500500
tile_grid,
501501
tiles_touched_temp_buffer,
502-
prefiltered
502+
prefiltered,
503+
num_viewpoints
503504
), debug)
504505
timer.stop("10 preprocess");
505506

rasterization_tests.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
import torch
55

6-
from diff_gaussian_rasterization import (
7-
GaussianRasterizationSettings,
8-
GaussianRasterizer,
9-
GaussianRasterizerBatches,
10-
)
6+
import diff_gaussian_rasterization import (GaussianRasterizationSettings,GaussianRasterizer,GaussianRasterizerBatches)
117

128

139
def get_cuda_args(strategy, mode="train"):

0 commit comments

Comments
 (0)