Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 13 Jan 2013 13:24:52 -0200
From: Claudio André <>
Subject: Re: Changes to common-opencl.c

Em 13-01-2013 04:15, Sayantan Datta escreveu:
> Cool. Here are some of my suggestions:
> 1. Add a function/macro that returns the number of active devices.
There is a function that return the number of all available devices.
To create a function that return the number of 'in use' devices we need 
to implement --devices=1,2,3

> 2. Please start numbering devices form 0, not 1 to avoid confusion. 
> i.e --devices =0 ,1,2....
Everything is zero based. Not sure if i get your point here.

> 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.
We need to implement --devices=1,2,3 first.
But i agree that: using jouh --devices=2,3 will result in:
- get_total_of_in_use_devices() will be 2
- ocl_gpu_id[0] will be 2
- ocl_gpu_id[1] will be 3

> 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.
Not this is not possible. You have to have a (magnun's code have plenty 
of examples):
- release_clobj()
- done_method()

You can create multiple kernels (if you split), you sometimes need salt 
buffers, partial key buffers, etc. So, only you can clean it properly.

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

I have no problems with this. But a few things are mandatory:
- release_clobj()
- done_method()
- avoid to write to any global variables defined in common-opencl.h (as 
platform[], devices[], ocl_gpi_id, ...)

Doing so, no problems are expected.


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.