Date: Wed, 19 Dec 2012 15:01:00 -0200 From: Claudio André <claudioandre.br@...il.com> To: john-dev@...ts.openwall.com Subject: Re: Opencl build from binary Em 18-12-2012 17:39, magnum escreveu: > From a quick look at opencl_cryptsha512_fmt.c in your repo, I wonder > why you didn't make more of it shared? The format could just call > opencl_build_kernel() and the common code could use the binary if > available, transparent to the format. However, I guess we need some > kind of version-control. Or is there already? I didn't look very > closely. It could be like I tried to do something not invasive in common-opencl. Now one (only if he wants to use new functionality) have to change source code: From: opencl_init("$JOHN/cryptmd5_kernel.cl", ocl_gpu_id, platform_id); To: opencl_init_dev(ocl_gpu_id, platform_id); opencl_build_kernel_save("$JOHN/cryptmd5_kernel.cl", ocl_gpu_id, magumOptions=NULL, saveBinary=1, warnAboutCompilation=1); BTW: If needed/wanted, it is easy to create a new function opencl_init_save. > if (no binary) OR (timestamp of source is newer than timestamp of binary) > build [and write/overwrite binary] > else > use binary > > Or is that too simple? I can't think of any problems with that. Implemented this way. Depending on how many GPUs someone have, one file for each device name. Attached and diff here: https://github.com/magnumripper/JohnTheRipper/pull/135/files Claudio Content of type "text/html" skipped View attachment "0003-Shared-code-to-allow-to-build-and-use-binary-OpenCL-.patch" of type "text/x-patch" (5565 bytes)
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.