Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How does cuda code work when rasterization is performed ? #989

Open
zcc00210 opened this issue Sep 15, 2024 · 3 comments
Open

How does cuda code work when rasterization is performed ? #989

zcc00210 opened this issue Sep 15, 2024 · 3 comments

Comments

@zcc00210
Copy link

Hi,
Thanks a lot for sharing your great work. I have some questions about the process of differentiable gaussian rasterization.
1.
image
What's the meaning of "from . import _C" ? Is "_C" refer to the gaussian rasterization folder containing cuda code?
2.
image
Which file in the above rasterize_gaussians folder containing cuda code should I look for the corresponding rasterize_gaussians function when I perform rasterization, running the code to the line num_rendered, color, objects, radii, geomBuffer, binningBuffer, imgBuffer = _C.rasterize_gaussians(*args)?
3.
image
There are too many code files in this folder, do they have any order of execution, I don't know where to start reading them.
And how is this cuda code connected to the corresponding parts of python, is it by the way in question 1?
4. I am new in this field. I would like to add a new attribute to the Gaussian and modify the code in the rasterization section accordingly, which file in cuda would you recommend to start with?

Sorry for asking so many questions, looking forward to your reply!
My best regards

@yuanyibo666
Copy link

Same question

@cmh1027
Copy link

cmh1027 commented Sep 20, 2024

As you can see in ext.cpp, rasterize_gaussians function in python is connected to RasterizeGaussiansCUDA in rasterize_points.cu.
The order of execution is rasterize_points.cu => raterizer_impl.cu => forward.cu (backward.cu)

@AsherJingkongChen
Copy link

AsherJingkongChen commented Oct 9, 2024

My recommendation is to look through all the files in the repository, especially *.cu. You need some math supplements (linear transformation, matrix, eigenvalues, partial differentiation) when reading the uncommented parts.

The backward part is useless if you are not interested in training.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants