Skip to content

Commit

Permalink
Codegen fix for int16
Browse files Browse the repository at this point in the history
Ensure that appropriate number of GRFs is allocated.
  • Loading branch information
MaciejKalinski authored and igcbot committed Sep 3, 2024
1 parent be3445e commit 507ff7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion IGC/Compiler/CISACodeGen/CISABuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2273,7 +2273,7 @@ namespace IGC
unsigned char sendc = isSendc ? 1 : 0;
unsigned char src0Size = src0->GetSize() / getGRFSize();
unsigned char src1Size = src1 ? src1->GetSize() / getGRFSize() : 0;
unsigned char dstSize = dst ? dst->GetSize() / getGRFSize() : 0;
unsigned char dstSize = dst ? (dst->GetSize() + getGRFSize() - 1) / getGRFSize() : 0;
VISA_PredOpnd* predOpnd = GetFlagOperand(m_encoderState.m_flag);
VISA_RawOpnd* srcOpnd0 = GetRawSource(src0);
VISA_RawOpnd* srcOpnd1 = GetRawSource(src1);
Expand Down
3 changes: 3 additions & 0 deletions IGC/Compiler/CISACodeGen/EmitVISAPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23805,6 +23805,7 @@ void EmitPass::emitTraceRay(TraceRayIntrinsic* I, bool RayQueryEnable)
(m_currShader->m_SIMDSize == SIMDMode::SIMD32
) ? 2 : 1;


for (uint32_t Cnt = 0; Cnt < NumSend; Cnt++)
{
// 'payload' contains bvhLevel, traceRayCtrl, and stackID as per
Expand Down Expand Up @@ -23944,6 +23945,7 @@ void EmitPass::emitTraceRay(TraceRayIntrinsic* I, bool RayQueryEnable)
}
}


m_encoder->Sends(
Dst,
header,
Expand All @@ -23954,6 +23956,7 @@ void EmitPass::emitTraceRay(TraceRayIntrinsic* I, bool RayQueryEnable)
false);

m_encoder->Push();

}

// Insert a software fence after the send.rta so no IO operations get
Expand Down

0 comments on commit 507ff7f

Please sign in to comment.