Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Resolved State of deterministic floating points modern PCs and consoles x86-64 AVX2.

Discussion in 'DOTS Dev Blitz Day 2022 - Q&A' started by TheOtherMonarch, Dec 7, 2022.

  1. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    888
    From my own research SIMD appears to be the best way to implement deterministic floating points. This strategy has been executed successfully since SSE2. With some games being released well over a decade ago. Now that x86-64 is ubiquitous, this makes even more sense. However, I am also aware that some CPU microarchitectures exhibit errata, although some of these bugs have been patched. I am also not positive that all instructions are designed to be deterministic; as far as I know, they should be. It is hard to know exactly what behavior to expect without widespread validation.


    It would be valuable to have a deterministic floating-point option that uses SIMD. Doing so will significantly enhance performance. It does not matter which target is selected. However, restricting determinism to AVX2 would be perfectly acceptable, assuming all AVX2 enabled CPU microarchitectures exhibit deterministic behavior. AVX2, in the Steam survey, has 90.13% market share. The PlayStation 5 and Xbox Series X/S also support AVX2. The vast preponderance of modern client systems going forward will be configured with AVX2 support.


    Testing and proving determinism is critical to being able to rely on determinism. Burst AOT Settings currently allow for CPU target architectures to be selected. When FloatMode is set to Default/Strict and a single target CPU architecture is selected, what is the state of floating point determinism?
     
  2. philsa-unity

    philsa-unity

    Unity Technologies

    Joined:
    Aug 23, 2022
    Posts:
    119