Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABob6iqamN-XpLeK7pWmrnmxfX1JNG8Qo1JEEFMq8UNfNtxKTw@mail.gmail.com>
Date: Sun, 13 Jan 2013 02:48:43 +0100
From: Lukas Odzioba <lukas.odzioba@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Changes to common-opencl.c

2013/1/13 Claudio André <claudioandre.br@...il.com>:
> Hi, in order to allow multi-gpu setups:
First of all thank you for doing this,I tried to start that, but other
less nicer things than john development prevented me from that.

> I would like to change the behavior of common opencl functions. The new
> configuration will allow Sayantan to use common-opencl functions (only
> functions dealing directly with multi-gpu running management is not going to
> be shared).

In my opinion we should have some kind of "framework" that can handle
multigpu support itself. Some time ago I tried to move function
finding "best" GWS/LWS to common-opencl but it didn't ended well and
now we still have bad situation where almost each format have a lot of
copy pasted code for doing that. When it comes to multigpu there will
be more copy pasting and this is not a good thing. Ideally we should
be able to run code with different in speed gpus and have almost no
speed regression (I mean that sum of speeds from testing gpus
separately should be  equal multigpu mode).
This is not easy at all especially in one thread, but less problematic
than the same thing in cuda.
Maybe it will require some changes in fmt_ interface, or could be done
by some "task manager" working inside crypt() function to divide data
and gather results from gpus.

> I will create a new function.
> - start_opencl_devices()
> Called once by john 'core'
> It does the same dev_init do, but keeps information for all OpenCL devices
> (not only for the platform selected, as we do now).
> It will return the correct (sequential) ocl_gpu_id (e.g. Bull's cpu is 2:
> third device). So, legacy code still works as expected.

Easy legacy code support is awesome.

> When finished:
> - platform[all], devices[all], context[for each device], queue[for each
> device] are going to be initialized by john 'core' and keep this way for
> ever.
> - Each plataform inside platform[MAX_PLATFORMS] will have its (all) devices
> in devices[MAXGPUS];
> - e.g. Bull: plataform[0] = NVIDIA (num_devices=1), plataform[1] = AMD
> (num_devices=2) => total of devices in devices[MAXGPUS] equal 3.
> - e.g. Bull: devices[0] = GTX 570, devices[1] = Radeon 7970, devices[2] =
> CPU
> - So, if i have -pla:1 -de:0 i can compute that devices[ocl_gpu_id = 1] and
> vice-versa.
> - formats will only call opencl_init_dev to get ocl_gpu_id (to run using
> many devices). Or ocl_gpu_id becames a vector. Or both.
> - it is not a problem if command line accepts -pla:1 and -de:0 or
> --devices=1,2,3
Thats sounds good for me.

> Problems:
> - hot-plug is not going to be handled. Well, it is not handled now too.
What do you mean by hotplug? Adding gpus while john is runnig?

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.