Skip to content

Commit 574cb6b

Browse files
lwesiersigcbot
authored andcommitted
Add missing code for XEHP
Add missing code for XEHP
1 parent 2c0a8cf commit 574cb6b

File tree

9 files changed

+88698
-2
lines changed

9 files changed

+88698
-2
lines changed

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9019,6 +9019,9 @@ void EmitPass::EmitGenIntrinsicMessage(llvm::GenIntrinsicInst* inst)
90199019
if (m_currShader->m_Platform->GetPlatformFamily() == IGFX_GEN8_CORE ||
90209020
m_currShader->m_Platform->GetPlatformFamily() == IGFX_GEN9_CORE)
90219021
emitStateRegID(14, 15);
9022+
else if (m_currShader->m_Platform->GetPlatformFamily() == IGFX_GEN12_CORE ||
9023+
m_currShader->m_Platform->GetPlatformFamily() == IGFX_XE_HP_CORE)
9024+
emitStateRegID(11, 13);
90229025
else
90239026
emitStateRegID(12, 14);
90249027
break;

IGC/Compiler/igc_workaround.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ namespace IGC
9898
InitAdlpHwWaTable(&waTable, pSkuFeatureTable, &stWaInitParam);
9999
InitAdlpSwWaTable(&waTable, pSkuFeatureTable, &stWaInitParam);
100100
break;
101+
case IGFX_XE_HP_SDV:
102+
InitXeHPSDVHwWaTable(&waTable, pSkuFeatureTable, &stWaInitParam);
103+
InitXeHPSDVSwWaTable(&waTable, pSkuFeatureTable, &stWaInitParam);
104+
break;
101105
default:
102106
IGC_ASSERT(0);
103107
break;

IGC/common/SIPKernels/XeHPSIPCSR.h

Lines changed: 608 additions & 0 deletions
Large diffs are not rendered by default.

IGC/common/SIPKernels/XeHPSIPCSRDebug.h

Lines changed: 44021 additions & 0 deletions
Large diffs are not rendered by default.

IGC/common/SIPKernels/XeHPSIPCSRDebugBindless.h

Lines changed: 44033 additions & 0 deletions
Large diffs are not rendered by default.

IGC/common/ShaderOverride.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ iga_gen_t GetIGAPlatform(PLATFORM const & platform)
124124
return IGA_GEN11;
125125
case IGFX_GEN12_CORE:
126126
case IGFX_GEN12LP_CORE:
127+
case IGFX_XE_HP_CORE:
127128
if ( ProductFamily == IGFX_TIGERLAKE_LP
128129
|| ProductFamily == IGFX_DG1
129130
|| ProductFamily == IGFX_ROCKETLAKE
@@ -133,6 +134,10 @@ iga_gen_t GetIGAPlatform(PLATFORM const & platform)
133134
{
134135
return IGA_GEN12p1;
135136
}
137+
else if (ProductFamily == IGFX_XE_HP_SDV)
138+
{
139+
return IGA_XE_HP;
140+
}
136141
default:
137142
IGC_ASSERT_MESSAGE(0, "unsupported platform");
138143
break;

IGC/common/SystemThread.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ SPDX-License-Identifier: MIT
3232
#include "common/SIPKernels/Gen12LPSIPCSRDebug.h"
3333
#include "common/SIPKernels/Gen12LPSIPCSRDebugBindless.h"
3434
#include "Probe/Assertion.h"
35+
#include "common/SIPKernels/XeHPSIPCSR.h"
36+
#include "common/SIPKernels/XeHPSIPCSRDebug.h"
37+
#include "common/SIPKernels/XeHPSIPCSRDebugBindless.h"
3538

3639
using namespace llvm;
3740
using namespace USC;
@@ -206,6 +209,7 @@ bool SIPSuppoertedOnPlatformFamily(const GFXCORE_FAMILY& family)
206209
case IGFX_GEN11_CORE:
207210
case IGFX_GEN12_CORE:
208211
case IGFX_GEN12LP_CORE:
212+
case IGFX_XE_HP_CORE:
209213
return true;
210214
default:
211215
return false;
@@ -394,6 +398,11 @@ void populateSIPKernelInfo(const IGC::CPlatform &platform,
394398
(void*)&Gen12SIPCSRDebugBindlessDebugHeader,
395399
(int)sizeof(Gen12SIPCSRDebugBindlessDebugHeader));
396400

401+
SIPKernelInfo[XE_HP_CSR_DEBUG_BINDLESS] = std::make_tuple((void*)&XeHPSIPCSRDebugBindless,
402+
(int)sizeof(XeHPSIPCSRDebugBindless),
403+
(void*)&Gen12SIPCSRDebugBindlessDebugHeader,
404+
(int)sizeof(Gen12SIPCSRDebugBindlessDebugHeader));
405+
397406

398407
GT_SYSTEM_INFO sysInfo = platform.GetGTSystemInfo();
399408
Gen12SIPCSRDebugBindlessDebugHeader.regHeader.num_slices = sysInfo.MaxSlicesSupported;
@@ -416,6 +425,8 @@ void populateSIPKernelInfo(const IGC::CPlatform &platform,
416425
Gen12SIPCSRDebugBindlessDebugHeader.versionHeader.size * 8) / 16 == 0x14),
417426
"Gen12 Bindless SIP header size alignment mismatch.");
418427

