NVlabs / nvdiffrast

Nvdiffrast - Modular Primitives for High-Performance Differentiable Rendering
Other
1.43k stars 157 forks source link

Max resolution of image #156

Closed YutingXiao closed 9 months ago

YutingXiao commented 10 months ago

Hi, thanks for this excellent work!

I wonder whether it is possible to render the image whose resolution is larger than [2048, 2048], it seems the code cannot render the image with this large resolution. I changed the CR_MAXVIEWPORT_LOG2 in "Constants.hpp", but it still cannot work and I get error:

File "/home/xiaoyuting/4DGaussian-Mesh/gaussian_renderer/init.py", line 193, in hybrid_render rast, rast_db = dr.rasterize(glctx, pos_clip, pos_idx, resolution=resolution) File "/home/xiaoyuting/miniconda3/envs/3dgs_mesh/lib/python3.10/site-packages/nvdiffrast/torch/ops.py", line 310, in rasterize return _rasterize_func.apply(glctx, pos, tri, resolution, ranges, grad_db, -1) File "/home/xiaoyuting/miniconda3/envs/3dgs_mesh/lib/python3.10/site-packages/nvdiffrast/torch/ops.py", line 248, in forward out, out_db = _get_plugin().rasterize_fwd_cuda(raster_ctx.cpp_wrapper, pos, tri, resolution, ranges, peeling_idx) RuntimeError: Cuda error: 700[cudaMemcpyAsync(&atomics[0], m_crAtomics.getPtr(), sizeof(CRAtomics) * m_numImages, cudaMemcpyDeviceToHost, stream);]

s-laine commented 10 months ago

Please see if the proposed solution in issue #128 solves the problem for you.

s-laine commented 2 months ago

For future reference, the CUDA rasterizer resolution limit was removed in v0.3.3.