On Sun, 2013-05-19 at 11:27 +0300, Pekka Jääskeläinen wrote: > On 05/18/2013 11:36 PM, O. Hartmann wrote: > > There is an opensource project called "ocl-icd" which I'm aware of, but > > it doesn't "configure" on FreeBSD (I guess too many Linuxism) or I'm to > > dull to get it right. The autotools fail with some weird missing macro > > definitions. > > If ocl-icd doesn't work for you, you could try the Khronos ICD loader with > a patch from pocl applied. Instructions here: > > http://pocl.sourceforge.net/docs/html/development.html#khronos-icd-loader > > For your problem: When looking at the code there's only one spot > where clGetPlatformIDs() can return an error: > > POname(clGetPlatformIDs)(cl_uint num_entries, > cl_platform_id * platforms, > cl_uint * num_platforms) CL_API_SUFFIX__VERSION_1_0 > { > int const num = 1; > int i; > > if (platforms != NULL) { > if (num_entries < num) > return CL_INVALID_VALUE; > > for (i=0; i<num; ++i) > platforms[i] = &_platforms[i]; > } > > if (num_platforms != NULL) > *num_platforms = num; > > return CL_SUCCESS; > } > > That is, if the num_entries is less than 1 and platforms != NULL. > > In your case platforms is NULL so it should not be possible > to return an error. Perhaps you could step through the program > with gdb and see where it ends up. Does it even get to the pocl > implementation of the function? > > BR,
Well, my bad (again).
I called first
err = clGetDeviceIDs(platforms[i], CL_DEVICE_TYPE_ALL, MAX_DEVICES,
NULL, &ndevices);
to get the number of devices providing the NULL pointer to the
cl_device_id object. This doesn't work obviously the way I thought.
Correcting the mistake reveals indeed something awsome on FreeBSD:
Found 1 (out of 128) platforms.
Printing the platform informations for platform ID = 0
Platform 0 name: Portable Computing Language
Platform 0 supports extensions:
Platform 0 vendor: The pocl project
Platform 0 version: OpenCL 1.2 pocl 0.8
Platform 0 profile: FULL_PROFILE
-> Search for max 32 Devices on Platform 0.
-> Device 0.0 name: pthread
-> Device 0.0 vendor: unknown
-> Device 0.0 extensions:
-> Device 0.0 global memory size: 8175 MiB
-> Device 0.0 address bits: 64
-> Device 0.0 is available: 1
-> Device 0.0 compiler available: 1
I think this has the meaning that even FreeBSd is capable of having
OpenCL. Thanks!
Regards,
Oliver
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d
_______________________________________________ pocl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pocl-devel
