Access cl_kernel_preferred_work_group_size_multiple

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Access cl_kernel_preferred_work_group_size_multiple

ArToX
Hello everyone,

I was wondering how to access the cl_kernel_preferred_work_group_size_multiple value through jocl.
That thread: http://forum.jogamp.org/How-to-get-quot-CL-KERNEL-PREFERRED-WORK-GROUP-SIZE-MULTIPLE-quot-td4033302.html provide a good reading of the source, except that getWorkGroupInfo() method is private and therefore not available for that purpose.
And of course there's no such a get_preferred_work_group_multiple() method.

Any reason to this? Any idea to bypass/fix this limitation?

Thanks and best regards.
Reply | Threaded
Open this post in threaded view
|

Re: Access cl_kernel_preferred_work_group_size_multiple

Wade Walker
Administrator
You're right, it looks like we're missing a method here. I'll put in a fix. I've created a bug report at https://jogamp.org/bugzilla/show_bug.cgi?id=1302, so please add yourself to the CC list if you want to be notified.

It looks like the only short-term workaround would be for you to compile JOCL yourself (or to just plug a constant value in there for now, or use Java reflection to get around the restriction against calling private methods). But this is an easy fix, I should be able to knock it out this weekend. I might have to send you the new files directly though, it seems like our central build system is offline for some reason.
Reply | Threaded
Open this post in threaded view
|

Re: Access cl_kernel_preferred_work_group_size_multiple

ArToX
Thanks Wade for the quick reply.

Have you any idea why that method (getWorkGroupInfo()) has been protected/set to private?

Reply | Threaded
Open this post in threaded view
|

Re: Access cl_kernel_preferred_work_group_size_multiple

gouessej
Administrator
In reply to this post by Wade Walker
We plan to release a maintenance version except if Sven has any objection, I'd like to see your fix in it.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Access cl_kernel_preferred_work_group_size_multiple

ArToX
Hi Julien,

I'm not sure to have the skills to correct properly that piece of code respecting jogamp coding rules/style.

Regards,
Reply | Threaded
Open this post in threaded view
|

Re: Access cl_kernel_preferred_work_group_size_multiple

Wade Walker
Administrator
I can put in the fix, it should be straightforward. Probably the reason that getWorkGroupInfo() was private is because calling the underlying clGetWorkGroupInfo() function requires some argument marshaling that's a little ugly and error-prone. I'll look into making it public though, just for future-proofing.
Reply | Threaded
Open this post in threaded view
|

Re: Access cl_kernel_preferred_work_group_size_multiple

Wade Walker
Administrator
The fix is done and checked in at https://github.com/WadeWalker/jocl/commit/7a26673570fd77839672d472b04dbd509395de5b. I'll push to the official repos once I do a little more testing. I'll send an unofficial build to the bug reporter to tide him over until the next official release comes out.
Reply | Threaded
Open this post in threaded view
|

Re: Access cl_kernel_preferred_work_group_size_multiple

ArToX
Thanks a lot Wade,

For fixing that issue so quickly.

Have a nice day.