@@ -33,17 +33,17 @@ struct ur_device_handle_t_ {
33
33
ur_device_handle_t_ (native_type HipDevice, hipCtx_t Context,
34
34
ur_platform_handle_t Platform, uint32_t DeviceIndex)
35
35
: 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) {
40
37
41
38
UR_CHECK_ERROR (hipDeviceGetAttribute (
42
39
&DeviceMaxLocalMem, hipDeviceAttributeMaxSharedMemoryPerBlock,
43
40
HIPDevice));
44
41
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));
47
47
}
48
48
49
49
native_type get () const noexcept { return HIPDevice; };
@@ -60,7 +60,7 @@ struct ur_device_handle_t_ {
60
60
61
61
int getDeviceMaxLocalMem () const noexcept { return DeviceMaxLocalMem; };
62
62
63
- bool getManagedMemSupport () const noexcept { return ManagedMemSupport; };
63
+ int getManagedMemSupport () const noexcept { return ManagedMemSupport; };
64
64
};
65
65
66
66
int getAttribute (ur_device_handle_t Device, hipDeviceAttribute_t Attribute);
0 commit comments