From 6082fc42a9ddc43765c712cc00ca007741b99580 Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sat, 10 May 2025 14:14:26 +0200 Subject: [PATCH] fix module_unstable_warning for hash-mode 40000, 40001 and 40002 --- src/modules/module_40000.c | 9 ++++++--- src/modules/module_40001.c | 19 ++++++++++++++++++- src/modules/module_40002.c | 19 ++++++++++++++++++- 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/src/modules/module_40000.c b/src/modules/module_40000.c index 2993d7031..ef1bc5cfd 100644 --- a/src/modules/module_40000.c +++ b/src/modules/module_40000.c @@ -65,10 +65,13 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE { if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) { - if ((device_param->is_metal == true) && (device_param->is_apple_silicon == false)) + if (device_param->is_metal == true) { - // Intel Iris Graphics, Metal Version 244.303, compiler timeout but only with -a0 - return true; + if (strncmp (device_param->device_name, "Intel", 5) == 0) + { + // Intel Iris Graphics, Metal Version 244.303, compiler timeout but only with -a0 + return true; + } } } diff --git a/src/modules/module_40001.c b/src/modules/module_40001.c index bb8c1b0cd..81276ba62 100644 --- a/src/modules/module_40001.c +++ b/src/modules/module_40001.c @@ -61,6 +61,23 @@ static const char *SIGNATURE_RC4 = "$rc4$"; static const u32 RC4_KEY_BITS = 72; static const u32 PW_LEN = RC4_KEY_BITS / 8; // 9 +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + if (device_param->is_metal == true) + { + if (strncmp (device_param->device_name, "Intel", 5) == 0) + { + // Intel Iris Graphics, Metal Version 244.303, compiler timeout but only with -a0 + return true; + } + } + } + + return false; +} + char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -390,6 +407,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; } diff --git a/src/modules/module_40002.c b/src/modules/module_40002.c index 065d8cae8..7cb933fc2 100644 --- a/src/modules/module_40002.c +++ b/src/modules/module_40002.c @@ -61,6 +61,23 @@ static const char *SIGNATURE_RC4 = "$rc4$"; static const u32 RC4_KEY_BITS = 104; static const u32 PW_LEN = RC4_KEY_BITS / 8; // 13 +bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) +{ + if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) + { + if (device_param->is_metal == true) + { + if (strncmp (device_param->device_name, "Intel", 5) == 0) + { + // Intel Iris Graphics, Metal Version 244.303, compiler timeout but only with -a0 + return true; + } + } + } + + return false; +} + char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; @@ -390,6 +407,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = MODULE_DEFAULT; - module_ctx->module_unstable_warning = MODULE_DEFAULT; + module_ctx->module_unstable_warning = module_unstable_warning; module_ctx->module_warmup_disable = MODULE_DEFAULT; }