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

Doe anyone had any issues with burst and [BurstDiscard]?

Discussion in 'Entity Component System' started by Antypodish, Sep 10, 2021.

  1. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    I do wonder, does anyone has experianced any issues with burst enabled and [BurstDiscard] with methods, run inside jobs?

    It is unclear for me, but I experience weird behavior of one some method, which uses [BurstDiscard].
    It seems, somehow method is not discarded with burst enabled inside jobs.

    In other thread (https://forum.unity.com/threads/what-is-if-enable_burst_aot-directive.1167245/) I mentioned use of #if ENABLE_BURST_AOT directive. Guys helped in some explanations. Using this, by enclosing burst discarded method seems work. But I don't know further consequences of using ENABLE_BURST_AOT.
     
  2. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    Is it possible that the burst compilation wasn't finished? Until the burst version finished compiling the .net version is used which does execute the BurstDiscard method.
     
    Antypodish likes this.
  3. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Yeah, we tried run with burst compile async option.
    The thing is it appears to work with that. Only problem is, I don't think that solves real issue.
    Also, we have noticed, that this behaves different on AMD vs Intel.

    Now we try upgrade Unity to later version, to see if that solves anything, as there is later burst.
    But that opens new cans of worms.