@@ -174,14 +174,14 @@ void CMKernel::createBufferStatefulAnnotation(unsigned argNo)
174
174
m_kernelInfo.m_constantInputAnnotation .push_back (constInput);
175
175
}
176
176
177
- void CMKernel::createLocalSizeAnnotation (unsigned payloadPosition)
177
+ void CMKernel::createSizeAnnotation (unsigned payloadPosition, int32_t Type )
178
178
{
179
179
for (int i = 0 ; i < 3 ; ++i) {
180
180
iOpenCL::ConstantInputAnnotation* constInput = new iOpenCL::ConstantInputAnnotation;
181
181
DWORD sizeInBytes = iOpenCL::DATA_PARAMETER_DATA_SIZE;
182
182
183
183
constInput->AnnotationSize = sizeof (constInput);
184
- constInput->ConstantType = iOpenCL::DATA_PARAMETER_ENQUEUED_LOCAL_WORK_SIZE ;
184
+ constInput->ConstantType = Type ;
185
185
constInput->Offset = i * sizeInBytes;
186
186
constInput->PayloadPosition = payloadPosition;
187
187
constInput->PayloadSizeInBytes = sizeInBytes;
@@ -325,6 +325,12 @@ static void generatePatchTokens(const cmc_kernel_info *info, CMKernel& kernel)
325
325
case cmc_arg_kind::General:
326
326
kernel.createConstArgumentAnnotation (AI.index , AI.offset - constantPayloadStart, AI.sizeInBytes );
327
327
break ;
328
+ case cmc_arg_kind::LocalSize:
329
+ kernel.createSizeAnnotation (AI.offset - constantPayloadStart, iOpenCL::DATA_PARAMETER_ENQUEUED_LOCAL_WORK_SIZE);
330
+ break ;
331
+ case cmc_arg_kind::GroupCount:
332
+ kernel.createSizeAnnotation (AI.offset - constantPayloadStart, iOpenCL::DATA_PARAMETER_NUM_WORK_GROUPS);
333
+ break ;
328
334
case cmc_arg_kind::Buffer:
329
335
kernel.createPointerGlobalAnnotation (AI.index , AI.sizeInBytes , AI.offset - constantPayloadStart, AI.BTI );
330
336
kernel.createBufferStatefulAnnotation (AI.index );
@@ -445,8 +451,11 @@ int cmc::vISACompile(cmc_compile_info* output, iOpenCL::CGen8CMProgram& CMProgra
445
451
unsigned genBinarySize = 0 ;
446
452
FINALIZER_INFO JITInfo;
447
453
// TODO: take commond line options.
448
- int numArgs = 0 ;
449
- const char ** args = nullptr ;
454
+ const char * args[] = {
455
+ " -noschedule" ,
456
+ " -nopresched"
457
+ };
458
+ int numArgs = sizeof (args)/sizeof (args[0 ]);
450
459
status = JITCompile (info->name .c_str (), output->binary , (unsigned )output->binary_size , genBinary,
451
460
genBinarySize, platformStr, output->visa_major_version ,
452
461
output->visa_minor_version , numArgs, args, nullptr , &JITInfo);
0 commit comments