1
mirror of https://github.com/hashcat/hashcat synced 2024-11-20 23:27:31 +01:00

Fix test.sh and bitsliced algos

This commit is contained in:
Jens Steube 2019-05-06 15:06:02 +02:00
parent d0bd33c9d1
commit bbed0cd67a
5 changed files with 40 additions and 7 deletions

View File

@ -1998,7 +1998,11 @@ KERNEL_FQ void m01500_mxx (KERN_ATTR_BITSLICE ())
* inner loop
*/
#ifdef IS_CUDA
const u32 pc_pos = (blockIdx.y * blockDim.y) + threadIdx.y;
#else
const u32 pc_pos = get_global_id (1);
#endif
const u32 il_pos = pc_pos * 32;
@ -2446,7 +2450,11 @@ KERNEL_FQ void m01500_sxx (KERN_ATTR_BITSLICE ())
* inner loop
*/
#ifdef IS_CUDA
const u32 pc_pos = (blockIdx.y * blockDim.y) + threadIdx.y;
#else
const u32 pc_pos = get_global_id (1);
#endif
const u32 il_pos = pc_pos * 32;

View File

@ -1830,7 +1830,11 @@ KERNEL_FQ void m03000_mxx (KERN_ATTR_BITSLICE ())
* inner loop
*/
#ifdef IS_CUDA
const u32 pc_pos = (blockIdx.y * blockDim.y) + threadIdx.y;
#else
const u32 pc_pos = get_global_id (1);
#endif
const u32 il_pos = pc_pos * 32;
@ -2278,7 +2282,11 @@ KERNEL_FQ void m03000_sxx (KERN_ATTR_BITSLICE ())
* inner loop
*/
#ifdef IS_CUDA
const u32 pc_pos = (blockIdx.y * blockDim.y) + threadIdx.y;
#else
const u32 pc_pos = get_global_id (1);
#endif
const u32 il_pos = pc_pos * 32;

View File

@ -2043,7 +2043,11 @@ KERNEL_FQ void m14000_mxx (KERN_ATTR_BITSLICE ())
* inner loop
*/
#ifdef IS_CUDA
const u32 pc_pos = (blockIdx.y * blockDim.y) + threadIdx.y;
#else
const u32 pc_pos = get_global_id (1);
#endif
const u32 il_pos = pc_pos * 32;
@ -2555,7 +2559,11 @@ KERNEL_FQ void m14000_sxx (KERN_ATTR_BITSLICE ())
* inner loop
*/
#ifdef IS_CUDA
const u32 pc_pos = (blockIdx.y * blockDim.y) + threadIdx.y;
#else
const u32 pc_pos = get_global_id (1);
#endif
const u32 il_pos = pc_pos * 32;

View File

@ -3119,7 +3119,7 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
if (rc_cuEventRecord1 == -1) return -1;
const int rc_cuLaunchKernel = hc_cuLaunchKernel (hashcat_ctx, cuda_function, num_elements, 32, 1, kernel_threads, 1, 1, 0, device_param->cuda_stream, device_param->kernel_params, NULL);
const int rc_cuLaunchKernel = hc_cuLaunchKernel (hashcat_ctx, cuda_function, num_elements / 32, 32, 1, kernel_threads, 1, 1, 0, device_param->cuda_stream, device_param->kernel_params, NULL);
if (rc_cuLaunchKernel == -1) return -1;
@ -3525,7 +3525,7 @@ int run_kernel_tm (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param)
{
CUfunction cuda_function = device_param->cuda_function_tm;
const int rc_cuLaunchKernel = hc_cuLaunchKernel (hashcat_ctx, cuda_function, num_elements, 1, 1, kernel_threads, 1, 1, 0, device_param->cuda_stream, device_param->kernel_params_tm, NULL);
const int rc_cuLaunchKernel = hc_cuLaunchKernel (hashcat_ctx, cuda_function, num_elements / kernel_threads, 1, 1, kernel_threads, 1, 1, 0, device_param->cuda_stream, device_param->kernel_params_tm, NULL);
if (rc_cuLaunchKernel == -1) return -1;
@ -8526,8 +8526,17 @@ int backend_session_begin (hashcat_ctx_t *hashcat_ctx)
device_param->kernel_params_amp[5] = &device_param->kernel_params_amp_buf32[5];
device_param->kernel_params_amp[6] = &device_param->kernel_params_amp_buf64[6];
device_param->kernel_params_tm[0] = &device_param->opencl_d_bfs_c;
device_param->kernel_params_tm[1] = &device_param->opencl_d_tm_c;
if (device_param->is_cuda == true)
{
device_param->kernel_params_tm[0] = &device_param->cuda_d_bfs_c;
device_param->kernel_params_tm[1] = &device_param->cuda_d_tm_c;
}
if (device_param->is_opencl == true)
{
device_param->kernel_params_tm[0] = &device_param->opencl_d_bfs_c;
device_param->kernel_params_tm[1] = &device_param->opencl_d_tm_c;
}
}
device_param->kernel_params_memset_buf32[1] = 0; // value

View File

@ -2477,7 +2477,7 @@ cat << EOF
OPTIONS:
-V OpenCL vector-width (either 1, 2, 4 or 8), overrides value from device query :
-V Backend vector-width (either 1, 2, 4 or 8), overrides value from device query :
'1' => vector-width 1
'2' => vector-width 2 (default)
'4' => vector-width 4
@ -2507,7 +2507,7 @@ OPTIONS:
'linux' => Linux operating system (use .bin file extension)
'macos' => macOS operating system (use .app file extension)
-d Select the OpenCL device :
-d Select the Backend device :
(int)[,int] => comma separated list of devices (default : 1)
-D Select the OpenCL device types :
@ -2866,7 +2866,7 @@ if [ "${PACKAGE}" -eq 0 -o -z "${PACKAGE_FOLDER}" ]; then
fi
VECTOR=${CUR_WIDTH}
OPTS="${OPTS_OLD} --opencl-vector-width ${VECTOR}"
OPTS="${OPTS_OLD} --backend-vector-width ${VECTOR}"
if [[ ${IS_SLOW} -eq 1 ]]; then