Closed jjcasmar closed 1 year ago
This is expected behavior. We instantiate the BVH builders just up to AVX if you have multiple ISAs selected. There is no performance benefit of using AVX2 for the builder. However, if you just specify one ISA than all code is compiled with that ISA, that is why you see builder using AVX2 in that case.
I have a test application where I create a 3D mesh and submitted as an embree geometry. My vertex buffer is 16 byte aligned.
I have set the verbosity of the device to 2 to see which backends is calling, I am having a surprised. When I enable SSE2, SSE42, AVX, AVX2 and AVX512, the BVH construction is selecting AVX backend.
However, the intersectors select the avx2 backend.
On the other hand, if I only allow AVX2 backend, then both the BVH builder and the intersectors select AVX2.
I dont understand the logic of selecting AVX for the BVH construction when there is a working AVX2 backend. What is the heuristic for selecting one backend or another?