3 Replies Latest reply on Jun 8, 2011 10:34 PM by Pennycook

    Device Fission - CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT

    Pennycook
      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[i]) { 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[i]) { 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);