From d7ddb425e58848171d381fc1ed8e1d4d9b455c36 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Fri, 7 Jan 2022 22:28:35 +0100 Subject: [PATCH] Hash-Mode 9720: set native_threads to 32 with Apple GPU's --- docs/changes.txt | 1 + src/modules/module_09720.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 8c17c118f..40eb5a55e 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -27,6 +27,7 @@ - Fixed wordlist handling in -m 3000 when candidate passwords use the $HEX[...] syntax - Hash-Mode 9700: set native_threads to 32 with Apple GPU's - Hash-Mode 9710: set native_threads to 32 with Apple GPU's +- Hash-Mode 9720: set native_threads to 32 with Apple GPU's ## ## Technical diff --git a/src/modules/module_09720.c b/src/modules/module_09720.c index fd957a024..e859fa7fe 100644 --- a/src/modules/module_09720.c +++ b/src/modules/module_09720.c @@ -70,6 +70,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY } else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU) { + #if defined (__APPLE__) + + native_threads = 32; + + #else + if (device_param->device_local_mem_size < 49152) { native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8 @@ -78,6 +84,8 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY { native_threads = device_param->kernel_preferred_wgs_multiple; } + + #endif } hc_asprintf (&jit_build_options, "-D FIXED_LOCAL_SIZE=%u -D _unroll", native_threads);