Skip to content

Commit aebc5de

Browse files
gang chenZuul
gang chen
authored and
Zuul
committed
Kernel Attribute: SpillMemOffset
Change-Id: I284f1e4ba10a76bd4dd6aa0121eef06025072a08
1 parent 5b4ad10 commit aebc5de

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

visa/VISAKernelImpl.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -705,10 +705,18 @@ int VISAKernelImpl::InitializeFastPath()
705705
}
706706
m_jitInfo = (FINALIZER_INFO*)m_mem.alloc(sizeof(FINALIZER_INFO));
707707

708-
int value = 32;
709-
if (!getIntKernelAttributeValue("FESPSize", value))
708+
int feSPSize = 32;
709+
if (!getIntKernelAttributeValue("FESPSize", feSPSize))
710710
{
711-
value = 32;
711+
feSPSize = 32;
712+
}
713+
int spillMemOffset = 0;
714+
if (getIntKernelAttributeValue("SpillMemOffset", spillMemOffset))
715+
{
716+
if (spillMemOffset > 0)
717+
{
718+
getOptions()->setOption(vISA_SpillMemOffset, (uint32_t)spillMemOffset);
719+
}
712720
}
713721

714722
void* addr = m_kernelMem->alloc(sizeof(class IR_Builder));
@@ -717,7 +725,7 @@ int VISAKernelImpl::InitializeFastPath()
717725
*m_kernel,
718726
*m_kernelMem,
719727
m_options,
720-
(value == 64),
728+
(feSPSize == 64),
721729
m_jitInfo,
722730
m_pWaTable
723731
);
@@ -1425,7 +1433,7 @@ int VISAKernelImpl::AddKernelAttribute(const char* attrName, int size, const voi
14251433
attr->size = (uint8_t)size;
14261434
attr->isInt = size != 0 && (!strcmp(attrName, "SLMSize") ||
14271435
!strcmp(attrName, "SurfaceUsage") ||
1428-
!strcmp(attrName, "StackSize") ||
1436+
!strcmp(attrName, "SpillMemOffset") ||
14291437
!strcmp(attrName, "Scope") ||
14301438
!strcmp(attrName, "Target") ||
14311439
!strcmp(attrName, "ArgSize") ||

0 commit comments

Comments
 (0)