|
|
|
@ -136,17 +136,9 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
device_param->kernel_accel = kernel_accel;
|
|
|
|
|
device_param->kernel_loops = kernel_loops;
|
|
|
|
|
|
|
|
|
|
const u32 kernel_power = device_param->hardware_power * device_param->kernel_accel;
|
|
|
|
|
|
|
|
|
|
device_param->kernel_power = kernel_power;
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// from here it's clear we are allowed to autotune
|
|
|
|
|
// so let's init some fake words
|
|
|
|
|
|
|
|
|
@ -352,17 +344,19 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// reset them fake words
|
|
|
|
|
// reset other buffers in case autotune cracked something
|
|
|
|
|
|
|
|
|
|
if (device_param->is_cuda == true)
|
|
|
|
|
{
|
|
|
|
|
// reset them fake words
|
|
|
|
|
int CU_rc;
|
|
|
|
|
|
|
|
|
|
CU_rc = run_cuda_kernel_memset (hashcat_ctx, device_param, device_param->cuda_d_pws_buf, 0, device_param->size_pws);
|
|
|
|
|
|
|
|
|
|
if (CU_rc == -1) return -1;
|
|
|
|
|
|
|
|
|
|
// reset other buffers in case autotune cracked something
|
|
|
|
|
|
|
|
|
|
CU_rc = run_cuda_kernel_memset (hashcat_ctx, device_param, device_param->cuda_d_plain_bufs, 0, device_param->size_plains);
|
|
|
|
|
|
|
|
|
|
if (CU_rc == -1) return -1;
|
|
|
|
@ -378,14 +372,12 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
|
|
|
|
|
|
|
|
|
if (device_param->is_opencl == true)
|
|
|
|
|
{
|
|
|
|
|
// reset them fake words
|
|
|
|
|
int CL_rc;
|
|
|
|
|
|
|
|
|
|
CL_rc = run_opencl_kernel_memset (hashcat_ctx, device_param, device_param->opencl_d_pws_buf, 0, device_param->size_pws);
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1) return -1;
|
|
|
|
|
|
|
|
|
|
// reset other buffers in case autotune cracked something
|
|
|
|
|
|
|
|
|
|
CL_rc = run_opencl_kernel_memset (hashcat_ctx, device_param, device_param->opencl_d_plain_bufs, 0, device_param->size_plains);
|
|
|
|
|
|
|
|
|
|
if (CL_rc == -1) return -1;
|
|
|
|
|