Thanks for the promt answer,
I'm trying to do that on AMD and Intel processors i.e. to create subdevices with clCreateSubDevices
but failed to get any result so far. I've got either CL_DEVICE_PARTITION_FAILED error or
partition succeed on a 8 core device but only 1 subdevice is created and context creation fails
with that subdevice with error...
Is there any restriction on which multi-core CPU-s can be partitioned and which ones not ?
The relevant part of my code is:
/* Now creating a subdevice */
cl_uint sub_device_nums;
cl_device_partition_property partition_props[3] = { CL_DEVICE_PARTITION_EQUALLY, compute_units, 0};
err = clCreateSubDevices(device_ids[0], (cl_device_partition_property *) partition_props, (cl_uint) 8, sub_device_ids, &sub_device_nums);
printf("clCreateSubDevices: %d\n", err);
switch (err) {
case CL_INVALID_DEVICE: printf("a\n"); break;;
case CL_INVALID_VALUE: printf ("b\n"); break;;
case CL_DEVICE_PARTITION_FAILED: printf("c\n"); break;;
case CL_INVALID_DEVICE_PARTITION_COUNT: printf ("d\n"); break;;
case CL_OUT_OF_RESOURCES: printf("e\n"); break;;
case CL_OUT_OF_HOST_MEMORY: printf("f\n"); break;;
default: printf("x\n"); break;;
}
printf("Number of subdevices :%d\n", sub_device_nums);
/* Creating the context */
cl_context_properties ctxProps[3] = {CL_CONTEXT_PLATFORM, (cl_context_properties) platforms, 0};
myContext = clCreateContext(ctxProps, 1, sub_device_ids, NULL, NULL, &err);
printf("clCreateContext err: %d\n", err);
thanks again for any answer,
Gergely