Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 5 Jul 2012 16:16:05 +0200
From: Lukas Odzioba <lukas.odzioba@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: common find_best_workgroup()

2012/7/5 magnum <john.magnum@...hmail.com>:
> Lukas,
>
> In the current common-opencl.c code, you never actually set
> local_work_size = my_work_group within the find_best loop. It's 1 all
> the time so the end result is totally random. I am about to change this.
> Or am I confused?
Current state is:

void opencl_find_best_workgroup(struct fmt_main *pFmt)
{
(...)
	size_t my_work_group, optimal_work_group = 1;
(..)
	/// Find minimum time
	for (my_work_group = wg_multiple;
	    (int) my_work_group <= (int) max_group_size;
	    my_work_group += wg_multiple) {
	(...)
		if ((endTime - startTime) < kernelExecTimeNs) {
			kernelExecTimeNs = endTime - startTime;
			optimal_work_group = my_work_group;
		}
(...)
	local_work_size = optimal_work_group;
(...)
}

It looks ok for me. Am I right? Possibly we should drop
optimal_work_group variable and always set local_work_size.
If you agree, I'll fix that.
This functions is not perfect, for example we should introduce
local_work_size for each device (we're not using more than two dev's
per run but this should change in the near future - it is already in
sayantan's code but he created his own "habitat" in code).

Lukas

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.