mirror of
https://github.com/hashcat/hashcat.git
synced 2025-02-23 04:52:03 +00:00
Backport native threads strategy from Kerberos to Office and PDF
This commit is contained in:
parent
959a232828
commit
83badbeaf1
@ -69,21 +69,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,21 +69,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,21 +70,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,21 +71,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,21 +70,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,21 +72,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,21 +76,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,21 +77,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,21 +76,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,21 +100,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
|
|||||||
}
|
}
|
||||||
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
||||||
{
|
{
|
||||||
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
if (device_param->device_local_mem_size < 49152)
|
||||||
{
|
{
|
||||||
native_threads = 8;
|
native_threads = MIN (device_param->kernel_preferred_wgs_multiple, 32); // We can't just set 32, because Intel GPU need 8
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
|
||||||
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
||||||
{
|
|
||||||
native_threads = 64;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_threads = 32;
|
native_threads = device_param->kernel_preferred_wgs_multiple;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user