From d5dc0c0392dfea4f0abb9258a7ba7a62b27ea34a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 19 Apr 2022 11:33:22 +0200 Subject: [PATCH] aco: adjust num_waves for LDS before scheduling Totals from 67 (0.05% of 134913) affected shaders: (GFX10.3) VGPRs: 2024 -> 2136 (+5.53%); split: -0.40%, +5.93% CodeSize: 162364 -> 162348 (-0.01%); split: -0.08%, +0.07% MaxWaves: 1882 -> 1816 (-3.51%); split: +0.11%, -3.61% Instrs: 29176 -> 29162 (-0.05%); split: -0.09%, +0.04% Latency: 329984 -> 327272 (-0.82%); split: -0.88%, +0.06% InvThroughput: 54653 -> 54672 (+0.03%); split: -0.01%, +0.04% VClause: 782 -> 761 (-2.69%); split: -2.81%, +0.13% SClause: 833 -> 824 (-1.08%); split: -2.28%, +1.20% Copies: 1872 -> 1873 (+0.05%); split: -0.37%, +0.43% Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_scheduler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/compiler/aco_scheduler.cpp b/src/amd/compiler/aco_scheduler.cpp index 953d8779917..dc799219399 100644 --- a/src/amd/compiler/aco_scheduler.cpp +++ b/src/amd/compiler/aco_scheduler.cpp @@ -1070,6 +1070,7 @@ schedule_program(Program* program, live& live_vars) ctx.num_waves = 7 * wave_fac; ctx.num_waves = std::max(ctx.num_waves, program->min_waves); ctx.num_waves = std::min(ctx.num_waves, program->num_waves); + ctx.num_waves = max_suitable_waves(program, ctx.num_waves); /* VMEM_MAX_MOVES and such assume pre-GFX10 wave count */ ctx.num_waves = std::max(ctx.num_waves / wave_fac, 1);