Skip to content

Commit 2357fbc

Browse files
author
Hugh Delaney
committed
Fix build for AMD
1 parent 8ba2a9a commit 2357fbc

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

source/adapters/hip/memory.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,19 +297,16 @@ urMemGetNativeHandle(ur_mem_handle_t hMem, ur_device_handle_t Device,
297297
}
298298
}
299299
*phNativeMem = reinterpret_cast<ur_native_handle_t>(
300-
std::get<BufferMem>(hMem->Mem).getPtr(hDevice));
300+
std::get<BufferMem>(hMem->Mem).getPtr(Device));
301301
#elif defined(__HIP_PLATFORM_AMD__)
302302
*phNativeMem = reinterpret_cast<ur_native_handle_t>(
303-
std::get<BufferMem>(hMem->Mem).getPtr(hDevice));
303+
std::get<BufferMem>(hMem->Mem).getPtr(Device));
304304
#else
305305
#error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
306306
#endif
307307
return UR_RESULT_SUCCESS;
308308
}
309309

310-
return UR_RESULT_ERROR_UNSUPPORTED_FEATURE;
311-
}
312-
313310
UR_APIEXPORT ur_result_t UR_APICALL urMemBufferCreateWithNativeHandle(
314311
ur_native_handle_t, ur_context_handle_t, const ur_mem_native_properties_t *,
315312
ur_mem_handle_t *) {

0 commit comments

Comments
 (0)