Skip to content

Commit 30405bc

Browse files
weiyu-chensys_zuul
authored andcommitted
Add vISA verifier check for input that straddles GRF boundary.
Change-Id: I41f9f53c210082607441307c9e942d4cd76a53a2
1 parent 95147c7 commit 30405bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

visa/IsaVerification.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3041,6 +3041,13 @@ void verifyKernelHeader(const common_isa_header& isaHeader,
30413041
int varSize = header->getVar(varId)->num_elements * CISATypeTable[header->getVar(varId)->getType()].typeSize;
30423042
REPORT_HEADER(options,varSize == header->getInput(i)->size,
30433043
"Input %d's size(%d) does not agree with its variable (V%d)'s", i, header->getInput(i)->size, varId + numPreDefinedVars);
3044+
if (header->getInput(i)->size < getGRFSize())
3045+
{
3046+
// check that input does not straddle GRF boundary
3047+
auto beginGRF = header->getInput(i)->offset / getGRFSize();
3048+
auto endGRF = (header->getInput(i)->offset + header->getInput(i)->size - 1) / getGRFSize();
3049+
REPORT_HEADER(options, beginGRF == endGRF, "Input %s is <1 GRF but straddles GRF boundary", header->getInput(i)->dcl->getName());
3050+
}
30443051
}
30453052
break;
30463053
case INPUT_SAMPLER:

0 commit comments

Comments
 (0)