Page MenuHome

Geometry Nodes: Parallelize mesh grid node
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Dec 17 2021, 7:59 PM.

Details

Summary

Test results on a Ryzen 3700x, 4096 x 4096 grid:

Baseline659 ms1.0x
Parallelize Polys510 ms1.3x baseline
Parallelize Edges444 ms1.5x baseline
Parallelize Vertices407 ms1.6x baseline
Parallelize UVs290 ms2.3x baseline
Grain size 1024 -> 512265 ms2.5x baseline

For smaller grids, all this should do is increase the
code size a bit, and add in a few more if statements.

The next thing I'd test is merging some of the parallel loops
to avoid recalculation of some of the indices, and to decrease
threading overhead. I don't know if that would improve performance,
and it would be a bit more complex, so I'd rather look into that
as a separate step.


The final share of time:

UVs81 ms31%
Polys & Loops71 ms27%
Edges45 ms17%
Vertices35 ms13%
Filling Normals32 ms12 %

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Dec 17 2021, 7:59 PM
Hans Goudey (HooglyBoogly) created this revision.

Looks good. I wonder if it would be possible/useful to use parallel_invoke here to improve resource usage (that isn't added to BLI_task.hh in master yet).

This revision is now accepted and ready to land.Dec 20 2021, 3:22 PM