SWDEV-407358 - Address MIGraphx -Werror issue with unsafe buffer access

Change-Id: If4189dfbf12b670af60782f09ff8cf9b9867c299
This commit is contained in:
Satyanvesh Dittakavi
2023-08-30 13:16:38 +00:00
کامیت شده توسط Maneesh Gupta
والد fe2d747bcc
کامیت 16fb3ca923
2فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
@@ -236,7 +236,7 @@ class thread_block : public thread_group {
const bool pow2 = ((tile_size & (tile_size - 1)) == 0);
// Invalid tile size, assert
if (!tile_size || (tile_size > __AMDGCN_WAVEFRONT_SIZE) || !pow2) {
__hip_assert(false && "invalid tile size");
__hip_assert(false && "invalid tile size")
}
thread_group tiledGroup = thread_group(internal::cg_tiled_group, tile_size);
@@ -291,7 +291,7 @@ class tiled_group : public thread_group {
const bool pow2 = ((tile_size & (tile_size - 1)) == 0);
if (!tile_size || (tile_size > __AMDGCN_WAVEFRONT_SIZE) || !pow2) {
__hip_assert(false && "invalid tile size");
__hip_assert(false && "invalid tile size")
}
if (size() <= tile_size) {
@@ -515,7 +515,7 @@ __CG_QUALIFIER__ uint32_t thread_group::thread_rank() const {
return (static_cast<const coalesced_group*>(this)->thread_rank());
}
default: {
__hip_assert(false && "invalid cooperative group type");
__hip_assert(false && "invalid cooperative group type")
return -1;
}
}
@@ -543,7 +543,7 @@ __CG_QUALIFIER__ bool thread_group::is_valid() const {
return (static_cast<const coalesced_group*>(this)->is_valid());
}
default: {
__hip_assert(false && "invalid cooperative group type");
__hip_assert(false && "invalid cooperative group type")
return false;
}
}
@@ -576,7 +576,7 @@ __CG_QUALIFIER__ void thread_group::sync() const {
break;
}
default: {
__hip_assert(false && "invalid cooperative group type");
__hip_assert(false && "invalid cooperative group type")
}
}
}
@@ -31,6 +31,7 @@ THE SOFTWARE.
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wc++98-compat"
#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
#pragma clang diagnostic ignored "-Wunsafe-buffer-usage"
#endif
__device__ static inline unsigned __hip_ds_bpermute(int index, unsigned src) {