diff --git a/docs/changes.txt b/docs/changes.txt index 734ec4d18..28b0aced0 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -72,6 +72,7 @@ - Fixed bug in input_tokenizer when TOKEN_ATTR_FIXED_LENGTH is used and refactor modules - Added verification of token buffer length when using TOKEN_ATTR_FIXED_LENGTH - Fixed build failed for 4410 with vector width > 1 +- Fixed build failed for 10700 optimized with Apple Metal - Fixed build failed for 13772 and 13773 with Apple Metal - Fixed build failed for 18400 with Apple Metal - Fixed build failed for 18600 with Apple Metal diff --git a/src/modules/module_10700.c b/src/modules/module_10700.c index e8a8edce2..9b6fa97a3 100644 --- a/src/modules/module_10700.c +++ b/src/modules/module_10700.c @@ -84,10 +84,13 @@ static const int ROUNDS_PDF17L8 = 64; 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) { - // AppleM1, OpenCL, MTLCompilerService, createKernel: newComputePipelineState failed (or never-end with pure kernel) + // AppleM1, OpenCL, MTLCompilerService, createKernel never-end with pure kernel if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) { - return true; + if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) + { + return true; + } } return false; @@ -132,6 +135,11 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY { char *jit_build_options = NULL; + if (device_param->is_metal == true) + { + hc_asprintf (&jit_build_options, "-D FORCE_DISABLE_SHM"); + } + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) { // this is a workaround to avoid a Segmentation fault and self-test fails on AMD GPU PRO