intel/compiler: Don't use SIMD larger than needed for workgroup
Unless we are combining multiple workgroups in the same HW thread, there's no advantage of using SIMD16 when SIMD8 already fits the entire workgroup. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13249>
This commit is contained in:
committed by
Marge Bot
parent
4e7b71e00c
commit
3072e6e0da
@@ -109,11 +109,10 @@ TEST_F(SIMDSelectionCS, WorkgroupSize1)
|
||||
|
||||
ASSERT_TRUE(should_compile(SIMD8));
|
||||
brw_simd_mark_compiled(SIMD8, prog_data, not_spilled);
|
||||
ASSERT_TRUE(should_compile(SIMD16));
|
||||
brw_simd_mark_compiled(SIMD16, prog_data, not_spilled);
|
||||
ASSERT_FALSE(should_compile(SIMD16));
|
||||
ASSERT_FALSE(should_compile(SIMD32));
|
||||
|
||||
ASSERT_EQ(brw_simd_select(prog_data), SIMD16);
|
||||
ASSERT_EQ(brw_simd_select(prog_data), SIMD8);
|
||||
}
|
||||
|
||||
TEST_F(SIMDSelectionCS, WorkgroupSize8)
|
||||
@@ -124,11 +123,10 @@ TEST_F(SIMDSelectionCS, WorkgroupSize8)
|
||||
|
||||
ASSERT_TRUE(should_compile(SIMD8));
|
||||
brw_simd_mark_compiled(SIMD8, prog_data, not_spilled);
|
||||
ASSERT_TRUE(should_compile(SIMD16));
|
||||
brw_simd_mark_compiled(SIMD16, prog_data, not_spilled);
|
||||
ASSERT_FALSE(should_compile(SIMD16));
|
||||
ASSERT_FALSE(should_compile(SIMD32));
|
||||
|
||||
ASSERT_EQ(brw_simd_select(prog_data), SIMD16);
|
||||
ASSERT_EQ(brw_simd_select(prog_data), SIMD8);
|
||||
}
|
||||
|
||||
TEST_F(SIMDSelectionCS, WorkgroupSizeVariable)
|
||||
@@ -147,7 +145,7 @@ TEST_F(SIMDSelectionCS, WorkgroupSizeVariable)
|
||||
ASSERT_EQ(prog_data->prog_mask, 1u << SIMD8 | 1u << SIMD16 | 1u << SIMD32);
|
||||
|
||||
const unsigned wg_8_1_1[] = { 8, 1, 1 };
|
||||
ASSERT_EQ(brw_simd_select_for_workgroup_size(devinfo, prog_data, wg_8_1_1), SIMD16);
|
||||
ASSERT_EQ(brw_simd_select_for_workgroup_size(devinfo, prog_data, wg_8_1_1), SIMD8);
|
||||
|
||||
const unsigned wg_16_1_1[] = { 16, 1, 1 };
|
||||
ASSERT_EQ(brw_simd_select_for_workgroup_size(devinfo, prog_data, wg_16_1_1), SIMD16);
|
||||
|
||||
Reference in New Issue
Block a user