@@ -33,17 +33,17 @@ struct ur_device_handle_t_ {
3333 ur_device_handle_t_ (native_type HipDevice, hipCtx_t Context,
3434 ur_platform_handle_t Platform, uint32_t DeviceIndex)
3535 : HIPDevice(HipDevice), RefCount{1 }, Platform(Platform),
36- HIPContext (Context), DeviceIndex(DeviceIndex) {}
37-
38- ~ur_device_handle_t_ () noexcept (false ) {
39- UR_CHECK_ERROR (hipDevicePrimaryCtxRelease (HIPDevice));
36+ HIPContext (Context), DeviceIndex(DeviceIndex) {
4037
4138 UR_CHECK_ERROR (hipDeviceGetAttribute (
4239 &DeviceMaxLocalMem, hipDeviceAttributeMaxSharedMemoryPerBlock,
4340 HIPDevice));
4441 UR_CHECK_ERROR (hipDeviceGetAttribute (
45- &ManagedMemSupport, hipDeviceAttributeManagedMemory,
46- HIPDevice));
42+ &ManagedMemSupport, hipDeviceAttributeManagedMemory, HIPDevice));
43+ }
44+
45+ ~ur_device_handle_t_ () noexcept (false ) {
46+ UR_CHECK_ERROR (hipDevicePrimaryCtxRelease (HIPDevice));
4747 }
4848
4949 native_type get () const noexcept { return HIPDevice; };
@@ -60,7 +60,7 @@ struct ur_device_handle_t_ {
6060
6161 int getDeviceMaxLocalMem () const noexcept { return DeviceMaxLocalMem; };
6262
63- bool getManagedMemSupport () const noexcept { return ManagedMemSupport; };
63+ int getManagedMemSupport () const noexcept { return ManagedMemSupport; };
6464};
6565
6666int getAttribute (ur_device_handle_t Device, hipDeviceAttribute_t Attribute);
0 commit comments