1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Merge pull request #3738 from matrix/fix_10700_opt_metal

Fixed build failed for 10700 optimized with Apple Metal
This commit is contained in:
Jens Steube 2023-05-31 14:16:17 +02:00 committed by GitHub
commit 849b524c65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -72,6 +72,7 @@
- Fixed bug in input_tokenizer when TOKEN_ATTR_FIXED_LENGTH is used and refactor modules - 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 - 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 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 13772 and 13773 with Apple Metal
- Fixed build failed for 18400 with Apple Metal - Fixed build failed for 18400 with Apple Metal
- Fixed build failed for 18600 with Apple Metal - Fixed build failed for 18600 with Apple Metal

View File

@ -84,11 +84,14 @@ 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) 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)) if ((device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
{
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{ {
return true; return true;
} }
}
return false; return false;
} }
@ -132,6 +135,11 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; 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)) 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 // this is a workaround to avoid a Segmentation fault and self-test fails on AMD GPU PRO