Skip to content

Commit b290e9f

Browse files
authored
[SYCL][UR] Remove unused MaxAllocSize member variable and fix unused parameter 'Alignment' warning (#11154)
Fixes https://github.com/intel/llvm/actions/runs/6154418223/job/16699759620
1 parent 9dded21 commit b290e9f

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

sycl/plugins/unified_runtime/ur/adapters/hip/device.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ struct ur_device_handle_t_ {
2424
ur_platform_handle_t Platform;
2525
hipCtx_t HIPContext;
2626

27-
size_t MaxAllocSize{0};
28-
2927
public:
3028
ur_device_handle_t_(native_type HipDevice, hipCtx_t Context,
3129
ur_platform_handle_t Platform)

sycl/plugins/unified_runtime/ur/adapters/hip/usm.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMFree(ur_context_handle_t hContext,
9999

100100
ur_result_t USMDeviceAllocImpl(void **ResultPtr, ur_context_handle_t Context,
101101
ur_device_handle_t, ur_usm_device_mem_flags_t *,
102-
size_t Size, uint32_t Alignment) {
102+
size_t Size,
103+
[[maybe_unused]] uint32_t Alignment) {
103104
try {
104105
ScopedContext Active(Context->getDevice());
105106
UR_CHECK_ERROR(hipMalloc(ResultPtr, Size));
@@ -114,7 +115,7 @@ ur_result_t USMDeviceAllocImpl(void **ResultPtr, ur_context_handle_t Context,
114115
ur_result_t USMSharedAllocImpl(void **ResultPtr, ur_context_handle_t Context,
115116
ur_device_handle_t, ur_usm_host_mem_flags_t *,
116117
ur_usm_device_mem_flags_t *, size_t Size,
117-
uint32_t Alignment) {
118+
[[maybe_unused]] uint32_t Alignment) {
118119
try {
119120
ScopedContext Active(Context->getDevice());
120121
UR_CHECK_ERROR(hipMallocManaged(ResultPtr, Size, hipMemAttachGlobal));
@@ -128,7 +129,7 @@ ur_result_t USMSharedAllocImpl(void **ResultPtr, ur_context_handle_t Context,
128129

129130
ur_result_t USMHostAllocImpl(void **ResultPtr, ur_context_handle_t Context,
130131
ur_usm_host_mem_flags_t *, size_t Size,
131-
uint32_t Alignment) {
132+
[[maybe_unused]] uint32_t Alignment) {
132133
try {
133134
ScopedContext Active(Context->getDevice());
134135
UR_CHECK_ERROR(hipHostMalloc(ResultPtr, Size));

0 commit comments

Comments
 (0)