Performance issue in the definition of render_splat, tensorflow_graphics/rendering/tests/splat_test.py

1
open
DLPerf
DLPerf
Posted 2 months ago

Performance issue in the definition of render_splat, tensorflow_graphics/rendering/tests/splat_test.py #642

Hello, I found a performance issue in the definition of render_splat, tensorflow_graphics/rendering/tests/splat_test.py, tf.reduce_mean in line 160 and 162 will be calculated repeatedly during program execution. I think it should be created before the loop in render_splat.

The same issue exist in tf.gather.

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.

fcole
fcole
Created 1 month ago

Hi there, I'm not sure I follow where the issue is in this test. A PR to fix it would help clarify, for sure!