Search Unity

Question ComputeShader: Always use all cores?

Discussion in 'General Graphics' started by Shushustorm, May 6, 2023.

  1. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Hey everyone!
    I am wondering, are there situations where you don't want to run a compute shader on all cores? Let's say, when there are 64 cores, would it make sense to maybe have 32 cores for important stuff and 32 cores for optional stuff so that the important things always get rendered? Or just put all things on 64 cores? Can things be prioritized then? Maybe low priority things could have a lower refresh rate as well, so that would require differently timed dispatches.
    Best wishes,
    Shu
     
    Last edited: May 6, 2023
  2. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    505
    GPU cores works like typical multicore CPU. If you have task for 1 thread, then you load 1 core and other cores is awating.
    The difference is GPU always compute task using 32/64 threads (using simd architecture).
    For example, if you need to draw texture with size 512*512 pixels, then you send ~262144 threads. So GPU will load 4096 cores with 64 threads. For example, gtx 4090 have 16384 cores, so 12288 cores will be idle (if no other tasks are running).
    So don't worry, just load what you need, and GPU driver will load core as needed
     
    Noisecrime and Shushustorm like this.
  3. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Thanks for the info! That's great to know! I guess I'll just lower refresh rate on things that are lower priority then!