diff --git a/include/types.h b/include/types.h index 466c985f5..3dfa6f162 100644 --- a/include/types.h +++ b/include/types.h @@ -434,6 +434,7 @@ typedef enum opts_type OPTS_TYPE_POTFILE_NOPASS = (1ULL << 47), // sometimes the password should not be printed to potfile OPTS_TYPE_DYNAMIC_SHARED = (1ULL << 48), // use dynamic shared memory (note: needs special kernel changes) OPTS_TYPE_SELF_TEST_DISABLE = (1ULL << 49), // some algos use JiT in combinations with a salt or create too much startup time + OPTS_TYPE_MP_MULTI_DISABLE = (1ULL << 50), // do not multiply the kernel-accel with the multiprocessor count per device to allow more fine-tuned workload settings } opts_type_t; diff --git a/src/backend.c b/src/backend.c index bc5ce0fe1..064e83d92 100644 --- a/src/backend.c +++ b/src/backend.c @@ -7174,6 +7174,7 @@ void backend_ctx_devices_destroy (hashcat_ctx_t *hashcat_ctx) void backend_ctx_devices_sync_tuning (hashcat_ctx_t *hashcat_ctx) { backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; + hashconfig_t *hashconfig = hashcat_ctx->hashconfig; if (backend_ctx->enabled == false) return; @@ -7199,7 +7200,7 @@ void backend_ctx_devices_sync_tuning (hashcat_ctx_t *hashcat_ctx) device_param_dst->kernel_loops = device_param_src->kernel_loops; device_param_dst->kernel_threads = device_param_src->kernel_threads; - const u32 hardware_power = device_param_dst->device_processors * device_param_dst->kernel_threads; + const u32 hardware_power = ((hashconfig->opts_type & OPTS_TYPE_MP_MULTI_DISABLE) ? 1 : device_param_dst->device_processors) * device_param_dst->kernel_threads; device_param_dst->hardware_power = hardware_power; @@ -10466,7 +10467,7 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx) device_param->kernel_threads = kernel_threads; - device_param->hardware_power = device_processors * kernel_threads; + device_param->hardware_power = ((hashconfig->opts_type & OPTS_TYPE_MP_MULTI_DISABLE) ? 1 : device_processors) * kernel_threads; u32 kernel_accel_min = device_param->kernel_accel_min; u32 kernel_accel_max = device_param->kernel_accel_max;