Skip to content

Commit e37a8c7

Browse files
PiotrFusiksys_zuul
authored andcommitted
Fix sub_group_clustered_reduce_* on 64-bit types
Change-Id: I79999ba7b61ac18043211dd34275812465ef6f68
1 parent 12e6a4f commit e37a8c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11073,8 +11073,8 @@ CVariable* EmitPass::ReductionClusteredReduceHelper(e_opcode op, VISA_Type type,
1107311073
const bool is64bitType = type == ISA_TYPE_Q || type == ISA_TYPE_UQ || type == ISA_TYPE_DF;
1107411074
const bool isInt64Mul = (op == EOPCODE_MUL && CEncoder::IsIntegerType(type) &&
1107511075
CEncoder::GetCISADataTypeSize(type) == 8);
11076-
// The 2 grf boundary is crossed for SIMD16 (before reduction) and 64-bit type
11077-
const uint numInst = is64bitType && simd == SIMDMode::SIMD8 ? 2 : 1;
11076+
// The 32-byte grf boundary is crossed for SIMD16 (before reduction) and 64-bit type
11077+
const uint numInst = is64bitType && simd == SIMDMode::SIMD8 && getGRFSize() == 32 ? 2 : 1;
1107811078

1107911079
assert(simd == SIMDMode::SIMD2 || simd == SIMDMode::SIMD4 || simd == SIMDMode::SIMD8);
1108011080

@@ -11142,8 +11142,8 @@ void EmitPass::ReductionClusteredExpandHelper(e_opcode op, VISA_Type type, SIMDM
1114211142
const bool is64bitType = type == ISA_TYPE_Q || type == ISA_TYPE_UQ || type == ISA_TYPE_DF;
1114311143
const bool isInt64Mul = (op == EOPCODE_MUL && CEncoder::IsIntegerType(type) &&
1114411144
CEncoder::GetCISADataTypeSize(type) == 8);
11145-
// The grf boundary is crossed in final reduction and expansion for SIMD16 and 64-bit type.
11146-
const uint numInst = is64bitType && simd == SIMDMode::SIMD16 ? 2 : 1;
11145+
// The 32-byte grf boundary is crossed in final reduction and expansion for SIMD16 and 64-bit type.
11146+
const uint numInst = is64bitType && simd == SIMDMode::SIMD16 && getGRFSize() == 32 ? 2 : 1;
1114711147
assert(clusterSize == 2 || clusterSize == 4 || clusterSize == 8 || (clusterSize == 16 && !is64bitType));
1114811148

1114911149
// For information on rearrangement see EmitPass::ReductionClusteredReduceHelper()

0 commit comments

Comments
 (0)