Skip to content

Commit 942034c

Browse files
committed
[Autobackout][FuncReg]Revert of change: e31699d
Support for syncBuffer implicit argument Change-Id: Ib8e2e541bf2813f67ad41e0eb56faa966a5a3503
1 parent 1f5193e commit 942034c

File tree

16 files changed

+2
-153
lines changed

16 files changed

+2
-153
lines changed

IGC/AdaptorCommon/ImplicitArgs.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ ImplicitArgs::ImplicitArgs(const llvm::Function& func , const MetaDataUtils* pMd
300300
IMPLICIT_ARGS.push_back(ImplicitArg(ImplicitArg::STAGE_IN_GRID_ORIGIN, "stageInGridOrigin", ImplicitArg::INT, WIAnalysis::UNIFORM, 3, ImplicitArg::ALIGN_GRF, true));
301301
IMPLICIT_ARGS.push_back(ImplicitArg(ImplicitArg::STAGE_IN_GRID_SIZE, "stageInGridSize", ImplicitArg::INT, WIAnalysis::UNIFORM, 3, ImplicitArg::ALIGN_GRF, true));
302302

303-
IMPLICIT_ARGS.push_back(ImplicitArg(ImplicitArg::SYNC_BUFFER, "syncBuffer", ImplicitArg::GLOBALPTR, WIAnalysis::UNIFORM, 1, ImplicitArg::ALIGN_PTR, false));
304303

305304
assert(IMPLICIT_ARGS.size() == ImplicitArg::NUM_IMPLICIT_ARGS && "Mismatch in NUM_IMPLICIT_ARGS and IMPLICIT_ARGS vector");
306305

IGC/AdaptorCommon/ImplicitArgs.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ namespace IGC
122122
STAGE_IN_GRID_ORIGIN,
123123
STAGE_IN_GRID_SIZE,
124124

125-
SYNC_BUFFER,
126125

127126
NUM_IMPLICIT_ARGS
128127
};

IGC/AdaptorOCL/OCL/KernelAnnotations.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,6 @@ struct PrintfBufferAnnotation : KernelArgumentAnnotation
222222
DWORD PayloadPosition;
223223
};
224224

225-
// Annotation for sync buffer.
226-
struct SyncBufferAnnotation : KernelArgumentAnnotation
227-
{
228-
DWORD DataSize;
229-
DWORD PayloadPosition;
230-
};
231-
232225
// Generated by front end
233226
struct KernelConstantRegisterAnnotation
234227
{

IGC/AdaptorOCL/OCL/Patch/patch_parser.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,27 +1005,6 @@ void DebugPatchList(
10051005
}
10061006
break;
10071007

1008-
case iOpenCL::PATCH_TOKEN_ALLOCATE_SYNC_BUFFER:
1009-
{
1010-
const iOpenCL::SPatchAllocateSyncBuffer* pPatchItem =
1011-
(const iOpenCL::SPatchAllocateSyncBuffer*)pHeader;
1012-
1013-
ICBE_DPF_STR(output, GFXDBG_HARDWARE,
1014-
"PATCH_TOKEN_ALLOCATE_SYNC_BUFFER (%08X) (size = %d)\n",
1015-
pPatchItem->Token,
1016-
pPatchItem->Size);
1017-
ICBE_DPF_STR(output, GFXDBG_HARDWARE,
1018-
"\tSurfaceStateHeapOffset = %d\n",
1019-
pPatchItem->SurfaceStateHeapOffset);
1020-
ICBE_DPF_STR(output, GFXDBG_HARDWARE,
1021-
"\tDataParamOffset = %d\n",
1022-
pPatchItem->DataParamOffset);
1023-
ICBE_DPF_STR(output, GFXDBG_HARDWARE,
1024-
"\tDataParamSize = %d\n",
1025-
pPatchItem->DataParamSize);
1026-
}
1027-
break;
1028-
10291008
// Stateless Tokens
10301009
case iOpenCL::PATCH_TOKEN_STATELESS_GLOBAL_MEMORY_OBJECT_KERNEL_ARGUMENT:
10311010
{

IGC/AdaptorOCL/OCL/sp/sp_g8.cpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -758,21 +758,6 @@ RETVAL CGen8OpenCLStateProcessor::CreateSurfaceStateHeap(
758758
false)));
759759
}
760760

761-
if (annotations.m_syncBufferAnnotation != NULL)
762-
{
763-
unsigned int bti = annotations.m_argIndexMap.at(annotations.m_syncBufferAnnotation->ArgumentNumber);
764-
context.Surface.SurfaceOffset[bti] = (DWORD)membuf.Size();
765-
766-
SurfaceStates.insert(
767-
std::make_pair(
768-
bti,
769-
SurfaceState(
770-
SURFACE_BUFFER,
771-
SURFACE_FORMAT_RAW,
772-
0,
773-
false)));
774-
}
775-
776761
// If GT-Pin is enabled, assign btis to GT-Pin's surfaces
777762
if (gtpinEnabled)
778763
{
@@ -1674,32 +1659,6 @@ RETVAL CGen8OpenCLStateProcessor::CreatePatchList(
16741659
}
16751660
}
16761661

