Skip to content
  • Rhys Perry's avatar
    aco: take LDS into account when calculating num_waves · fc04a2fc
    Rhys Perry authored
    
    
    pipeline-db (Vega):
    SGPRS: 344 -> 344 (0.00 %)
    VGPRS: 424 -> 524 (23.58 %)
    Spilled SGPRs: 84 -> 80 (-4.76 %)
    Spilled VGPRs: 0 -> 0 (0.00 %)
    Private memory VGPRs: 0 -> 0 (0.00 %)
    Scratch size: 0 -> 0 (0.00 %) dwords per thread
    Code Size: 52812 -> 52484 (-0.62 %) bytes
    LDS: 135 -> 135 (0.00 %) blocks
    Max Waves: 56 -> 53 (-5.36 %)
    
    v2: consider WGP, rework to be clearer and apply the
        "maximum 16 workgroups per CU" limit properly
    v2: use "SIMD" instead of "EU"
    v2: fix spiller by introducing "Program::max_waves"
    v2: rename "lds_size" to "lds_limit"
    v3: make max_waves actually independant of register usage
    v3: fix issue where max_waves was way too high
    v3: use DIV_ROUND_UP(a, b) instead of max(a / b, 1)
    v3: rename "workgroups_per_cu" to "workgroups_per_cu_wgp"
    v4: fix typo from "workgroups_per_cu" rename
    
    Signed-off-by: default avatarRhys Perry <pendingchaos02@gmail.com>
    Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> (v3)
    fc04a2fc