Blender Git Loki

Git Commits -> Revision 17774af

Revision 17774af by Sergey Sharybin (cycles-x)
May 19, 2021, 17:16 (GMT)
Cycles X: Remove usage of mega-kernel

The usage of the mega-kernel is commented out with this change.

There are few benefits of removing the mega-kernel:

- It takes extra time to compile and space to ship.
- It is not compatible with features like shadow catcher.

The rest of the changes are related on attempt to avoid performance
loss in various scenes. Those changes include:

- Make work tile smaller in size. This makes the work tile more
friendly for greedy scheduling when adaptive sampling is used.
Currently this is achieved by keeping pixel same the same and
lowering number of samples per work tile. The idea behind this
is to avoid dramatic change in order in which pixels are
scheduled for sampling.

- Keep tile size dimensions a power of two.
This lowers the unused path states (which can be watched with

./bin//blender --debug-cycles --verbose 3 2>&1 | grep "Number of unused path states"

In own tests it seems that we barely "waste" path states now.

- Make it so tiles are scheduled in the order of samples first.
As in: keep pixel-space coherency, similar to how it is done
in the `get_work_pixel()`.

- Only keep extreme case tests for the tile size calculation.
Avoids some unnecessary updates, while still ensuring correct
behavior in extremes.

The timing goes as following:
```
RTX 6000 (Turing)

new cycles-x
bmw27.blend 10.8964 10.4269
classroom.blend 17.4476 16.6609
pabellon.blend 9.77167 9.14966
monster.blend 10.3662 12.0106
barbershop_interior.blend 11.9445 12.5769
junkshop.blend 16.3556 16.5213
pvt_flat.blend 16.5317 17.4047

RTX A6000 (Ampere)
new cycles-x
bmw27.blend 7.74059 7.65293
classroom.blend 10.775 10.9143
pabellon.blend 6.00643 5.85334
monster.blend 6.79277 8.0134
barbershop_interior.blend 8.39941 8.47159
junkshop.blend 10.4258 10.9882
pvt_flat.blend 10.2752 10.8821
```

Not entirely happy with the results: there are some very nice speedups
interleaved with some slowdown. Although, slowdown is within 5%, so
hopes that we can gain it back with more tricks from the sleeves.

Some thing to try:
- Try lowering tile size in pixels
- Try better alignment of tile size with number of threads on a
multiprocessor.

This change is a combined brain activity from Brecht and myself.

Differential Revision: https://developer.blender.org/D11311

Commit Details:

Full Hash: 17774afed1a3f17f32eddef48155c6ed65e03099
Parent Commit: ef6ce4f
Lines Changed: +31, -33

4 Modified Paths:

/intern/cycles/integrator/path_trace_work_gpu.cpp (+2, -0) (Diff)
/intern/cycles/integrator/tile.cpp (+27, -18) (Diff)
/intern/cycles/integrator/work_tile_scheduler.cpp (+2, -2) (Diff)
/intern/cycles/test/integrator_tile_test.cpp (+0, -13) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021