428+
SIPKernelInfo[XE_HP_CSR] = std::make_tuple((void*)&XeHPSIPCSR, (int)sizeof(XeHPSIPCSR), nullptr, 0);
429+
SIPKernelInfo[XE_HP_CSR_DEBUG] = std::make_tuple((void*)&XeHPSIPCSRDebug, (int)sizeof(XeHPSIPCSRDebug), nullptr, 0);
419430
}
420431

421432
CGenSystemInstructionKernelProgram* CGenSystemInstructionKernelProgram::Create(
@@ -509,6 +520,7 @@ CGenSystemInstructionKernelProgram* CGenSystemInstructionKernelProgram::Create(
509520
}
510521
case IGFX_GEN12_CORE:
511522
case IGFX_GEN12LP_CORE:
523+
case IGFX_XE_HP_CORE:
512524
{
513525
if (mode & SYSTEM_THREAD_MODE_DEBUG)
514526
{
@@ -520,7 +532,9 @@ CGenSystemInstructionKernelProgram* CGenSystemInstructionKernelProgram::Create(
520532
case IGFX_ALDERLAKE_S:
521533
SIPIndex = bindlessMode ? GEN12_LP_CSR_DEBUG_BINDLESS : GEN12_LP_CSR_DEBUG;
522534
break;
523-
535+
case IGFX_XE_HP_SDV:
536+
SIPIndex = bindlessMode ? XE_HP_CSR_DEBUG_BINDLESS : XE_HP_CSR_DEBUG;
537+
break;
524538

525539
default:
526540
break;
@@ -541,7 +555,8 @@ CGenSystemInstructionKernelProgram* CGenSystemInstructionKernelProgram::Create(
541555
case IGFX_ALDERLAKE_P:
542556
SIPIndex = GEN12_LP_CSR;
543557
break;
544-
558+
case IGFX_XE_HP_SDV:
559+
SIPIndex = XE_HP_CSR;
545560

546561
default:
547562
break;

IGC/common/SystemThread.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ namespace SIP
5858
GEN12_LP_CSR,
5959
GEN12_LP_CSR_DEBUG,
6060
GEN12_LP_CSR_DEBUG_BINDLESS,
61+
XE_HP_CSR,
62+
XE_HP_CSR_DEBUG,
63+
XE_HP_CSR_DEBUG_BINDLESS,
6164
GEN_SIP_MAX_INDEX
6265
};
6366

skuwa/wa_def.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,10 @@ void InitXeHPSDVHwWaTable(
331331
PWA_TABLE pWaTable,
332332
PSKU_FEATURE_TABLE pSkuTable,
333333
PWA_INIT_PARAM pWaParam);
334+
void InitXeHPSDVSwWaTable(
335+
PWA_TABLE pWaTable,
336+
PSKU_FEATURE_TABLE pSkuTable,
337+
PWA_INIT_PARAM pWaParam);
334338
#ifdef __cplusplus
335339
} // extern "C"
336340
#endif

0 commit comments

Comments
 (0)