1677-
// Patch for Sync Buffer Offset
1678-
if (retValue.Success)
1679-
{
1680-
if (annotations.m_syncBufferAnnotation != nullptr)
1681-
{
1682-
iOpenCL::SyncBufferAnnotation* syncBufAnn = annotations.m_syncBufferAnnotation;
1683-
1684-
iOpenCL::SPatchAllocateSyncBuffer patch;
1685-
memset(&patch, 0, sizeof(patch));
1686-
1687-
unsigned int bti = annotations.m_argIndexMap.at(syncBufAnn->ArgumentNumber);
1688-
1689-
patch.Token = iOpenCL::PATCH_TOKEN_ALLOCATE_SYNC_BUFFER;
1690-
patch.Size = sizeof(patch);
1691-
patch.SurfaceStateHeapOffset = context.Surface.SurfaceOffset[bti];
1692-
patch.DataParamOffset = syncBufAnn->PayloadPosition;
1693-
patch.DataParamSize = syncBufAnn->DataSize;
1694-
1695-
dataParameterStreamSize = std::max(
1696-
dataParameterStreamSize,
1697-
syncBufAnn->PayloadPosition + syncBufAnn->DataSize);
1698-
1699-
retValue = AddPatchItem(patch, membuf);
1700-
}
1701-
}
1702-
17031662
// Pointer inputs with initializer
17041663
if( retValue.Success )
17051664
{

IGC/AdaptorOCL/ocl_igc_shared/executable_format/patch_list.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Abstract: Contains common patch structure definitions
3333

3434
namespace iOpenCL
3535
{
36-
const uint32_t CURRENT_ICBE_VERSION = 1062;
36+
const uint32_t CURRENT_ICBE_VERSION = 1061;
3737

3838
const uint32_t MAGIC_CL = 0x494E5443; // 'I', 'N', 'T', 'C'
3939
const uint32_t INVALID_INDEX = 0xFFFFFFFF;
@@ -150,13 +150,12 @@ enum PATCH_TOKEN
150150
PATCH_TOKEN_PROGRAM_SYMBOL_TABLE, // 53 @SPatchFunctionTableInfo@
151151
PATCH_TOKEN_PROGRAM_RELOCATION_TABLE, // 54 @SPatchFunctionTableInfo@
152152
PATCH_TOKEN_MEDIA_VFE_STATE_SLOT1, // 55 @SPatchMediaVFEState of slot1@
153-
PATCH_TOKEN_ALLOCATE_SYNC_BUFFER, // 56 @SPatchAllocateSyncBuffer@
154153

155154
NUM_PATCH_TOKENS
156155
};
157156

158157
// Update CURRENT_ICBE_VERSION when modifying the patch list
159-
static_assert( NUM_PATCH_TOKENS == 57, "NUM_PATCH_TOKENS has invalid value");
158+
static_assert( NUM_PATCH_TOKENS == 56, "NUM_PATCH_TOKENS has invalid value");
160159

161160
/*****************************************************************************\
162161
ENUM: IMAGE_MEMORY_OBJECT_TYPE

IGC/AdaptorOCL/ocl_igc_shared/executable_format/patch_shared.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -444,17 +444,6 @@ struct SPatchAllocateStatelessPrintfSurface :
444444
// Update CURRENT_ICBE_VERSION when modifying the patch list
445445
static_assert( sizeof( SPatchAllocateStatelessPrintfSurface ) == ( 16 + sizeof( SPatchItemHeader ) ) , "The size of SPatchAllocateStatelessPrintfSurface is not what is expected" );
446446

447-
struct SPatchAllocateSyncBuffer :
448-
SPatchItemHeader
449-
{
450-
uint32_t SurfaceStateHeapOffset;
451-
uint32_t DataParamOffset;
452-
uint32_t DataParamSize;
453-
};
454-
455-
// Update CURRENT_ICBE_VERSION when modifying the patch list
456-
static_assert( sizeof( SPatchAllocateSyncBuffer ) == ( 12 + sizeof( SPatchItemHeader ) ), "The size of SPatchAllocateSyncBuffer is not what is expected" );
457-
458447
/*****************************************************************************\
459448
STRUCT: SPatchAllocateStatelessPrivateSurface
460449
\*****************************************************************************/

IGC/Compiler/CISACodeGen/OpenCLKernelCodeGen.cpp

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,6 @@ namespace IGC
194194
m_kernelInfo.m_printfBufferAnnotation = nullptr;
195195
}
196196

