Date: Tue, 25 Aug 2015 17:11:04 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: 7z-opencl crashes with auto-tuning On 2015-08-25 14:39, Solar Designer wrote: > On Tue, Aug 25, 2015 at 03:27:47PM +0300, Solar Designer wrote: >> The 7z-opencl format passes test when run with explicit GWS and LWS, but >> crashes during/after my patched auto-tuning: > > When targeting -dev=1, rar-opencl similarly crashes with the auto-tuning > patch, at the same point (when starting to tune GWS for the second > time). However, surprisingly it doesn't crash on -dev=5 (and actually > gets tuned better than before). 7z-opencl crashes on both. > > There are probably changes needed to these two formats, or to how the > auto-tuning is revised - or both. > > Maybe more formats are broken with that patch. I only tested a few. This (committed) fix should fix all formats with similar problem. diff --git a/src/common-opencl.c b/src/common-opencl.c index 7f0440c..b86a7ce 100644 --- a/src/common-opencl.c +++ b/src/common-opencl.c @@ -1313,6 +1313,9 @@ static cl_ulong gws_test(size_t gws, unsigned int rounds, int sequential_id) for (i = 0; i < MAX_EVENTS; i++) benchEvent[i] = NULL; + // Ensure format knows its GWS + global_work_size = gws; + // Prepare buffers. create_clobj(gws, self); The canonical fix would be a major clean-up of which variables should be global (and perhaps prefixed with ocl_) and which should be format-local (like global_work_size). It's a mess, for historical reasons. magnum
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.