1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

Add program build info for MP and AMP kernels

This commit is contained in:
Jens Steube 2016-08-18 21:59:30 +02:00
parent b22bcd0602
commit 57ce1fd81e

View File

@ -16449,6 +16449,7 @@ int main (int argc, char **argv)
size_t build_log_size = 0;
/*
CL_err = hc_clGetProgramBuildInfo (data.ocl, device_param->program, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
if (CL_err != CL_SUCCESS)
@ -16457,8 +16458,15 @@ int main (int argc, char **argv)
return -1;
}
*/
hc_clGetProgramBuildInfo (data.ocl, device_param->program, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
#ifdef DEBUG
if ((build_log_size != 0) || (CL_err != CL_SUCCESS))
#else
if (CL_err != CL_SUCCESS)
#endif
{
char *build_log = (char *) mymalloc (build_log_size + 1);
@ -16581,6 +16589,7 @@ int main (int argc, char **argv)
size_t build_log_size = 0;
/*
CL_err = hc_clGetProgramBuildInfo (data.ocl, device_param->program, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
if (CL_err != CL_SUCCESS)
@ -16589,8 +16598,15 @@ int main (int argc, char **argv)
return -1;
}
*/
hc_clGetProgramBuildInfo (data.ocl, device_param->program, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
#ifdef DEBUG
if ((build_log_size != 0) || (CL_err != CL_SUCCESS))
#else
if (CL_err != CL_SUCCESS)
#endif
{
char *build_log = (char *) mymalloc (build_log_size + 1);
@ -16694,6 +16710,43 @@ int main (int argc, char **argv)
//return -1;
}
size_t build_log_size = 0;
/*
CL_err = hc_clGetProgramBuildInfo (data.ocl, device_param->program_mp, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
if (CL_err != CL_SUCCESS)
{
log_error ("ERROR: clGetProgramBuildInfo(): %s\n", val2cstr_cl (CL_err));
return -1;
}
*/
hc_clGetProgramBuildInfo (data.ocl, device_param->program_mp, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
#ifdef DEBUG
if ((build_log_size != 0) || (CL_err != CL_SUCCESS))
#else
if (CL_err != CL_SUCCESS)
#endif
{
char *build_log = (char *) mymalloc (build_log_size + 1);
CL_err = hc_clGetProgramBuildInfo (data.ocl, device_param->program_mp, device_param->device, CL_PROGRAM_BUILD_LOG, build_log_size, build_log, NULL);
if (CL_err != CL_SUCCESS)
{
log_error ("ERROR: clGetProgramBuildInfo(): %s\n", val2cstr_cl (CL_err));
return -1;
}
puts (build_log);
myfree (build_log);
}
if (CL_err != CL_SUCCESS)
{
device_param->skipped = true;
@ -16838,6 +16891,43 @@ int main (int argc, char **argv)
//return -1;
}
size_t build_log_size = 0;
/*
CL_err = hc_clGetProgramBuildInfo (data.ocl, device_param->program_amp, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
if (CL_err != CL_SUCCESS)
{
log_error ("ERROR: clGetProgramBuildInfo(): %s\n", val2cstr_cl (CL_err));
return -1;
}
*/
hc_clGetProgramBuildInfo (data.ocl, device_param->program_amp, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
#ifdef DEBUG
if ((build_log_size != 0) || (CL_err != CL_SUCCESS))
#else
if (CL_err != CL_SUCCESS)
#endif
{
char *build_log = (char *) mymalloc (build_log_size + 1);
CL_err = hc_clGetProgramBuildInfo (data.ocl, device_param->program_amp, device_param->device, CL_PROGRAM_BUILD_LOG, build_log_size, build_log, NULL);
if (CL_err != CL_SUCCESS)
{
log_error ("ERROR: clGetProgramBuildInfo(): %s\n", val2cstr_cl (CL_err));
return -1;
}
puts (build_log);
myfree (build_log);
}
if (CL_err != CL_SUCCESS)
{
device_param->skipped = true;