197-
// Sync Buffer Annotation
198-
if (m_kernelInfo.m_syncBufferAnnotation != nullptr)
199-
{
200-
delete m_kernelInfo.m_syncBufferAnnotation;
201-
m_kernelInfo.m_syncBufferAnnotation = nullptr;
202-
}
203-
204197
// StartGASAnnotationAnnotation
205198
if (m_kernelInfo.m_startGAS != nullptr)
206199
{
@@ -1154,23 +1147,6 @@ namespace IGC
11541147
m_kernelInfo.m_threadPayload.UnusedPerThreadConstantPresent = true;
11551148
break;
11561149

1157-
case KernelArg::ArgType::IMPLICIT_SYNC_BUFFER:
1158-
{
1159-
int argNo = kernelArg->getAssociatedArgNo();
1160-
SOpenCLKernelInfo::SResourceInfo resInfo = getResourceInfo(argNo);
1161-
m_kernelInfo.m_argIndexMap[argNo] = getBTI(resInfo);
1162-
1163-
iOpenCL::SyncBufferAnnotation* syncBuffer = new iOpenCL::SyncBufferAnnotation();
1164-
1165-
syncBuffer->AnnotationSize = sizeof(syncBuffer);
1166-
syncBuffer->ArgumentNumber = argNo;
1167-
syncBuffer->PayloadPosition = payloadPosition;
1168-
syncBuffer->DataSize = kernelArg->getAllocateSize();
1169-
1170-
m_kernelInfo.m_syncBufferAnnotation = syncBuffer;
1171-
}
1172-
break;
1173-
11741150
case KernelArg::ArgType::IMPLICIT_PRINTF_BUFFER:
11751151
{
11761152
int argNo = kernelArg->getAssociatedArgNo();
@@ -1432,7 +1408,6 @@ namespace IGC
14321408
m_kernelInfo.m_threadPayload.HasLocalID = false;
14331409
m_kernelInfo.m_threadPayload.UnusedPerThreadConstantPresent = false;
14341410
m_kernelInfo.m_printfBufferAnnotation = nullptr;
1435-
m_kernelInfo.m_syncBufferAnnotation = nullptr;
14361411
m_kernelInfo.m_threadPayload.HasStageInGridOrigin = false;
14371412
m_kernelInfo.m_threadPayload.HasStageInGridSize = false;
14381413

IGC/Compiler/CodeGenPublic.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,6 @@ namespace IGC
513513
SOpenCLKernelInfo()
514514
{
515515
m_printfBufferAnnotation = nullptr;
516-
m_syncBufferAnnotation = nullptr;
517516
m_startGAS = nullptr;
518517
m_WindowSizeGAS = nullptr;
519518
m_PrivateMemSize = nullptr;
@@ -538,7 +537,6 @@ namespace IGC
538537
std::vector<iOpenCL::PrintfStringAnnotation*> m_printfStringAnnotations;
539538

540539
iOpenCL::PrintfBufferAnnotation* m_printfBufferAnnotation;
541-
iOpenCL::SyncBufferAnnotation* m_syncBufferAnnotation;
542540
iOpenCL::StartGASAnnotation* m_startGAS = NULL;
543541
iOpenCL::WindowSizeGASAnnotation* m_WindowSizeGAS = NULL;
544542
iOpenCL::PrivateMemSizeAnnotation* m_PrivateMemSize = NULL;

IGC/Compiler/Optimizer/OpenCLPasses/KernelArgs.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,6 @@ KernelArg::ArgType KernelArg::calcArgType(const ImplicitArg& arg) const
244244
return KernelArg::ArgType::IMPLICIT_CONSTANT_BASE;
245245
case ImplicitArg::PRINTF_BUFFER:
246246
return KernelArg::ArgType::IMPLICIT_PRINTF_BUFFER;
247-
case ImplicitArg::SYNC_BUFFER:
248-
return KernelArg::ArgType::IMPLICIT_SYNC_BUFFER;
249247
case ImplicitArg::BUFFER_OFFSET:
250248
return KernelArg::ArgType::IMPLICIT_BUFFER_OFFSET;
251249
case ImplicitArg::GLOBAL_BASE:
@@ -765,7 +763,6 @@ KernelArgsOrder::KernelArgsOrder(InputType layout)
765763
KernelArg::ArgType::IMPLICIT_GLOBAL_BASE,
766764
KernelArg::ArgType::IMPLICIT_PRIVATE_BASE,
767765
KernelArg::ArgType::IMPLICIT_PRINTF_BUFFER,
768-
KernelArg::ArgType::IMPLICIT_SYNC_BUFFER,
769766
KernelArg::ArgType::IMPLICIT_BUFFER_OFFSET,
770767
KernelArg::ArgType::IMPLICIT_WORK_DIM,
771768
KernelArg::ArgType::IMPLICIT_NUM_GROUPS,
@@ -876,7 +873,6 @@ KernelArgsOrder::KernelArgsOrder(InputType layout)
876873
KernelArg::ArgType::IMPLICIT_GLOBAL_BASE,
877874
KernelArg::ArgType::IMPLICIT_PRIVATE_BASE,
878875
KernelArg::ArgType::IMPLICIT_PRINTF_BUFFER,
879-
KernelArg::ArgType::IMPLICIT_SYNC_BUFFER,
880876
KernelArg::ArgType::IMPLICIT_BUFFER_OFFSET,
881877
KernelArg::ArgType::IMPLICIT_WORK_DIM,
882878
KernelArg::ArgType::IMPLICIT_NUM_GROUPS,

0 commit comments

Comments
 (0)