@@ -117,6 +117,7 @@ pi_result getInfo(size_t param_value_size, void *param_value,
117117 size_t *param_value_size_ret, T value) {
118118
119119 auto assignment = [](void *param_value, T value, size_t value_size) {
120+ (void )value_size;
120121 *static_cast <T *>(param_value) = value;
121122 };
122123
@@ -507,7 +508,7 @@ pi_result _pi_context::finalize() {
507508 // There could be some memory that may have not been deallocated.
508509 // For example, zeEventPool could be still alive.
509510 std::lock_guard<std::mutex> NumEventsLiveInEventPoolGuard (
510- NumEventsLiveInEventPoolMutex, std::adopt_lock );
511+ NumEventsLiveInEventPoolMutex);
511512 if (ZeEventPool && NumEventsLiveInEventPool[ZeEventPool])
512513 zeEventPoolDestroy (ZeEventPool);
513514
@@ -1089,8 +1090,8 @@ pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName,
10891090 //
10901091 return ReturnValue (Platform->ZeDriverApiVersion .c_str ());
10911092 default :
1092- // TODO: implement other parameters
1093- die ( " Unsupported ParamName in piPlatformGetInfo " ) ;
1093+ zePrint ( " piPlatformGetInfo: unrecognized ParamName \n " );
1094+ return PI_INVALID_VALUE ;
10941095 }
10951096
10961097 return PI_SUCCESS;
@@ -1912,6 +1913,9 @@ pi_result piContextCreate(const pi_context_properties *Properties,
19121913 const void *PrivateInfo, size_t CB,
19131914 void *UserData),
19141915 void *UserData, pi_context *RetContext) {
1916+ (void )Properties;
1917+ (void )PFnNotify;
1918+ (void )UserData;
19151919 PI_ASSERT (Devices, PI_INVALID_DEVICE);
19161920 PI_ASSERT (RetContext, PI_INVALID_VALUE);
19171921
@@ -1958,6 +1962,9 @@ pi_result piContextGetInfo(pi_context Context, pi_context_info ParamName,
19581962pi_result piextContextSetExtendedDeleter (pi_context Context,
19591963 pi_context_extended_deleter Function,
19601964 void *UserData) {
1965+ (void )Context;
1966+ (void )Function;
1967+ (void )UserData;
19611968 die (" piextContextSetExtendedDeleter: not supported" );
19621969 return PI_SUCCESS;
19631970}
@@ -2294,6 +2301,11 @@ pi_result piMemGetInfo(pi_mem Mem,
22942301 cl_mem_info ParamName, // TODO: untie from OpenCL
22952302 size_t ParamValueSize, void *ParamValue,
22962303 size_t *ParamValueSizeRet) {
2304+ (void )Mem;
2305+ (void )ParamName;
2306+ (void )ParamValueSize;
2307+ (void )ParamValue;
2308+ (void )ParamValueSizeRet;
22972309 die (" piMemGetInfo: not implemented" );
22982310 return {};
22992311}
@@ -2496,12 +2508,16 @@ pi_result piMemImageCreate(pi_context Context, pi_mem_flags Flags,
24962508}
24972509
24982510pi_result piextMemGetNativeHandle (pi_mem Mem, pi_native_handle *NativeHandle) {
2511+ (void )Mem;
2512+ (void )NativeHandle;
24992513 die (" piextMemGetNativeHandle: not supported" );
25002514 return PI_SUCCESS;
25012515}
25022516
25032517pi_result piextMemCreateWithNativeHandle (pi_native_handle NativeHandle,
25042518 pi_mem *Mem) {
2519+ (void )NativeHandle;
2520+ (void )Mem;
25052521 die (" piextMemCreateWithNativeHandle: not supported" );
25062522 return PI_SUCCESS;
25072523}
@@ -2582,6 +2598,11 @@ pi_result piclProgramCreateWithSource(pi_context Context, pi_uint32 Count,
25822598 const size_t *Lengths,
25832599 pi_program *RetProgram) {
25842600
2601+ (void )Context;
2602+ (void )Count;
2603+ (void )Strings;
2604+ (void )Lengths;
2605+ (void )RetProgram;
25852606 zePrint (" piclProgramCreateWithSource: not supported in Level Zero\n " );
25862607 return PI_INVALID_OPERATION;
25872608}
@@ -2731,6 +2752,7 @@ pi_result piProgramLink(pi_context Context, pi_uint32 NumDevices,
27312752 const pi_program *InputPrograms,
27322753 void (*PFnNotify)(pi_program Program, void *UserData),
27332754 void *UserData, pi_program *RetProgram) {
2755+ (void )Options;
27342756
27352757 // We only support one device with Level Zero currently.
27362758 pi_device Device = Context->Devices [0 ];
@@ -2845,6 +2867,9 @@ pi_result piProgramCompile(
28452867 const char *Options, pi_uint32 NumInputHeaders,
28462868 const pi_program *InputHeaders, const char **HeaderIncludeNames,
28472869 void (*PFnNotify)(pi_program Program, void *UserData), void *UserData) {
2870+ (void )NumInputHeaders;
2871+ (void )InputHeaders;
2872+ (void )HeaderIncludeNames;
28482873
28492874 // The OpenCL spec says this should return CL_INVALID_PROGRAM, but there is
28502875 // no corresponding PI error code.
@@ -2970,6 +2995,7 @@ pi_result piProgramGetBuildInfo(pi_program Program, pi_device Device,
29702995 cl_program_build_info ParamName,
29712996 size_t ParamValueSize, void *ParamValue,
29722997 size_t *ParamValueSizeRet) {
2998+ (void )Device;
29732999
29743000 ReturnHelper ReturnValue (ParamValueSize, ParamValue, ParamValueSizeRet);
29753001 if (ParamName == CL_PROGRAM_BINARY_TYPE) {
@@ -3402,6 +3428,9 @@ pi_result piKernelGetSubGroupInfo(pi_kernel Kernel, pi_device Device,
34023428 size_t InputValueSize, const void *InputValue,
34033429 size_t ParamValueSize, void *ParamValue,
34043430 size_t *ParamValueSizeRet) {
3431+ (void )Device;
3432+ (void )InputValueSize;
3433+ (void )InputValue;
34053434
34063435 ze_kernel_properties_t ZeKernelProperties;
34073436 ZE_CALL (zeKernelGetProperties (Kernel->ZeKernel , &ZeKernelProperties));
@@ -3795,11 +3824,17 @@ pi_result piEventSetCallback(pi_event Event, pi_int32 CommandExecCallbackType,
37953824 pi_int32 EventCommandStatus,
37963825 void *UserData),
37973826 void *UserData) {
3827+ (void )Event;
3828+ (void )CommandExecCallbackType;
3829+ (void )PFnNotify;
3830+ (void )UserData;
37983831 die (" piEventSetCallback: deprecated, to be removed" );
37993832 return PI_SUCCESS;
38003833}
38013834
38023835pi_result piEventSetStatus (pi_event Event, pi_int32 ExecutionStatus) {
3836+ (void )Event;
3837+ (void )ExecutionStatus;
38033838 die (" piEventSetStatus: deprecated, to be removed" );
38043839 return PI_SUCCESS;
38053840}
@@ -3838,12 +3873,16 @@ pi_result piEventRelease(pi_event Event) {
38383873
38393874pi_result piextEventGetNativeHandle (pi_event Event,
38403875 pi_native_handle *NativeHandle) {
3876+ (void )Event;
3877+ (void )NativeHandle;
38413878 die (" piextEventGetNativeHandle: not supported" );
38423879 return PI_SUCCESS;
38433880}
38443881
38453882pi_result piextEventCreateWithNativeHandle (pi_native_handle NativeHandle,
38463883 pi_event *Event) {
3884+ (void )NativeHandle;
3885+ (void )Event;
38473886 die (" piextEventCreateWithNativeHandle: not supported" );
38483887 return PI_SUCCESS;
38493888}
@@ -3970,6 +4009,11 @@ pi_result piSamplerCreate(pi_context Context,
39704009pi_result piSamplerGetInfo (pi_sampler Sampler, pi_sampler_info ParamName,
39714010 size_t ParamValueSize, void *ParamValue,
39724011 size_t *ParamValueSizeRet) {
4012+ (void )Sampler;
4013+ (void )ParamName;
4014+ (void )ParamValueSize;
4015+ (void )ParamValue;
4016+ (void )ParamValueSizeRet;
39734017
39744018 die (" piSamplerGetInfo: not implemented" );
39754019 return {};
@@ -3997,6 +4041,10 @@ pi_result piSamplerRelease(pi_sampler Sampler) {
39974041//
39984042pi_result piEnqueueEventsWait (pi_queue Queue, pi_uint32 NumEventsInWaitList,
39994043 const pi_event *EventWaitList, pi_event *Event) {
4044+ (void )Queue;
4045+ (void )NumEventsInWaitList;
4046+ (void )EventWaitList;
4047+ (void )Event;
40004048
40014049 die (" piEnqueueEventsWait: not implemented" );
40024050 return {};
@@ -4572,6 +4620,11 @@ pi_result piEnqueueMemUnmap(pi_queue Queue, pi_mem MemObj, void *MappedPtr,
45724620pi_result piMemImageGetInfo (pi_mem Image, pi_image_info ParamName,
45734621 size_t ParamValueSize, void *ParamValue,
45744622 size_t *ParamValueSizeRet) {
4623+ (void )Image;
4624+ (void )ParamName;
4625+ (void )ParamValueSize;
4626+ (void )ParamValue;
4627+ (void )ParamValueSizeRet;
45754628
45764629 die (" piMemImageGetInfo: not implemented" );
45774630 return {};
@@ -4823,6 +4876,13 @@ pi_result piEnqueueMemImageFill(pi_queue Queue, pi_mem Image,
48234876 pi_uint32 NumEventsInWaitList,
48244877 const pi_event *EventWaitList,
48254878 pi_event *Event) {
4879+ (void )Image;
4880+ (void )FillColor;
4881+ (void )Origin;
4882+ (void )Region;
4883+ (void )NumEventsInWaitList;
4884+ (void )EventWaitList;
4885+ (void )Event;
48264886
48274887 PI_ASSERT (Queue, PI_INVALID_QUEUE);
48284888
@@ -4880,6 +4940,15 @@ pi_result piEnqueueNativeKernel(pi_queue Queue, void (*UserFunc)(void *),
48804940 pi_uint32 NumEventsInWaitList,
48814941 const pi_event *EventWaitList,
48824942 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;
48834952
48844953 PI_ASSERT (Queue, PI_INVALID_QUEUE);
48854954
@@ -4894,6 +4963,7 @@ pi_result piEnqueueNativeKernel(pi_queue Queue, void (*UserFunc)(void *),
48944963pi_result piextGetDeviceFunctionPointer (pi_device Device, pi_program Program,
48954964 const char *FunctionName,
48964965 pi_uint64 *FunctionPointerRet) {
4966+ (void )Device;
48974967 PI_ASSERT (Program, PI_INVALID_PROGRAM);
48984968
48994969 if (Program->State != _pi_program::Exe &&
@@ -5317,7 +5387,7 @@ pi_result piextUSMEnqueueMemAdvise(pi_queue Queue, const void *Ptr,
53175387 return PI_SUCCESS;
53185388}
53195389
5320- // / API to query information about USM allocated pointers
5390+ // / API to query information about USM allocated pointers.
53215391// / Valid Queries:
53225392// / PI_MEM_ALLOC_TYPE returns host/device/shared pi_usm_type value
53235393// / 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,
53955465
53965466pi_result piKernelSetExecInfo (pi_kernel Kernel, pi_kernel_exec_info ParamName,
53975467 size_t ParamValueSize, const void *ParamValue) {
5468+ (void )ParamValueSize;
53985469 PI_ASSERT (Kernel, PI_INVALID_KERNEL);
53995470 PI_ASSERT (ParamValue, PI_INVALID_VALUE);
54005471
0 commit comments