From ff74ad5a99727cfc5f8b066e100bd1f2741d3b76 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Fri, 7 Jan 2022 22:33:39 +0100 Subject: [PATCH] Hash-Mode 10420: set native_threads to 32 with Apple GPU's --- docs/changes.txt | 1 + src/modules/module_10420.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 0ad3f6147..fe92e5917 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -33,6 +33,7 @@ - Hash-Mode 9820: set native_threads to 32 with Apple GPU's - Hash-Mode 10400: set native_threads to 32 with Apple GPU's - Hash-Mode 10410: set native_threads to 32 with Apple GPU's +- Hash-Mode 10420: set native_threads to 32 with Apple GPU's ## ## Technical diff --git a/src/modules/module_10420.c b/src/modules/module_10420.c index 5d5779c4e..263783236 100644 --- a/src/modules/module_10420.c +++ b/src/modules/module_10420.c @@ -76,6 +76,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 @@ -84,6 +90,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);