@@ -35,26 +35,33 @@ struct pool_descriptor {
3535
3636static  inline  std::pair<ur_result_t , std::vector<ur_device_handle_t >>
3737urGetSubDevices (ur_device_handle_t  hDevice) {
38-     size_t  nComputeUnits;
38+     uint32_t  nComputeUnits;
3939    auto  ret = urDeviceGetInfo (hDevice, UR_DEVICE_INFO_MAX_COMPUTE_UNITS,
4040                               sizeof (nComputeUnits), &nComputeUnits, nullptr );
4141    if  (ret != UR_RESULT_SUCCESS) {
4242        return  {ret, {}};
4343    }
4444
45-     ur_device_partition_property_t  properties[] = {
46-         UR_DEVICE_PARTITION_EQUALLY,
47-         static_cast <ur_device_partition_property_t >(nComputeUnits), 0 };
45+     //  ur_device_partition_property_t properties[] = {
46+     //      UR_DEVICE_PARTITION_EQUALLY,
47+     //      static_cast<ur_device_partition_property_t>(nComputeUnits), 0};
48+ 
49+     ur_device_partition_equally_desc_t  part_eq_desc{
50+         UR_STRUCTURE_TYPE_DEVICE_PARTITION_EQUALLY_DESC, nullptr ,
51+         nComputeUnits};
52+ 
53+     ur_device_partition_desc_t  part_desc{
54+         UR_STRUCTURE_TYPE_DEVICE_PARTITION_DESC, &part_eq_desc};
4855
4956    //  Get the number of devices that will be created
5057    uint32_t  deviceCount;
51-     ret = urDevicePartition (hDevice, properties , 0 , nullptr , &deviceCount);
58+     ret = urDevicePartition (hDevice, &part_desc , 0 , nullptr , &deviceCount);
5259    if  (ret != UR_RESULT_SUCCESS) {
5360        return  {ret, {}};
5461    }
5562
5663    std::vector<ur_device_handle_t > sub_devices (deviceCount);
57-     ret = urDevicePartition (hDevice, properties ,
64+     ret = urDevicePartition (hDevice, &part_desc ,
5865                            static_cast <uint32_t >(sub_devices.size ()),
5966                            sub_devices.data (), nullptr );
6067    if  (ret != UR_RESULT_SUCCESS) {
@@ -135,7 +142,7 @@ inline bool pool_descriptor::equal(const pool_descriptor &lhs,
135142           (isSharedAllocationReadOnlyOnDevice (lhs) ==
136143            isSharedAllocationReadOnlyOnDevice (rhs)) &&
137144           lhs.poolHandle  == rhs.poolHandle ;
138- }; 
145+ }
139146
140147inline  std::size_t  pool_descriptor::hash (const  pool_descriptor &desc) {
141148    ur_native_handle_t  native;
@@ -147,7 +154,7 @@ inline std::size_t pool_descriptor::hash(const pool_descriptor &desc) {
147154    return  combine_hashes (0 , desc.type , native,
148155                          isSharedAllocationReadOnlyOnDevice (desc),
149156                          desc.poolHandle );
150- }; 
157+ }
151158
152159inline  std::pair<ur_result_t , std::vector<pool_descriptor>>
153160pool_descriptor::create (ur_usm_pool_handle_t  poolHandle,
0 commit comments