cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Pennycook
Journeyman III

Device Fission - CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT

Bug, or not implemented yet?

So I'm trying to use the device fission extension, but I'm running into a few problems.

When I query using clGetDeviceInfo for CL_DEVICE_PARTITION_TYPES_EXT, all of the different partition types are listed (including CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT).  However, if I try and query CL_DEVICE_AFFINITY_DOMAINS_EXT instead, I get an invalid value error; if I try and fission the device using an affinity domain, then it fails also.

Is there a bug in my code/APP, or is this feature not yet implemented?

The code I'm using to query the extension is attached.

int i; size_t nbytes; cl_device_partition_property_ext* properties; /** * Query how the device can be fissioned. */ printf(" Available values for CL_DEVICE_PARTITION_TYPES_EXT:\n"); status = clGetDeviceInfo(device, CL_DEVICE_PARTITION_TYPES_EXT, 0, NULL, &nbytes); properties = (cl_device_partition_property_ext*) malloc(nbytes * sizeof(char)); status = clGetDeviceInfo(device, CL_DEVICE_PARTITION_TYPES_EXT, nbytes, properties, NULL); for (i = 0; i < nbytes/sizeof(cl_device_partition_property_ext); i++) { switch(properties) { case CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT: printf("\tCL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT\n"); break; case CL_DEVICE_PARTITION_BY_COUNTS_EXT: printf("\tCL_DEVICE_PARTITION_BY_COUNTS_EXT\n"); break; case CL_DEVICE_PARTITION_BY_NAMES_EXT: printf("\tCL_DEVICE_PARTITION_BY_NAMES_EXT\n"); break; case CL_DEVICE_PARTITION_EQUALLY_EXT: printf("\tCL_DEVICE_PARTITION_EQUALLY_EXT\n"); break; } } printf("\n"); free(properties); printf(" Available values for CL_DEVICE_AFFINITY_DOMAINS_EXT:\n"); status = clGetDeviceInfo(device, CL_DEVICE_AFFINITY_DOMAINS_EXT, 0, NULL, &nbytes); properties = (cl_device_partition_property_ext*) malloc(nbytes * sizeof(char)); status = clGetDeviceInfo(device, CL_DEVICE_AFFINITY_DOMAINS_EXT, nbytes, properties, NULL); for (i = 0; i < nbytes/sizeof(cl_device_partition_property_ext); i++) { switch(properties) { case CL_AFFINITY_DOMAIN_L1_CACHE_EXT: printf("\tCL_AFFINITY_DOMAIN_L1_CACHE_EXT\n"); break; case CL_AFFINITY_DOMAIN_L2_CACHE_EXT: printf("\tCL_AFFINITY_DOMAIN_L2_CACHE_EXT\n"); break; case CL_AFFINITY_DOMAIN_L3_CACHE_EXT: printf("\tCL_AFFINITY_DOMAIN_L3_CACHE_EXT\n"); break; case CL_AFFINITY_DOMAIN_L4_CACHE_EXT: printf("\tCL_AFFINITY_DOMAIN_L4_CACHE_EXT\n"); break; case CL_AFFINITY_DOMAIN_NUMA_EXT: printf("\tCL_AFFINITY_DOMAIN_NUMA_EXT\n"); break; } } printf("\n"); free(properties);

0 Likes
3 Replies
himanshu_gautam
Grandmaster

Hi pennycock,

Are you using CPU as the device for device fission as this extension is currently only supported for CPUs.

Please provide your system config: CPU,GPU,SDK,Catalyst,OS.

It would ne nice to give a working testcase if you think there is a bug. This way it can be reported quickly and fixed soon.

Thanks

0 Likes

Himanshu,

Yes, I'm using a CPU as the device.  As I said in my first post, querying which partition types are available returns a list of all four types.  Further, I'm able to partition the device  using CL_DEVICE_PARTITION_EQUALLY_EXT without any problems.

It's an Intel Core 2 Duo (T5750).  I know Intel CPUs are not officially supported, but I don't see any reason why it wouldn't work.

 

0 Likes

Any ideas, guys?

0 Likes