Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Does it mean that Burst compiled games will work on old CPUs (w/o SSE4) when it's out of preview?

Discussion in 'Burst' started by davenirline, Mar 19, 2019.

  1. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    We're currently using ECS in some parts of our game in early access. However, we didn't enable Burst compilation because the game would crash on old CPUs, the ones with no SSE4 instruction set. Would this be fixed when Burst gets out of preview? Would it work on old CPUs?
     
  2. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    Burst requires SSE4+ so far, so we won't be able to fix this before preview. At best, we will try to see if we can provide a settings to generate SSE2 but can't promise anything here.

    I'm really curious about this support, according to Steam, 95% of CPU have SSE4+ support. How many of your users don't have this supported?
     
    JoNax97 and hippocoder like this.
  3. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    I don't have the exact numbers but enough of them are reporting such crashes and leaves negative reviews. :( There are times when we release builds with Burst because we forgot to turn it off. We get at least 5-10 complaints. This is just the reported ones. There are probably more affected.
     
    learc83 likes this.
  4. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    106
    Oof, this is definitely good to know. It would be great if there was a built-in way to detect on startup if the CPU doesn't support SSE4 so the user can be told to use a different non-Bursted version of a game.
     
  5. recursive

    recursive

    Joined:
    Jul 12, 2012
    Posts:
    669
    You could possibly make a config checker exe that runs some bursted code on startup via the system process API, and if it crashes inform the user before starting the game proper.
     
  6. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    That's an unnecessary hassle for the player, though. I wish there was an API to check if the environment the game is running on supports Burst. I could do this check on start of the game before loading the game scenes. If the PC can't support Burst, I could display a message right away that the PC is incompatible with the game and that the game can't continue. At least this way, you're honest about it and the player has the option to refund. Compared to when the game just crashes, they'll be furious and leave bad reviews.
     
    JakHussain likes this.
  7. runner78

    runner78

    Joined:
    Mar 14, 2015
    Posts:
    789
    Using an old computer with an >12 year old CPU and expect that new games run smoothly...:rolleyes:

    it is possible to turn off burst at runtime?
     
  8. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    106
    I'll end up taking this CPU flags example from MSDN and making a native plugin I can call from Unity to run the check.

    You can't turn off burst at runtime as far as I'm aware (and it wouldn't even be possible in an IL2CPP build).
     
    JoNax97 and davenirline like this.
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It will be next to impossible to prevent customers with crusty garbage CPUs at some point, trying to run something built with burst. Need checks at least I guess.

    In fact this thread surprised me. I had mistakenly assumed Unity would gracefully fall back.

    But how do we know that it was the CPU behind the crash and not the developer's code? Let's not make assumptions about it before proper logging.
     
    thelebaron and SugoiDev like this.
  10. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    The original requirement for burst was SSE4.1+

    We are working on implementing a dynamic dispatch based on CPU support at runtime, but we won't have a fix ready before next week
     
    thelebaron, hippocoder, FROS7 and 2 others like this.
  11. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    432
    Detecting the CPU would be a good first step.
    Also the Editor crashes without any warning or error message when run on older hardware (Core 2 Duo) when reaching a Burst compiled code.
    So yes, at least a check would be nice.
     
    SugoiDev likes this.
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    I would hit this discussion from different angle.

    Which CPU families are not supporting burst?
    If that is known, perhaps min required specification can be defined.
     
  13. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    106
    I'll mirror the concerns about users booting your game up on crappy CPUs. 5% of the PC market is pretty huge when you start talking hundreds of millions of Steam users. It would be wonderful if Steam itself would block you from purchasing if you don't meet the CPU requirements, but having some kind of fallback in the app itself would be ideal.

    However if the fallback is non-vectorized code instead of say, SSE2, those already crappy CPUs will struggle even more to run the game. I would still want to have some kind of notification in-game that your CPU is not supported by detecting this.
     
    SugoiDev likes this.
  14. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    432
    If it is indeed SSE 4.1+ and not SSE 4.2+ then the last Intel series NOT supported is Conroe:
    https://en.wikipedia.org/wiki/Conroe_(microprocessor)
    The first Intel series supported should be Penryn:
    https://en.wikipedia.org/wiki/Penryn_(microarchitecture)

    If you look at the various brand names these architectures had been sold, there's NO WAY you can clearly communicate the minimum requirement to the users.

    I agree with @davenirline that detecting it at telling the users that "Sorry we don't support your hardware, upgrade your computer or refund the game." is the best we could do.
     
  15. Justin_Larrabee

    Justin_Larrabee

    Joined:
    Apr 24, 2018
    Posts:
    106
    And that's just Intel, add on messaging AMD CPU families to that and it gets even more ugly.
     
  16. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    Thanks! I'll try this.
     
  17. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Guys, Unity posted above that dynamic dispatch was in the works so that means this problem will go away (tm).
     
    davenirline likes this.
  18. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    You can try the latest version of burst 1.0.0-preview.9 that we just released and is using dynamic dispatch at runtime based on CPU feature. Let us know if it is working or not.
     
    SugoiDev, eizenhorn and davenirline like this.
  19. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    That's great! Thanks!
     
  20. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    Just want to make sure. Does this work with Unity 2018?
     
  21. xoofx

    xoofx

    Unity Technologies

    Joined:
    Nov 5, 2016
    Posts:
    416
    Yes
     
  22. mirasrael

    mirasrael

    Joined:
    Jul 9, 2018
    Posts:
    4
    Hi. Seems it doesn't work in our case. We're using Burst 1.1.2 with Unity 2019.1.6.
    And on some Win7 configurations users reported crashes like:
    ```
    Имя сбойного приложения: Eco.exe, версия: 2019.1.6.38659, отметка времени: 0x5cf7cd64
    Имя сбойного модуля: lib_burst_generated.dll, версия: 0.0.0.0, отметка времени 0x5d65311f
    Код исключения: 0xc000001d Смещение ошибки: 0x000000000000131c
    Идентификатор сбойного процесса: 0x1294
    Время запуска сбойного приложения: 0x01d55d8df6477c08
    Путь сбойного приложения: C:\Users\GDragon\Desktop\Eco\Eco.exe
    Путь сбойного модуля: C:\Users\GDragon\Desktop\Eco\Eco_Data\Plugins\lib_burst_generated.dll
    Код отчета: 3d9e713c-c981-11e9-9af1-6cf04906f4ed
    ```
    User has Е5300 CPU which doesn't have SSE4 instruction set.
    Other users can run the game just fine.
     
  23. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    See here. It seems Burst 1.1.2 is broken. We downgraded to 1.0.4.
     
  24. mirasrael

    mirasrael

    Joined:
    Jul 9, 2018
    Posts:
    4
    Thank you!
     
  25. Lee_Hammerton

    Lee_Hammerton

    Unity Technologies

    Joined:
    Jul 26, 2018
    Posts:
    118
    Burst 1.1.3-preview.1 which is out now, contains a fix for this cpu compatabilty issue, Burst will now generate code that supports older cpus (SSE2 and up), restoring the earlier behaviour.
     
  26. fabrizio_unity

    fabrizio_unity

    Unity Technologies

    Joined:
    May 3, 2018
    Posts:
    47
    To be more exact, the package version publicly available is 1.1.3-preview.3 (unfortunately preview.1 is not available).
     
    davenirline likes this.
  27. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
  28. monstercouch

    monstercouch

    Joined:
    Aug 23, 2016
    Posts:
    44
    Hello, we're having users report crashes with processors supporting SSE4a like AMD Phenom II X4 956, 3,4gGHz. When we force a build with max SSE2 it works fine for them but that's not sustainable.

    As far as I understand it should gracefully fallback to using SSE2?
     
  29. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    What version of Burst are you using?
     
  30. monstercouch

    monstercouch

    Joined:
    Aug 23, 2016
    Posts:
    44
    preview.8-1.3.0

    Oh, there's an update. Updating now, will let you know.
     
  31. sheredom

    sheredom

    Unity Technologies

    Joined:
    Jul 15, 2019
    Posts:
    300
    Yeah there was a bug between preview.7 and preview.10 where we misidentified some SSE4 CPUs as having AVX when they didn't. It was fixed in preview.11, so if you use that or later it should be working!