Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+TsHUBXLfrynjRbx4TxqUm9LO=is1w4mKnuQ0nvmEn=_x8E_g@mail.gmail.com>
Date: Sun, 13 Jan 2013 11:45:51 +0530
From: Sayantan Datta <std2048@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Changes to common-opencl.c

On Sun, Jan 13, 2013 at 6:24 AM, Claudio André <claudioandre.br@...il.com>wrote:

> 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
>

Cool. Here are some of my suggestions:
1. Add a function/macro that returns the number of active devices.

2. Please start numbering devices form 0, not 1 to avoid confusion. i.e
--devices =0 ,1,2....

3. Also how do I know which devices are active ?
Suppose I use -devices = 2 ,3. Then the what does the vector ocl_gpu_id
contain ? Is it like...
ocl_gpu_id[0] == 2
ocl_gpu_id[1] == 3
If not please clarify. This is also what I suggest we should be doing.

4.Regarding cleaning of the ques and context etc, you can do it inside
common-opencl.c. How do you propose we clean the memory buffers and
kernels? I suggest you provide a function from common-opencl.c that takes a
(void*)function pointer as an argument.

 I need to understand Sayantan usage of copied common-opencl.c code to
> change it. Even better, Sayantan can say his opinion on the matter.
>  magnun's code as listOpenCLdevices was not tested.


5.Regarding DES(I guess only this format copies code from common-opencl.c)
it could probably support multiple gpus later, but it isn't even close to
optimal and it is kind of complicated for implementation in general inside
common-opencl.c.  So I would like to keep things under my control. However
you could provide the clean up function  that takes a function pointer as
argument so that I can clean the ques,buffers,contexts and kernels within
the format itself. as required by john.

Regards,
Sayantan

Content of type "text/html" skipped

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.