Closed andyyankai closed 2 years ago
Hi @andyyankai ,
This shouldn't be necessary. And infact, a forced evaluation should never change the result of some computation. It only tells the JIT compiler should to organize the kernel, which can be used for instance to define the "boundaries" of a megakernel in a renderer.
Could you share a tiny reproducer that behaves differently when using or not dr::eval()
?
I will update later, but thanks for the help! This only happens when the program becomes more complex... and I just find out I didn't use DRJIT_STRUCT for my ray class, not sure this can be a potential problem. So I guess mitsuba3 doesn't face such a problem during development? Thanks!
No, if you look through the Mitsuba 3 codebase, there are only a few places where we manually call dr::eval()
to breakdown the computation in smaller kernels (intentionally).
Let me close this issue for now. If you manage to reproduce this with a smaller code example please post it here I will take a look.
I am writing a PT using drjit, however. It seems I have to call drjit::eval() VERY often to ensure it can give me the correct result. like this:
Is there anything I might forget causing such issue? I think it is quite not normal to use such a lot eval to ensure the correct result compared to enoki... Thanks!