mirror of
https://gitee.com/openharmony/third_party_mesa3d
synced 2024-11-27 09:31:03 +00:00
aco: Consider maximum number of workgroups per CU/WGP on Navi.
No Fossil DB changes. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12517>
This commit is contained in:
parent
c8698199a1
commit
589ccf3d77
@ -355,6 +355,7 @@ update_vgpr_sgpr_demand(Program* program, const RegisterDemand new_demand)
|
||||
unsigned max_waves_per_simd = program->dev.max_wave64_per_simd * (64 / program->wave_size);
|
||||
unsigned simd_per_cu_wgp = program->dev.simd_per_cu * (program->wgp_mode ? 2 : 1);
|
||||
unsigned lds_limit = program->wgp_mode ? program->dev.lds_limit * 2 : program->dev.lds_limit;
|
||||
unsigned max_workgroups_per_cu_wgp = program->wgp_mode ? 32 : 16;
|
||||
|
||||
assert(program->min_waves >= 1);
|
||||
uint16_t sgpr_limit = get_addr_sgpr_from_waves(program, program->min_waves);
|
||||
@ -394,9 +395,8 @@ update_vgpr_sgpr_demand(Program* program, const RegisterDemand new_demand)
|
||||
if (lds_per_workgroup)
|
||||
workgroups_per_cu_wgp = std::min(workgroups_per_cu_wgp, lds_limit / lds_per_workgroup);
|
||||
|
||||
if (waves_per_workgroup > 1 && program->chip_class < GFX10)
|
||||
workgroups_per_cu_wgp = std::min(
|
||||
workgroups_per_cu_wgp, 16u); /* TODO: is this a SI-only limit? what about Navi? */
|
||||
if (waves_per_workgroup > 1)
|
||||
workgroups_per_cu_wgp = std::min(workgroups_per_cu_wgp, max_workgroups_per_cu_wgp);
|
||||
|
||||
/* in cases like waves_per_workgroup=3 or lds=65536 and
|
||||
* waves_per_workgroup=1, we want the maximum possible number of waves per
|
||||
|
Loading…
Reference in New Issue
Block a user