|
To solve this problem, we realize that because path-tracing requires multiple samples to reduce noise (we set the total number of samples to 1024), we can dynamically adjust the workload distribution for the next path-tracing sample based on a comparison of the rendering time of the previous sample, so that each GPU is always working, reducing the idle time of each GPU and thus improving the overall rendering performance.
Its basic principle is to compare the rendering time of the last path-tracing sample of each GPU, and dynamically adjust the workload distribution of the next path-tracing sample. The longer the rendering time of the GPU is, the smaller work tile for it to render, and vice versa for a short one.
As shown in Figure 2, for two GPUs cluster, GPU0 renders the pixel tile from 0-h1 and GPU1 renders the pixel tile from h1-height. At the Nth sample, if the rendering time of GPU0 is greater than GPU1, then the size of the tile to be rendered by GPU0 at the N+1th sample is reduced, that is GPU0 is responsible for rendering the pixel tile from 0-h2 and GPU1 renders the remaining area. At the next path-tracing sample, the rendering times of the two GPUs are compared again to adjust the workload at each path-tracing sample, so that the rendering times of the two GPUs are always very close to each other. |