Skip to content

Commit 851b957

Browse files
[SYCL][NFC] Fix -Wno-unused-parameter warning in headers (#11318)
1 parent ca7b9bb commit 851b957

File tree

9 files changed

+75
-57
lines changed

9 files changed

+75
-57
lines changed

sycl/include/sycl/accessor.hpp

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1569,6 +1569,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
15691569
: impl(id<AdjustedDim>(), detail::GetZeroDimAccessRange(BufferRef),
15701570
BufferRef.get_range()) {
15711571
(void)PropertyList;
1572+
(void)CodeLoc;
15721573
#else
15731574
: AccessorBaseHost(
15741575
/*Offset=*/{0, 0, 0},
@@ -1609,6 +1610,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
16091610
: impl(id<AdjustedDim>(), detail::GetZeroDimAccessRange(BufferRef),
16101611
BufferRef.get_range()) {
16111612
(void)PropertyList;
1613+
(void)CodeLoc;
16121614
#else
16131615
: AccessorBaseHost(
16141616
/*Offset=*/{0, 0, 0},
@@ -1645,6 +1647,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
16451647
BufferRef.get_range()) {
16461648
(void)CommandGroupHandler;
16471649
(void)PropertyList;
1650+
(void)CodeLoc;
16481651
}
16491652
#else
16501653
: AccessorBaseHost(
@@ -1682,6 +1685,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
16821685
BufferRef.get_range()) {
16831686
(void)CommandGroupHandler;
16841687
(void)PropertyList;
1688+
(void)CodeLoc;
16851689
}
16861690
#else
16871691
: AccessorBaseHost(
@@ -1715,6 +1719,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
17151719
#ifdef __SYCL_DEVICE_ONLY__
17161720
: impl(id<Dimensions>(), BufferRef.get_range(), BufferRef.get_range()) {
17171721
(void)PropertyList;
1722+
(void)CodeLoc;
17181723
}
17191724
#else
17201725
: AccessorBaseHost(
@@ -1751,6 +1756,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
17511756
#ifdef __SYCL_DEVICE_ONLY__
17521757
: impl(id<Dimensions>(), BufferRef.get_range(), BufferRef.get_range()) {
17531758
(void)PropertyList;
1759+
(void)CodeLoc;
17541760
}
17551761
#else
17561762
: AccessorBaseHost(
@@ -1815,6 +1821,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
18151821
: impl(id<AdjustedDim>(), BufferRef.get_range(), BufferRef.get_range()) {
18161822
(void)CommandGroupHandler;
18171823
(void)PropertyList;
1824+
(void)CodeLoc;
18181825
}
18191826
#else
18201827
: AccessorBaseHost(
@@ -1850,6 +1857,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
18501857
: impl(id<AdjustedDim>(), BufferRef.get_range(), BufferRef.get_range()) {
18511858
(void)CommandGroupHandler;
18521859
(void)PropertyList;
1860+
(void)CodeLoc;
18531861
}
18541862
#else
18551863
: AccessorBaseHost(
@@ -2026,6 +2034,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
20262034
#ifdef __SYCL_DEVICE_ONLY__
20272035
: impl(AccessOffset, AccessRange, BufferRef.get_range()) {
20282036
(void)PropertyList;
2037+
(void)CodeLoc;
20292038
}
20302039
#else
20312040
: AccessorBaseHost(detail::convertToArrayOfN<3, 0>(AccessOffset),
@@ -2069,6 +2078,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
20692078
#ifdef __SYCL_DEVICE_ONLY__
20702079
: impl(AccessOffset, AccessRange, BufferRef.get_range()) {
20712080
(void)PropertyList;
2081+
(void)CodeLoc;
20722082
}
20732083
#else
20742084
: AccessorBaseHost(detail::convertToArrayOfN<3, 0>(AccessOffset),
@@ -2141,6 +2151,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
21412151
: impl(AccessOffset, AccessRange, BufferRef.get_range()) {
21422152
(void)CommandGroupHandler;
21432153
(void)PropertyList;
2154+
(void)CodeLoc;
21442155
}
21452156
#else
21462157
: AccessorBaseHost(detail::convertToArrayOfN<3, 0>(AccessOffset),
@@ -2184,6 +2195,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
21842195
: impl(AccessOffset, AccessRange, BufferRef.get_range()) {
21852196
(void)CommandGroupHandler;
21862197
(void)PropertyList;
2198+
(void)CodeLoc;
21872199
}
21882200
#else
21892201
: AccessorBaseHost(detail::convertToArrayOfN<3, 0>(AccessOffset),
@@ -2260,6 +2272,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
22602272
static_assert(
22612273
PropertyListT::template areSameCompileTimeProperties<NewPropsT...>(),
22622274
"Compile-time-constant properties must be the same");
2275+
(void)CodeLoc;
22632276
#ifndef __SYCL_DEVICE_ONLY__
22642277
detail::constructorNotification(getMemoryObject(), impl.get(), AccessTarget,
22652278
AccessMode, CodeLoc);
@@ -2849,7 +2862,9 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
28492862
local_accessor_base(handler &, const detail::code_location CodeLoc =
28502863
detail::code_location::current())
28512864
#ifdef __SYCL_DEVICE_ONLY__
2852-
: impl(range<AdjustedDim>{1}){}
2865+
: impl(range<AdjustedDim>{1}) {
2866+
(void)CodeLoc;
2867+
}
28532868
#else
28542869
: LocalAccessorBaseHost(range<3>{1, 1, 1}, AdjustedDim, sizeof(DataT)) {
28552870
detail::constructorNotification(nullptr, LocalAccessorBaseHost::impl.get(),
@@ -2865,6 +2880,7 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
28652880
#ifdef __SYCL_DEVICE_ONLY__
28662881
: impl(range<AdjustedDim>{1}) {
28672882
(void)propList;
2883+
(void)CodeLoc;
28682884
}
28692885
#else
28702886
: LocalAccessorBaseHost(range<3>{1, 1, 1}, AdjustedDim, sizeof(DataT),
@@ -2880,7 +2896,9 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
28802896
range<Dimensions> AllocationSize, handler &,
28812897
const detail::code_location CodeLoc = detail::code_location::current())
28822898
#ifdef __SYCL_DEVICE_ONLY__
2883-
: impl(AllocationSize){}
2899+
: impl(AllocationSize) {
2900+
(void)CodeLoc;
2901+
}
28842902
#else
28852903
: LocalAccessorBaseHost(detail::convertToArrayOfN<3, 1>(AllocationSize),
28862904
AdjustedDim, sizeof(DataT)) {
@@ -2899,6 +2917,7 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
28992917
#ifdef __SYCL_DEVICE_ONLY__
29002918
: impl(AllocationSize) {
29012919
(void)propList;
2920+
(void)CodeLoc;
29022921
}
29032922
#else
29042923
: LocalAccessorBaseHost(detail::convertToArrayOfN<3, 1>(AllocationSize),
@@ -3574,6 +3593,7 @@ class __SYCL_EBO host_accessor
35743593
AccessorT::MAccData = other.MAccData;
35753594
#else
35763595
{
3596+
(void)other;
35773597
#endif // __SYCL_DEVICE_ONLY__
35783598
}
35793599

@@ -3589,6 +3609,7 @@ class __SYCL_EBO host_accessor
35893609
AccessorT::MAccData = other.MAccData;
35903610
#else
35913611
{
3612+
(void)other;
35923613
#endif // __SYCL_DEVICE_ONLY__
35933614
}
35943615

@@ -3685,7 +3706,12 @@ class __SYCL_EBO unsampled_image_accessor :
36853706
handler &CommandGroupHandlerRef, const property_list &PropList = {},
36863707
const detail::code_location CodeLoc = detail::code_location::current())
36873708
#ifdef __SYCL_DEVICE_ONLY__
3688-
{}
3709+
{
3710+
(void)ImageRef;
3711+
(void)CommandGroupHandlerRef;
3712+
(void)PropList;
3713+
(void)CodeLoc;
3714+
}
36893715
#else
36903716
: host_base_class(detail::convertToArrayOfN<3, 1>(ImageRef.get_range()),
36913717
AccessMode, detail::getSyclObjImpl(ImageRef).get(),
@@ -3951,7 +3977,12 @@ class __SYCL_EBO sampled_image_accessor :
39513977
handler &CommandGroupHandlerRef, const property_list &PropList = {},
39523978
const detail::code_location CodeLoc = detail::code_location::current())
39533979
#ifdef __SYCL_DEVICE_ONLY__
3954-
{}
3980+
{
3981+
(void)ImageRef;
3982+
(void)CommandGroupHandlerRef;
3983+
(void)PropList;
3984+
(void)CodeLoc;
3985+
}
39553986
#else
39563987
: host_base_class(detail::convertToArrayOfN<3, 1>(ImageRef.get_range()),
39573988
detail::getSyclObjImpl(ImageRef).get(), Dimensions,

sycl/include/sycl/detail/kernel_desc.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ template <class KernelNameType> struct KernelInfo {
9292
#else
9393
template <char...> struct KernelInfoData {
9494
static constexpr unsigned getNumParams() { return 0; }
95-
static const kernel_param_desc_t &getParamDesc(int Idx) {
95+
static const kernel_param_desc_t &getParamDesc(int) {
9696
static kernel_param_desc_t Dummy;
9797
return Dummy;
9898
}

sycl/include/sycl/detail/spirv.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,7 @@ ControlBarrier(Group g, memory_scope FenceScope, memory_order Order) {
10281028
#if defined(__NVPTX__)
10291029
__nvvm_bar_warp_sync(detail::ExtractMask(detail::GetMask(g))[0]);
10301030
#else
1031+
(void)g;
10311032
// SPIR-V does not define an instruction to synchronize partial groups.
10321033
// However, most (possibly all?) of the current SPIR-V targets execute
10331034
// work-items in lockstep, so we can probably get away with a MemoryBarrier.
@@ -1057,7 +1058,7 @@ struct is_tangle_or_opportunistic_group<
10571058
template <__spv::GroupOperation Op, typename Group, typename T> \
10581059
inline typename std::enable_if_t< \
10591060
ext::oneapi::experimental::is_fixed_topology_group_v<Group>, T> \
1060-
Group##Instruction(Group G, T x) { \
1061+
Group##Instruction(Group, T x) { \
10611062
using ConvertedT = detail::ConvertToOpenCLType_t<T>; \
10621063
\
10631064
using OCLT = std::conditional_t< \

sycl/include/sycl/ext/intel/experimental/pipes.hpp

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class pipe : public pipe_base {
134134
// Reading from pipe is lowered to SPIR-V instruction OpReadPipe via SPIR-V
135135
// friendly LLVM IR.
136136
template <typename _functionPropertiesT>
137-
static _dataT read(bool &Success, _functionPropertiesT Properties) {
137+
static _dataT read(bool &Success, _functionPropertiesT) {
138138
#ifdef __SYCL_DEVICE_ONLY__
139139
// Get latency control properties
140140
using _latency_anchor_id_prop = typename detail::GetOrDefaultValT<
@@ -169,7 +169,6 @@ class pipe : public pipe_base {
169169
return TempData;
170170
#else
171171
(void)Success;
172-
(void)Properties;
173172
throw sycl::exception(
174173
sycl::make_error_code(sycl::errc::feature_not_supported),
175174
"Device-side API are not supported on a host device. Please use "
@@ -184,8 +183,7 @@ class pipe : public pipe_base {
184183
// Writing to pipe is lowered to SPIR-V instruction OpWritePipe via SPIR-V
185184
// friendly LLVM IR.
186185
template <typename _functionPropertiesT>
187-
static void write(const _dataT &Data, bool &Success,
188-
_functionPropertiesT Properties) {
186+
static void write(const _dataT &Data, bool &Success, _functionPropertiesT) {
189187
#ifdef __SYCL_DEVICE_ONLY__
190188
// Get latency control properties
191189
using _latency_anchor_id_prop = typename detail::GetOrDefaultValT<
@@ -219,7 +217,6 @@ class pipe : public pipe_base {
219217
#else
220218
(void)Success;
221219
(void)Data;
222-
(void)Properties;
223220
throw sycl::exception(
224221
sycl::make_error_code(sycl::errc::feature_not_supported),
225222
"Device-side API are not supported on a host device. Please use "
@@ -282,7 +279,7 @@ class pipe : public pipe_base {
282279
// Reading from pipe is lowered to SPIR-V instruction OpReadPipe via SPIR-V
283280
// friendly LLVM IR.
284281
template <typename _functionPropertiesT>
285-
static _dataT read(_functionPropertiesT Properties) {
282+
static _dataT read(_functionPropertiesT) {
286283
#ifdef __SYCL_DEVICE_ONLY__
287284
// Get latency control properties
288285
using _latency_anchor_id_prop = typename detail::GetOrDefaultValT<
@@ -316,7 +313,6 @@ class pipe : public pipe_base {
316313
_relative_cycle);
317314
return TempData;
318315
#else
319-
(void)Properties;
320316
throw sycl::exception(
321317
sycl::make_error_code(sycl::errc::feature_not_supported),
322318
"Device-side API are not supported on a host device. Please use "
@@ -329,7 +325,7 @@ class pipe : public pipe_base {
329325
// Writing to pipe is lowered to SPIR-V instruction OpWritePipe via SPIR-V
330326
// friendly LLVM IR.
331327
template <typename _functionPropertiesT>
332-
static void write(const _dataT &Data, _functionPropertiesT Properties) {
328+
static void write(const _dataT &Data, _functionPropertiesT) {
333329
#ifdef __SYCL_DEVICE_ONLY__
334330
// Get latency control properties
335331
using _latency_anchor_id_prop = typename detail::GetOrDefaultValT<
@@ -362,7 +358,6 @@ class pipe : public pipe_base {
362358
_relative_cycle);
363359
#else
364360
(void)Data;
365-
(void)Properties;
366361
throw sycl::exception(
367362
sycl::make_error_code(sycl::errc::feature_not_supported),
368363
"Device-side API are not supported on a host device. Please use "
@@ -412,40 +407,36 @@ class pipe : public pipe_base {
412407
// FPGA BE will recognize this function and extract its arguments.
413408
// TODO: Pass latency control parameters via the __spirv_* builtin when ready.
414409
template <typename _T>
415-
static int32_t
416-
__latency_control_nb_read_wrapper(__ocl_RPipeTy<_T> Pipe, _T *Data,
417-
int32_t AnchorID, int32_t TargetAnchor,
418-
int32_t Type, int32_t Cycle) {
410+
static int32_t __latency_control_nb_read_wrapper(
411+
__ocl_RPipeTy<_T> Pipe, _T *Data, int32_t /* AnchorID */,
412+
int32_t /* TargetAnchor */, int32_t /* Type */, int32_t /* Cycle */) {
419413
return __spirv_ReadPipe(Pipe, Data, m_Size, m_Alignment);
420414
}
421415

422416
// FPGA BE will recognize this function and extract its arguments.
423417
// TODO: Pass latency control parameters via the __spirv_* builtin when ready.
424418
template <typename _T>
425-
static int32_t
426-
__latency_control_nb_write_wrapper(__ocl_WPipeTy<_T> Pipe, const _T *Data,
427-
int32_t AnchorID, int32_t TargetAnchor,
428-
int32_t Type, int32_t Cycle) {
419+
static int32_t __latency_control_nb_write_wrapper(
420+
__ocl_WPipeTy<_T> Pipe, const _T *Data, int32_t /* AnchorID */,
421+
int32_t /* TargetAnchor */, int32_t /* Type */, int32_t /* Cycle */) {
429422
return __spirv_WritePipe(Pipe, Data, m_Size, m_Alignment);
430423
}
431424

432425
// FPGA BE will recognize this function and extract its arguments.
433426
// TODO: Pass latency control parameters via the __spirv_* builtin when ready.
434427
template <typename _T>
435-
static void __latency_control_bl_read_wrapper(__ocl_RPipeTy<_T> Pipe,
436-
_T *Data, int32_t AnchorID,
437-
int32_t TargetAnchor,
438-
int32_t Type, int32_t Cycle) {
428+
static void __latency_control_bl_read_wrapper(
429+
__ocl_RPipeTy<_T> Pipe, _T *Data, int32_t /* AnchorID */,
430+
int32_t /* TargetAnchor */, int32_t /* Type */, int32_t /* Cycle */) {
439431
return __spirv_ReadPipeBlockingINTEL(Pipe, Data, m_Size, m_Alignment);
440432
}
441433

442434
// FPGA BE will recognize this function and extract its arguments.
443435
// TODO: Pass latency control parameters via the __spirv_* builtin when ready.
444436
template <typename _T>
445-
static void
446-
__latency_control_bl_write_wrapper(__ocl_WPipeTy<_T> Pipe, const _T *Data,
447-
int32_t AnchorID, int32_t TargetAnchor,
448-
int32_t Type, int32_t Cycle) {
437+
static void __latency_control_bl_write_wrapper(
438+
__ocl_WPipeTy<_T> Pipe, const _T *Data, int32_t /* AnchorID*/,
439+
int32_t /* TargetAnchor */, int32_t /* Type */, int32_t /* Cycle */) {
449440
return __spirv_WritePipeBlockingINTEL(Pipe, Data, m_Size, m_Alignment);
450441
}
451442
#endif // __SYCL_DEVICE_ONLY__

sycl/include/sycl/ext/oneapi/matrix/matrix-intel.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,15 +489,14 @@ template <
489489
Use == sycl::ext::oneapi::experimental::matrix::use::b,
490490
bool> = true>
491491
inline __SYCL_ALWAYS_INLINE void
492-
joint_matrix_store(Group sg,
492+
joint_matrix_store(Group,
493493
sycl::ext::oneapi::experimental::matrix::joint_matrix<
494494
Group, Tp, Use, NumRows, NumCols, Layout> &src,
495495
multi_ptr<T, Space, IsDecorated> dst, size_t stride) {
496496
#if defined(__SYCL_DEVICE_ONLY__)
497497
static_assert(Space != access::address_space::private_space,
498498
"Joint Matrix doesn't support store to private memory!");
499499
#if defined(__NVPTX__)
500-
std::ignore = sg;
501500
std::ignore = src;
502501
std::ignore = dst;
503502
std::ignore = stride;
@@ -520,7 +519,6 @@ joint_matrix_store(Group sg,
520519
sycl::ext::oneapi::experimental::matrix::spv_scope_traits<Group>::value);
521520
#endif // defined(__NVPTX__)
522521
#else
523-
std::ignore = sg;
524522
std::ignore = src;
525523
std::ignore = dst;
526524
std::ignore = stride;

0 commit comments

Comments
 (0)