mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-23 07:08:19 +00:00
OpenCL Runtime: Workaround JiT crash (SC failed. No reason given.) on macOS by limiting local memory allocations to 32k
This commit is contained in:
parent
dcaba1f473
commit
8a3eee3fe5
@ -46,6 +46,7 @@
|
||||
- Folders: Do not escape the variable cpath_real to prevent certain OpenCL runtimes from running into an error which do not support escape characters
|
||||
- LM: Workaround JiT compiler bug in -m 3000 on NV leading to false negatives with large amount of hashes
|
||||
- Tests: Changed tests for VeraCrypt from -a 0 to -a 3, because password extension is not available to all shells
|
||||
- OpenCL Runtime: Workaround JiT crash (SC failed. No reason given.) on macOS by limiting local memory allocations to 32k
|
||||
|
||||
* changes v6.2.1 -> v6.2.2
|
||||
|
||||
|
@ -6506,6 +6506,21 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
|
||||
}
|
||||
}
|
||||
|
||||
// workaround inc!
|
||||
// allocating all reported local memory causes jit to fail with: SC failed. No reason given.
|
||||
// if we limit ourself to 32k it seems to work
|
||||
|
||||
if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||
{
|
||||
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
|
||||
{
|
||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
||||
{
|
||||
device_local_mem_size = MIN (device_local_mem_size, 32768);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
device_param->device_local_mem_size = device_local_mem_size;
|
||||
|
||||
// older POCL version and older LLVM versions are known to fail compiling kernels
|
||||
@ -7700,7 +7715,14 @@ static u32 get_kernel_threads (const hc_device_param_t *device_param)
|
||||
}
|
||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
||||
{
|
||||
const u32 gpu_prefered_thread_count = 64;
|
||||
u32 gpu_prefered_thread_count = 64;
|
||||
|
||||
if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
|
||||
{
|
||||
// based on clinfo output: Preferred work group size multiple (kernel)
|
||||
|
||||
gpu_prefered_thread_count = 32;
|
||||
}
|
||||
|
||||
kernel_threads_max = MIN (kernel_threads_max, gpu_prefered_thread_count);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user