Merge pull request #3738 from matrix/fix_10700_opt_metal

Fixed build failed for 10700 optimized with Apple Metal
pull/3753/head
Jens Steube 10 months ago committed by GitHub
commit 849b524c65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

@ -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

Loading…
Cancel
Save