@@ -117,6 +117,7 @@ pi_result getInfo(size_t param_value_size, void *param_value,
117
117
size_t *param_value_size_ret, T value) {
118
118
119
119
auto assignment = [](void *param_value, T value, size_t value_size) {
120
+ (void )value_size;
120
121
*static_cast <T *>(param_value) = value;
121
122
};
122
123
@@ -1089,8 +1090,8 @@ pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName,
1089
1090
//
1090
1091
return ReturnValue (Platform->ZeDriverApiVersion .c_str ());
1091
1092
default :
1092
- // TODO: implement other parameters
1093
- die ( " Unsupported ParamName in piPlatformGetInfo " ) ;
1093
+ zePrint ( " piPlatformGetInfo: unrecognized ParamName \n " );
1094
+ return PI_INVALID_VALUE ;
1094
1095
}
1095
1096
1096
1097
return PI_SUCCESS;
@@ -1912,6 +1913,9 @@ pi_result piContextCreate(const pi_context_properties *Properties,
1912
1913
const void *PrivateInfo, size_t CB,
1913
1914
void *UserData),
1914
1915
void *UserData, pi_context *RetContext) {
1916
+ (void )Properties;
1917
+ (void )PFnNotify;
1918
+ (void )UserData;
1915
1919
PI_ASSERT (Devices, PI_INVALID_DEVICE);
1916
1920
PI_ASSERT (RetContext, PI_INVALID_VALUE);
1917
1921
@@ -1958,6 +1962,9 @@ pi_result piContextGetInfo(pi_context Context, pi_context_info ParamName,
1958
1962
pi_result piextContextSetExtendedDeleter (pi_context Context,
1959
1963
pi_context_extended_deleter Function,
1960
1964
void *UserData) {
1965
+ (void )Context;
1966
+ (void )Function;
1967
+ (void )UserData;
1961
1968
die (" piextContextSetExtendedDeleter: not supported" );
1962
1969
return PI_SUCCESS;
1963
1970
}
@@ -2294,6 +2301,11 @@ pi_result piMemGetInfo(pi_mem Mem,
2294
2301
cl_mem_info ParamName, // TODO: untie from OpenCL
2295
2302
size_t ParamValueSize, void *ParamValue,
2296
2303
size_t *ParamValueSizeRet) {
2304
+ (void )Mem;
2305
+ (void )ParamName;
2306
+ (void )ParamValueSize;
2307
+ (void )ParamValue;
2308
+ (void )ParamValueSizeRet;
2297
2309
die (" piMemGetInfo: not implemented" );
2298
2310
return {};
2299
2311
}
@@ -2496,12 +2508,16 @@ pi_result piMemImageCreate(pi_context Context, pi_mem_flags Flags,
2496
2508
}
2497
2509
2498
2510
pi_result piextMemGetNativeHandle (pi_mem Mem, pi_native_handle *NativeHandle) {
2511
+ (void )Mem;
2512
+ (void )NativeHandle;
2499
2513
die (" piextMemGetNativeHandle: not supported" );
2500
2514
return PI_SUCCESS;
2501
2515
}
2502
2516
2503
2517
pi_result piextMemCreateWithNativeHandle (pi_native_handle NativeHandle,
2504
2518
pi_mem *Mem) {
2519
+ (void )NativeHandle;
2520
+ (void )Mem;
2505
2521
die (" piextMemCreateWithNativeHandle: not supported" );
2506
2522
return PI_SUCCESS;
2507
2523
}
@@ -2582,6 +2598,11 @@ pi_result piclProgramCreateWithSource(pi_context Context, pi_uint32 Count,
2582
2598
const size_t *Lengths,
2583
2599
pi_program *RetProgram) {
2584
2600
2601
+ (void )Context;
2602
+ (void )Count;
2603
+ (void )Strings;
2604
+ (void )Lengths;
2605
+ (void )RetProgram;
2585
2606
zePrint (" piclProgramCreateWithSource: not supported in Level Zero\n " );
2586
2607
return PI_INVALID_OPERATION;
2587
2608
}
@@ -2731,6 +2752,7 @@ pi_result piProgramLink(pi_context Context, pi_uint32 NumDevices,
2731
2752
const pi_program *InputPrograms,
2732
2753
void (*PFnNotify)(pi_program Program, void *UserData),
2733
2754
void *UserData, pi_program *RetProgram) {
2755
+ (void )Options;
2734
2756
2735
2757
// We only support one device with Level Zero currently.
2736
2758
pi_device Device = Context->Devices [0 ];
@@ -2845,6 +2867,9 @@ pi_result piProgramCompile(
2845
2867
const char *Options, pi_uint32 NumInputHeaders,
2846
2868
const pi_program *InputHeaders, const char **HeaderIncludeNames,
2847
2869
void (*PFnNotify)(pi_program Program, void *UserData), void *UserData) {
2870
+ (void )NumInputHeaders;
2871
+ (void )InputHeaders;
2872
+ (void )HeaderIncludeNames;
2848
2873
2849
2874
// The OpenCL spec says this should return CL_INVALID_PROGRAM, but there is
2850
2875
// no corresponding PI error code.
@@ -2970,6 +2995,7 @@ pi_result piProgramGetBuildInfo(pi_program Program, pi_device Device,
2970
2995
cl_program_build_info ParamName,
2971
2996
size_t ParamValueSize, void *ParamValue,
2972
2997
size_t *ParamValueSizeRet) {
2998
+ (void )Device;
2973
2999
2974
3000
ReturnHelper ReturnValue (ParamValueSize, ParamValue, ParamValueSizeRet);
2975
3001
if (ParamName == CL_PROGRAM_BINARY_TYPE) {
@@ -3402,6 +3428,9 @@ pi_result piKernelGetSubGroupInfo(pi_kernel Kernel, pi_device Device,
3402
3428
size_t InputValueSize, const void *InputValue,
3403
3429
size_t ParamValueSize, void *ParamValue,
3404
3430
size_t *ParamValueSizeRet) {
3431
+ (void )Device;
3432
+ (void )InputValueSize;
3433
+ (void )InputValue;
3405
3434
3406
3435
ze_kernel_properties_t ZeKernelProperties;
3407
3436
ZE_CALL (zeKernelGetProperties (Kernel->ZeKernel , &ZeKernelProperties));
@@ -3795,11 +3824,17 @@ pi_result piEventSetCallback(pi_event Event, pi_int32 CommandExecCallbackType,
3795
3824
pi_int32 EventCommandStatus,
3796
3825
void *UserData),
3797
3826
void *UserData) {
3827
+ (void )Event;
3828
+ (void )CommandExecCallbackType;
3829
+ (void )PFnNotify;
3830
+ (void )UserData;
3798
3831
die (" piEventSetCallback: deprecated, to be removed" );
3799
3832
return PI_SUCCESS;
3800
3833
}
3801
3834
3802
3835
pi_result piEventSetStatus (pi_event Event, pi_int32 ExecutionStatus) {
3836
+ (void )Event;
3837
+ (void )ExecutionStatus;
3803
3838
die (" piEventSetStatus: deprecated, to be removed" );
3804
3839
return PI_SUCCESS;
3805
3840
}
@@ -3838,12 +3873,16 @@ pi_result piEventRelease(pi_event Event) {
3838
3873
3839
3874
pi_result piextEventGetNativeHandle (pi_event Event,
3840
3875
pi_native_handle *NativeHandle) {
3876
+ (void )Event;
3877
+ (void )NativeHandle;
3841
3878
die (" piextEventGetNativeHandle: not supported" );
3842
3879
return PI_SUCCESS;
3843
3880
}
3844
3881
3845
3882
pi_result piextEventCreateWithNativeHandle (pi_native_handle NativeHandle,
3846
3883
pi_event *Event) {
3884
+ (void )NativeHandle;
3885
+ (void )Event;
3847
3886
die (" piextEventCreateWithNativeHandle: not supported" );
3848
3887
return PI_SUCCESS;
3849
3888
}
@@ -3970,6 +4009,11 @@ pi_result piSamplerCreate(pi_context Context,
3970
4009
pi_result piSamplerGetInfo (pi_sampler Sampler, pi_sampler_info ParamName,
3971
4010
size_t ParamValueSize, void *ParamValue,
3972
4011
size_t *ParamValueSizeRet) {
4012
+ (void )Sampler;
4013
+ (void )ParamName;
4014
+ (void )ParamValueSize;
4015
+ (void )ParamValue;
4016
+ (void )ParamValueSizeRet;
3973
4017
3974
4018
die (" piSamplerGetInfo: not implemented" );
3975
4019
return {};
@@ -3997,6 +4041,10 @@ pi_result piSamplerRelease(pi_sampler Sampler) {
3997
4041
//
3998
4042
pi_result piEnqueueEventsWait (pi_queue Queue, pi_uint32 NumEventsInWaitList,
3999
4043
const pi_event *EventWaitList, pi_event *Event) {
4044
+ (void )Queue;
4045
+ (void )NumEventsInWaitList;
4046
+ (void )EventWaitList;
4047
+ (void )Event;
4000
4048
4001
4049
die (" piEnqueueEventsWait: not implemented" );
4002
4050
return {};
@@ -4572,6 +4620,11 @@ pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem MemObj, void *MappedPtr,
4572
4620
pi_result piMemImageGetInfo (pi_mem Image, pi_image_info ParamName,
4573
4621
size_t ParamValueSize, void *ParamValue,
4574
4622
size_t *ParamValueSizeRet) {
4623
+ (void )Image;
4624
+ (void )ParamName;
4625
+ (void )ParamValueSize;
4626
+ (void )ParamValue;
4627
+ (void )ParamValueSizeRet;
4575
4628
4576
4629
die (" piMemImageGetInfo: not implemented" );
4577
4630
return {};
@@ -4823,6 +4876,13 @@ pi_result piEnqueueMemImageFill(pi_queue Queue, pi_mem Image,
4823
4876
pi_uint32 NumEventsInWaitList,
4824
4877
const pi_event *EventWaitList,
4825
4878
pi_event *Event) {
4879
+ (void )Image;
4880
+ (void )FillColor;
4881
+ (void )Origin;
4882
+ (void )Region;
4883
+ (void )NumEventsInWaitList;
4884
+ (void )EventWaitList;
4885
+ (void )Event;
4826
4886
4827
4887
PI_ASSERT (Queue, PI_INVALID_QUEUE);
4828
4888
@@ -4880,6 +4940,15 @@ pi_result piEnqueueNativeKernel(pi_queue Queue, void (*UserFunc)(void *),
4880
4940
pi_uint32 NumEventsInWaitList,
4881
4941
const pi_event *EventWaitList,
4882
4942
pi_event *Event) {
4943
+ (void )UserFunc;
4944
+ (void )Args;
4945
+ (void )CbArgs;
4946
+ (void )NumMemObjects;
4947
+ (void )MemList;
4948
+ (void )ArgsMemLoc;
4949
+ (void )NumEventsInWaitList;
4950
+ (void )EventWaitList;
4951
+ (void )Event;
4883
4952
4884
4953
PI_ASSERT (Queue, PI_INVALID_QUEUE);
4885
4954
@@ -4894,6 +4963,7 @@ pi_result piEnqueueNativeKernel(pi_queue Queue, void (*UserFunc)(void *),
4894
4963
pi_result piextGetDeviceFunctionPointer (pi_device Device, pi_program Program,
4895
4964
const char *FunctionName,
4896
4965
pi_uint64 *FunctionPointerRet) {
4966
+ (void )Device;
4897
4967
PI_ASSERT (Program, PI_INVALID_PROGRAM);
4898
4968
4899
4969
if (Program->State != _pi_program::Exe &&
@@ -5317,7 +5387,7 @@ pi_result piextUSMEnqueueMemAdvise(pi_queue Queue, const void *Ptr,
5317
5387
return PI_SUCCESS;
5318
5388
}
5319
5389
5320
- // / API to query information about USM allocated pointers
5390
+ // / API to query information about USM allocated pointers.
5321
5391
// / Valid Queries:
5322
5392
// / PI_MEM_ALLOC_TYPE returns host/device/shared pi_usm_type value
5323
5393
// / PI_MEM_ALLOC_BASE_PTR returns the base ptr of an allocation if
@@ -5395,6 +5465,7 @@ pi_result piextUSMGetMemAllocInfo(pi_context Context, const void *Ptr,
5395
5465
5396
5466
pi_result piKernelSetExecInfo (pi_kernel Kernel, pi_kernel_exec_info ParamName,
5397
5467
size_t ParamValueSize, const void *ParamValue) {
5468
+ (void )ParamValueSize;
5398
5469
PI_ASSERT (Kernel, PI_INVALID_KERNEL);
5399
5470
PI_ASSERT (ParamValue, PI_INVALID_VALUE);
5400
5471
0 commit comments