Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Bursted code is running under Mono on some machines

Discussion in 'Burst' started by Chaosed0, Jul 13, 2023.

  1. Chaosed0

    Chaosed0

    Joined:
    Jun 19, 2013
    Posts:
    19
    We're suddenly seeing what should be bursted code apparently falling back to running under Mono on some machines. Strangely, this appears to only be happening on some machines and not others. The way I've checked this is to target the profiler at the build. On machines where the burst-compiled code runs correctly, we see the "(Burst)" suffix on profiler markers, and the markers appear green in the timeline. On the misbehaving machines, the suffix is not there and the markers are blue.

    This is being reported on Steam Deck, PS5, and one PC that we've found so far. The only real difference I can find between the machines where it is running unbursted and where it is bursted is that the unbursted machines all have AMD processors, and the bursted ones have Intel. I've looked at the player log and nothing jumps out at me. I'm stumped as to what to look at next.

    One slightly suspicious thing: we disabled AVX2 to fix a crash on some processors. However, that was weeks ago, and we haven't had problems until just today.

    Our burst version is 1.8.4. Our Unity version is 2022.3.48.

    Is there some scenario where this occurs that I need to watch out for?
     
    Last edited: Jul 13, 2023
  2. Carpet_Head

    Carpet_Head

    Joined:
    Nov 27, 2014
    Posts:
    254
    I've found that code stripping breaks debug builds in the latest versions of burst. Set it to minimal to get it working again. I believe a fix is in the next burst version
     
  3. Chaosed0

    Chaosed0

    Joined:
    Jun 19, 2013
    Posts:
    19
    Thanks for the pointer. Unfortunately, our Managed Stripping Level setting is already set to "Disabled". One thing you pointed out did catch my attention, though - we just tried a Release build and code is running bursted just fine there, so this appears to be a problem only in Debug builds.
     
  4. tim_jones

    tim_jones

    Unity Technologies

    Joined:
    May 2, 2019
    Posts:
    282
    When you disabled AVX2, did you leave just one CPU architecture active? (probably SSE2?) If so, this shouldn't be the cause of the problem, because if there's only target CPU, then Burst doesn't check whether the current CPU matches the target CPU - it just assumes it does.
     
  5. Chaosed0

    Chaosed0

    Joined:
    Jun 19, 2013
    Posts:
    19
    Yes, SSE2 is the only architecture that we have active.

    The problem, strangely enough, simply went away a couple of automated builds later. I will report a Unity bug if it occurs again.
     
    tim_jones likes this.