|
|
|
@ -528,7 +528,7 @@ static bool opencl_test_instruction (hashcat_ctx_t *hashcat_ctx, cl_context cont
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool read_kernel_binary (hashcat_ctx_t *hashcat_ctx, const char *kernel_file, size_t *kernel_lengths, char **kernel_sources)
|
|
|
|
|
bool read_kernel_binary (hashcat_ctx_t *hashcat_ctx, const char *kernel_file, size_t *kernel_lengths, char **kernel_sources)
|
|
|
|
|
{
|
|
|
|
|
HCFILE fp;
|
|
|
|
|
|
|
|
|
@ -6377,11 +6377,9 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
|
|
|
|
|
// try CL_DEVICE_BOARD_NAME_AMD first, if it fails fall back to CL_DEVICE_NAME
|
|
|
|
|
// since AMD ROCm does not identify itself at this stage we simply check for return code from clGetDeviceInfo()
|
|
|
|
|
|
|
|
|
|
#define CHECK_BOARD_NAME_AMD 1
|
|
|
|
|
|
|
|
|
|
cl_int rc_board_name_amd = CL_INVALID_VALUE;
|
|
|
|
|
|
|
|
|
|
if (CHECK_BOARD_NAME_AMD)
|
|
|
|
|
if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
|
|
|
|
{
|
|
|
|
|
//backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
|
|
|
|
|
|
|
|
|
@ -7869,6 +7867,7 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
|
|
|
|
|
|
|
|
|
|
backend_ctx->opencl_devices_active--;
|
|
|
|
|
backend_ctx->backend_devices_active--;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -7884,6 +7883,7 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
|
|
|
|
|
|
|
|
|
|
backend_ctx->opencl_devices_active--;
|
|
|
|
|
backend_ctx->backend_devices_active--;
|
|
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -7984,6 +7984,8 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
|
|
|
|
|
// In case there are multiple hashcat instances starting at the same time this will cause GPU out of memory errors which otherwise would not exist.
|
|
|
|
|
// We will simply not run it if that device was skipped by the user.
|
|
|
|
|
|
|
|
|
|
if (device_param->device_global_mem)
|
|
|
|
|
{
|
|
|
|
|
#define MAX_ALLOC_CHECKS_CNT 8192
|
|
|
|
|
#define MAX_ALLOC_CHECKS_SIZE (64 * 1024 * 1024)
|
|
|
|
|
|
|
|
|
@ -8068,6 +8070,7 @@ int backend_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime)
|
|
|
|
|
|
|
|
|
|
hcfree (tmp_device);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hc_clReleaseCommandQueue (hashcat_ctx, command_queue);
|
|
|
|
|
|
|
|
|
|