Add CUDA device attributes to -I

pull/2022/head
Jens Steube 5 years ago
parent c80e516c3c
commit e3500ff4aa

@ -11,16 +11,16 @@
#ifndef _HWMON_H #ifndef _HWMON_H
#define _HWMON_H #define _HWMON_H
int hm_get_threshold_slowdown_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_threshold_slowdown_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_threshold_shutdown_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_threshold_shutdown_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_temperature_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_temperature_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_fanpolicy_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_fanpolicy_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_fanspeed_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_fanspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_buslanes_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_buslanes_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_utilization_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_utilization_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_memoryspeed_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_memoryspeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_corespeed_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_corespeed_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hm_get_throttle_with_device_id (hashcat_ctx_t *hashcat_ctx, const u32 device_id); int hm_get_throttle_with_devices_idx (hashcat_ctx_t *hashcat_ctx, const int backend_device_idx);
int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx); int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx);
void hwmon_ctx_destroy (hashcat_ctx_t *hashcat_ctx); void hwmon_ctx_destroy (hashcat_ctx_t *hashcat_ctx);

@ -19,8 +19,8 @@ void format_speed_display_1k (double val, char *buf, size_t len);
int status_get_device_info_cnt (const hashcat_ctx_t *hashcat_ctx); int status_get_device_info_cnt (const hashcat_ctx_t *hashcat_ctx);
int status_get_device_info_active (const hashcat_ctx_t *hashcat_ctx); int status_get_device_info_active (const hashcat_ctx_t *hashcat_ctx);
bool status_get_skipped_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); bool status_get_skipped_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
bool status_get_skipped_warning_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); bool status_get_skipped_warning_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
char *status_get_session (const hashcat_ctx_t *hashcat_ctx); char *status_get_session (const hashcat_ctx_t *hashcat_ctx);
const char *status_get_status_string (const hashcat_ctx_t *hashcat_ctx); const char *status_get_status_string (const hashcat_ctx_t *hashcat_ctx);
int status_get_status_number (const hashcat_ctx_t *hashcat_ctx); int status_get_status_number (const hashcat_ctx_t *hashcat_ctx);
@ -35,7 +35,7 @@ int status_get_guess_mod_count (const hashcat_ctx_t *hash
double status_get_guess_mod_percent (const hashcat_ctx_t *hashcat_ctx); double status_get_guess_mod_percent (const hashcat_ctx_t *hashcat_ctx);
char *status_get_guess_charset (const hashcat_ctx_t *hashcat_ctx); char *status_get_guess_charset (const hashcat_ctx_t *hashcat_ctx);
int status_get_guess_mask_length (const hashcat_ctx_t *hashcat_ctx); int status_get_guess_mask_length (const hashcat_ctx_t *hashcat_ctx);
char *status_get_guess_candidates_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); char *status_get_guess_candidates_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
char *status_get_hash_name (const hashcat_ctx_t *hashcat_ctx); char *status_get_hash_name (const hashcat_ctx_t *hashcat_ctx);
char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx); char *status_get_hash_target (const hashcat_ctx_t *hashcat_ctx);
int status_get_digests_done (const hashcat_ctx_t *hashcat_ctx); int status_get_digests_done (const hashcat_ctx_t *hashcat_ctx);
@ -68,12 +68,12 @@ u64 status_get_progress_skip (const hashcat_ctx_t *hash
u64 status_get_progress_cur_relative_skip (const hashcat_ctx_t *hashcat_ctx); u64 status_get_progress_cur_relative_skip (const hashcat_ctx_t *hashcat_ctx);
u64 status_get_progress_end_relative_skip (const hashcat_ctx_t *hashcat_ctx); u64 status_get_progress_end_relative_skip (const hashcat_ctx_t *hashcat_ctx);
double status_get_hashes_msec_all (const hashcat_ctx_t *hashcat_ctx); double status_get_hashes_msec_all (const hashcat_ctx_t *hashcat_ctx);
double status_get_hashes_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); double status_get_hashes_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
double status_get_hashes_msec_dev_benchmark (const hashcat_ctx_t *hashcat_ctx, const int device_id); double status_get_hashes_msec_dev_benchmark (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
double status_get_exec_msec_all (const hashcat_ctx_t *hashcat_ctx); double status_get_exec_msec_all (const hashcat_ctx_t *hashcat_ctx);
double status_get_exec_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); double status_get_exec_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
char *status_get_speed_sec_all (const hashcat_ctx_t *hashcat_ctx); char *status_get_speed_sec_all (const hashcat_ctx_t *hashcat_ctx);
char *status_get_speed_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); char *status_get_speed_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_cpt_cur_min (const hashcat_ctx_t *hashcat_ctx); int status_get_cpt_cur_min (const hashcat_ctx_t *hashcat_ctx);
int status_get_cpt_cur_hour (const hashcat_ctx_t *hashcat_ctx); int status_get_cpt_cur_hour (const hashcat_ctx_t *hashcat_ctx);
int status_get_cpt_cur_day (const hashcat_ctx_t *hashcat_ctx); int status_get_cpt_cur_day (const hashcat_ctx_t *hashcat_ctx);
@ -81,30 +81,30 @@ int status_get_cpt_avg_min (const hashcat_ctx_t *hash
int status_get_cpt_avg_hour (const hashcat_ctx_t *hashcat_ctx); int status_get_cpt_avg_hour (const hashcat_ctx_t *hashcat_ctx);
int status_get_cpt_avg_day (const hashcat_ctx_t *hashcat_ctx); int status_get_cpt_avg_day (const hashcat_ctx_t *hashcat_ctx);
char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx); char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx);
int status_get_salt_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_salt_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_innerloop_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_innerloop_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_innerloop_left_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_innerloop_left_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_iteration_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_iteration_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_iteration_left_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_iteration_left_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
#ifdef WITH_BRAIN #ifdef WITH_BRAIN
int status_get_brain_session (const hashcat_ctx_t *hashcat_ctx); int status_get_brain_session (const hashcat_ctx_t *hashcat_ctx);
int status_get_brain_attack (const hashcat_ctx_t *hashcat_ctx); int status_get_brain_attack (const hashcat_ctx_t *hashcat_ctx);
int status_get_brain_link_client_id_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_brain_link_client_id_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_brain_link_status_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_brain_link_status_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
char *status_get_brain_link_recv_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); char *status_get_brain_link_recv_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
char *status_get_brain_link_send_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); char *status_get_brain_link_send_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
char *status_get_brain_link_recv_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); char *status_get_brain_link_recv_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
char *status_get_brain_link_send_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); char *status_get_brain_link_send_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
#endif #endif
char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_memoryspeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_memoryspeed_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
u64 status_get_progress_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); u64 status_get_progress_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
double status_get_runtime_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); double status_get_runtime_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_kernel_accel_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_kernel_accel_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_kernel_loops_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_kernel_loops_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_kernel_threads_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_kernel_threads_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_get_vector_width_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id); int status_get_vector_width_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx);
int status_progress_init (hashcat_ctx_t *hashcat_ctx); int status_progress_init (hashcat_ctx_t *hashcat_ctx);
void status_progress_destroy (hashcat_ctx_t *hashcat_ctx); void status_progress_destroy (hashcat_ctx_t *hashcat_ctx);

@ -18,7 +18,7 @@
#if defined (_WIN) #if defined (_WIN)
#define hc_thread_create(t,f,a) t = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) &f, a, 0, NULL) #define hc_thread_create(t,f,a) t = CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE) &f, a, 0, NULL)
#define hc_thread_wait(n,a) for (u32 i = 0; i < n; i++) WaitForSingleObject ((a)[i], INFINITE) #define hc_thread_wait(n,a) for (int i = 0; i < n; i++) WaitForSingleObject ((a)[i], INFINITE)
#define hc_thread_exit(t) ExitThread (t) #define hc_thread_exit(t) ExitThread (t)
#define hc_thread_detach(t) CloseHandle (t) #define hc_thread_detach(t) CloseHandle (t)
@ -42,7 +42,7 @@
#else #else
#define hc_thread_create(t,f,a) pthread_create (&t, NULL, f, a) #define hc_thread_create(t,f,a) pthread_create (&t, NULL, f, a)
#define hc_thread_wait(n,a) for (u32 i = 0; i < n; i++) pthread_join ((a)[i], NULL) #define hc_thread_wait(n,a) for (int i = 0; i < n; i++) pthread_join ((a)[i], NULL)
#define hc_thread_exit(t) pthread_exit (&t) #define hc_thread_exit(t) pthread_exit (&t)
#define hc_thread_detach(t) pthread_detach (t) #define hc_thread_detach(t) pthread_detach (t)

@ -995,13 +995,13 @@ typedef struct link_speed
typedef struct hc_device_param typedef struct hc_device_param
{ {
u32 device_id; int device_id;
u8 pcie_bus; u8 pcie_bus;
u8 pcie_device; u8 pcie_device;
u8 pcie_function; u8 pcie_function;
u32 platform_devices_id; // for mapping with hms devices u32 opencl_platform_devices_id; // for mapping with hms devices
bool skipped; // permanent bool skipped; // permanent
bool skipped_warning; // iteration bool skipped_warning; // iteration
@ -1014,6 +1014,7 @@ typedef struct hc_device_param
size_t device_maxworkgroup_size; size_t device_maxworkgroup_size;
u64 device_local_mem_size; u64 device_local_mem_size;
int device_local_mem_type; int device_local_mem_type;
char *device_name;
int sm_major; int sm_major;
int sm_minor; int sm_minor;
@ -1198,14 +1199,6 @@ typedef struct hc_device_param
hc_timer_t timer_speed; hc_timer_t timer_speed;
// device specific attributes starting
char *device_name;
char *device_vendor;
char *device_version;
char *driver_version;
char *device_opencl_version;
// AMD // AMD
bool has_vadd3; bool has_vadd3;
bool has_vbfe; bool has_vbfe;
@ -1256,17 +1249,25 @@ typedef struct hc_device_param
// API: cuda // API: cuda
bool is_cuda;
CUdevice cuda_device; CUdevice cuda_device;
// API: opencl // API: opencl
cl_device_id device; bool is_opencl;
cl_device_type opencl_device_type;
cl_device_id opencl_device;
cl_platform_id platform; char *opencl_driver_version;
char *opencl_device_vendor;
char *opencl_device_version;
char *opencl_device_c_version;
cl_uint device_vendor_id; cl_platform_id opencl_platform;
cl_uint platform_vendor_id; cl_device_type opencl_device_type;
cl_uint opencl_device_vendor_id;
cl_uint opencl_platform_vendor_id;
cl_kernel kernel1; cl_kernel kernel1;
cl_kernel kernel12; cl_kernel kernel12;
@ -1346,10 +1347,9 @@ typedef struct backend_ctx
void *cuda; void *cuda;
void *nvrtc; void *nvrtc;
int *backend_device_from_cuda; // from cuda device index to backend device index int backend_device_from_cuda[DEVICES_MAX]; // from cuda device index to backend device index
int *backend_device_to_cuda; // from backend device index to cuda device index int backend_device_from_opencl[DEVICES_MAX]; // from opencl device index to backend device index
int *backend_device_from_opencl; // from opencl device index to backend device index int backend_device_from_opencl_platform[CL_PLATFORMS_MAX][DEVICES_MAX]; // from opencl device index to backend device index (by platform)
int *backend_device_to_opencl; // from backend device index to opencl device index
int backend_devices_cnt; int backend_devices_cnt;
int backend_devices_active; int backend_devices_active;
@ -1358,9 +1358,6 @@ typedef struct backend_ctx
int opencl_devices_cnt; int opencl_devices_cnt;
int opencl_devices_active; int opencl_devices_active;
u32 devices_cnt;
u32 devices_active;
hc_device_param_t *devices_param; hc_device_param_t *devices_param;
u32 hardware_power_all; u32 hardware_power_all;
@ -1387,15 +1384,14 @@ typedef struct backend_ctx
// opencl // opencl
cl_uint platforms_cnt; cl_platform_id *opencl_platforms;
cl_platform_id *platforms; cl_uint opencl_platforms_cnt;
char **platforms_vendor; cl_device_id **opencl_platforms_devices;
char **platforms_name; cl_uint *opencl_platforms_devices_cnt;
char **platforms_version; char **opencl_platforms_name;
bool *platforms_skipped; bool *opencl_platforms_skipped;
char **opencl_platforms_vendor;
cl_uint platform_devices_cnt; char **opencl_platforms_version;
cl_device_id *platform_devices;
u64 opencl_platforms_filter; u64 opencl_platforms_filter;
cl_device_type opencl_device_types_filter; cl_device_type opencl_device_types_filter;

@ -4,7 +4,7 @@
## ##
SHARED := 0 SHARED := 0
DEBUG := 0 DEBUG := 1
PRODUCTION := 0 PRODUCTION := 0
PRODUCTION_VERSION := v5.1.0 PRODUCTION_VERSION := v5.1.0
ENABLE_BRAIN := 1 ENABLE_BRAIN := 1

File diff suppressed because it is too large Load Diff

@ -27,9 +27,9 @@ static u64 get_highest_words_done (const hashcat_ctx_t *hashcat_ctx)
u64 words_cur = 0; u64 words_cur = 0;
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) continue; if (device_param->skipped == true) continue;
@ -49,9 +49,9 @@ static u64 get_lowest_words_done (const hashcat_ctx_t *hashcat_ctx)
u64 words_cur = 0xffffffffffffffff; u64 words_cur = 0xffffffffffffffff;
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) continue; if (device_param->skipped == true) continue;

@ -180,9 +180,9 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
* prepare thread buffers * prepare thread buffers
*/ */
thread_param_t *threads_param = (thread_param_t *) hccalloc (backend_ctx->devices_cnt, sizeof (thread_param_t)); thread_param_t *threads_param = (thread_param_t *) hccalloc (backend_ctx->backend_devices_cnt, sizeof (thread_param_t));
hc_thread_t *c_threads = (hc_thread_t *) hccalloc (backend_ctx->devices_cnt, sizeof (hc_thread_t)); hc_thread_t *c_threads = (hc_thread_t *) hccalloc (backend_ctx->backend_devices_cnt, sizeof (hc_thread_t));
/** /**
* create autotune threads * create autotune threads
@ -192,17 +192,17 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
status_ctx->devices_status = STATUS_AUTOTUNE; status_ctx->devices_status = STATUS_AUTOTUNE;
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
thread_param_t *thread_param = threads_param + device_id; thread_param_t *thread_param = threads_param + backend_devices_idx;
thread_param->hashcat_ctx = hashcat_ctx; thread_param->hashcat_ctx = hashcat_ctx;
thread_param->tid = device_id; thread_param->tid = backend_devices_idx;
hc_thread_create (c_threads[device_id], thread_autotune, thread_param); hc_thread_create (c_threads[backend_devices_idx], thread_autotune, thread_param);
} }
hc_thread_wait (backend_ctx->devices_cnt, c_threads); hc_thread_wait (backend_ctx->backend_devices_cnt, c_threads);
EVENT (EVENT_AUTOTUNE_FINISHED); EVENT (EVENT_AUTOTUNE_FINISHED);
@ -249,24 +249,24 @@ static int inner2_loop (hashcat_ctx_t *hashcat_ctx)
status_ctx->accessible = true; status_ctx->accessible = true;
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
thread_param_t *thread_param = threads_param + device_id; thread_param_t *thread_param = threads_param + backend_devices_idx;
thread_param->hashcat_ctx = hashcat_ctx; thread_param->hashcat_ctx = hashcat_ctx;
thread_param->tid = device_id; thread_param->tid = backend_devices_idx;
if (user_options_extra->wordlist_mode == WL_MODE_STDIN) if (user_options_extra->wordlist_mode == WL_MODE_STDIN)
{ {
hc_thread_create (c_threads[device_id], thread_calc_stdin, thread_param); hc_thread_create (c_threads[backend_devices_idx], thread_calc_stdin, thread_param);
} }
else else
{ {
hc_thread_create (c_threads[device_id], thread_calc, thread_param); hc_thread_create (c_threads[backend_devices_idx], thread_calc, thread_param);
} }
} }
hc_thread_wait (backend_ctx->devices_cnt, c_threads); hc_thread_wait (backend_ctx->backend_devices_cnt, c_threads);
hcfree (c_threads); hcfree (c_threads);
@ -736,23 +736,23 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
{ {
EVENT (EVENT_SELFTEST_STARTING); EVENT (EVENT_SELFTEST_STARTING);
thread_param_t *threads_param = (thread_param_t *) hccalloc (backend_ctx->devices_cnt, sizeof (thread_param_t)); thread_param_t *threads_param = (thread_param_t *) hccalloc (backend_ctx->backend_devices_cnt, sizeof (thread_param_t));
hc_thread_t *selftest_threads = (hc_thread_t *) hccalloc (backend_ctx->devices_cnt, sizeof (hc_thread_t)); hc_thread_t *selftest_threads = (hc_thread_t *) hccalloc (backend_ctx->backend_devices_cnt, sizeof (hc_thread_t));
status_ctx->devices_status = STATUS_SELFTEST; status_ctx->devices_status = STATUS_SELFTEST;
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
thread_param_t *thread_param = threads_param + device_id; thread_param_t *thread_param = threads_param + backend_devices_idx;
thread_param->hashcat_ctx = hashcat_ctx; thread_param->hashcat_ctx = hashcat_ctx;
thread_param->tid = device_id; thread_param->tid = backend_devices_idx;
hc_thread_create (selftest_threads[device_id], thread_selftest, thread_param); hc_thread_create (selftest_threads[backend_devices_idx], thread_selftest, thread_param);
} }
hc_thread_wait (backend_ctx->devices_cnt, selftest_threads); hc_thread_wait (backend_ctx->backend_devices_cnt, selftest_threads);
hcfree (threads_param); hcfree (threads_param);
@ -760,11 +760,11 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx)
// check for any selftest failures // check for any selftest failures
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
if (backend_ctx->enabled == false) continue; if (backend_ctx->enabled == false) continue;
hc_device_param_t *device_param = backend_ctx->devices_param + device_id; hc_device_param_t *device_param = backend_ctx->devices_param + backend_devices_idx;
if (device_param->skipped == true) continue; if (device_param->skipped == true) continue;

File diff suppressed because it is too large Load Diff

@ -46,12 +46,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if (device_param->device_vendor_id == VENDOR_ID_AMD) if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -52,12 +52,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -53,12 +53,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -53,12 +53,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -47,12 +47,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if (device_param->device_vendor_id == VENDOR_ID_AMD) if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,12 +48,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if (device_param->device_vendor_id == VENDOR_ID_AMD) if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -96,7 +96,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
u32 overhead = 0; u32 overhead = 0;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
// note we need to use device_param->device_local_mem_size - 4 because opencl jit returns with: // note we need to use device_param->device_local_mem_size - 4 because opencl jit returns with:
// Entry function '...' uses too much shared data (0xc004 bytes, 0xc000 max) // Entry function '...' uses too much shared data (0xc004 bytes, 0xc000 max)

@ -258,12 +258,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -72,12 +72,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -79,7 +79,7 @@ u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault // amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{ {

@ -54,7 +54,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: password not found // amdgpu-pro-18.50-708488-ubuntu-18.04: password not found
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -54,7 +54,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: password not found // amdgpu-pro-18.50-708488-ubuntu-18.04: password not found
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -286,10 +286,10 @@ static void drupal7_encode (const u8 digest[64], u8 buf[43])
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
if (device_param->platform_vendor_id == VENDOR_ID_APPLE) if (device_param->opencl_platform_vendor_id == VENDOR_ID_APPLE)
{ {
// trap 6 // trap 6
if ((device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK) && (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU))
{ {
return true; return true;
} }

@ -60,7 +60,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_AMD) if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -53,7 +53,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault // amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -90,7 +90,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
u32 overhead = 0; u32 overhead = 0;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
overhead = 4; overhead = 4;
} }
@ -121,7 +121,7 @@ bool module_potfile_disable (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: Segmentation fault // OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: Segmentation fault
if (device_param->platform_vendor_id == VENDOR_ID_POCL) if (device_param->opencl_platform_vendor_id == VENDOR_ID_POCL)
{ {
return true; return true;
} }

@ -88,7 +88,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -88,7 +88,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: Segmentation fault // OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: Segmentation fault
if (device_param->platform_vendor_id == VENDOR_ID_POCL) if (device_param->opencl_platform_vendor_id == VENDOR_ID_POCL)
{ {
return true; return true;
} }

@ -109,13 +109,13 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: Segmentation fault // OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: Segmentation fault
if (device_param->platform_vendor_id == VENDOR_ID_POCL) if (device_param->opencl_platform_vendor_id == VENDOR_ID_POCL)
{ {
return true; return true;
} }
// l_opencl_p_18.1.0.013: password not found // l_opencl_p_18.1.0.013: password not found
if (device_param->device_vendor_id == VENDOR_ID_INTEL_SDK) if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{ {
@ -124,7 +124,7 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
} }
// amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault // amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1)
{ {
@ -133,7 +133,7 @@ bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE
} }
// amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed. // amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed.
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{ {

@ -52,12 +52,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -89,12 +89,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -62,7 +62,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -292,7 +292,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
@ -303,7 +303,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault // amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -44,7 +44,7 @@ const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig,
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{ {

@ -44,7 +44,7 @@ const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig,
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -44,7 +44,7 @@ const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig,
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -44,7 +44,7 @@ const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig,
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{ {

@ -44,7 +44,7 @@ const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig,
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -44,7 +44,7 @@ const char *module_st_pass (MAYBE_UNUSED const hashconfig_t *hashconfig,
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -90,7 +90,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_AMD) if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -72,12 +72,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -94,7 +94,7 @@ const char *module_benchmark_mask (MAYBE_UNUSED const hashconfig_t *hashconfig,
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed // amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -74,12 +74,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -74,12 +74,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -87,12 +87,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -76,7 +76,7 @@ u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{ {

@ -111,7 +111,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -59,7 +59,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault // amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 1)
{ {

@ -63,12 +63,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -100,7 +100,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed // amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -90,12 +90,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -248,7 +248,7 @@ u64 module_extra_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UN
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault // amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -100,7 +100,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed // amdgpu-pro-18.50-708488-ubuntu-18.04: self-test failed
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -80,12 +80,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -81,12 +81,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -80,12 +80,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -91,12 +91,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,7 +48,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
char *jit_build_options = NULL; char *jit_build_options = NULL;
// -Wpass-failed=transform-warning // -Wpass-failed=transform-warning
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,7 +48,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
char *jit_build_options = NULL; char *jit_build_options = NULL;
// -Wpass-failed=transform-warning // -Wpass-failed=transform-warning
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,7 +48,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
char *jit_build_options = NULL; char *jit_build_options = NULL;
// -Wpass-failed=transform-warning // -Wpass-failed=transform-warning
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,7 +48,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
char *jit_build_options = NULL; char *jit_build_options = NULL;
// -Wpass-failed=transform-warning // -Wpass-failed=transform-warning
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,7 +48,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
char *jit_build_options = NULL; char *jit_build_options = NULL;
// -Wpass-failed=transform-warning // -Wpass-failed=transform-warning
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,7 +48,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
char *jit_build_options = NULL; char *jit_build_options = NULL;
// -Wpass-failed=transform-warning // -Wpass-failed=transform-warning
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,7 +48,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
char *jit_build_options = NULL; char *jit_build_options = NULL;
// -Wpass-failed=transform-warning // -Wpass-failed=transform-warning
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -48,7 +48,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
char *jit_build_options = NULL; char *jit_build_options = NULL;
// -Wpass-failed=transform-warning // -Wpass-failed=transform-warning
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -53,7 +53,7 @@ int module_build_plain_postprocess (MAYBE_UNUSED const hashconfig_t *hashconfig,
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault // amdgpu-pro-18.50-708488-ubuntu-18.04: Segmentation fault
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
return true; return true;
} }

@ -78,7 +78,7 @@ u32 module_kernel_threads_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYB
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES // amdgpu-pro-18.50-708488-ubuntu-18.04: CL_OUT_OF_RESOURCES
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0)
{ {

@ -80,12 +80,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -82,7 +82,7 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
u32 overhead = 0; u32 overhead = 0;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
overhead = 4; overhead = 4;
} }
@ -123,7 +123,7 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con
bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param) bool module_unstable_warning (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hc_device_param_t *device_param)
{ {
// OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: self-test failed // OpenCL 1.2 pocl HSTR: pthread-x86_64-pc-linux-gnu-skylake: self-test failed
if (device_param->platform_vendor_id == VENDOR_ID_POCL) if (device_param->opencl_platform_vendor_id == VENDOR_ID_POCL)
{ {
return true; return true;
} }

@ -61,12 +61,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if ((device_param->device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false))
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -63,12 +63,12 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY
{ {
char *jit_build_options = NULL; char *jit_build_options = NULL;
if (device_param->device_vendor_id == VENDOR_ID_NV) if (device_param->opencl_device_vendor_id == VENDOR_ID_NV)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }
if (device_param->device_vendor_id == VENDOR_ID_AMD) if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
{ {
hc_asprintf (&jit_build_options, "-D NO_UNROLL"); hc_asprintf (&jit_build_options, "-D NO_UNROLL");
} }

@ -114,33 +114,33 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
{ {
hc_thread_mutex_lock (status_ctx->mux_hwmon); hc_thread_mutex_lock (status_ctx->mux_hwmon);
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) continue; if (device_param->skipped == true) continue;
if ((backend_ctx->devices_param[device_id].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue; if ((backend_ctx->devices_param[backend_devices_idx].opencl_device_type & CL_DEVICE_TYPE_GPU) == 0) continue;
const int temperature = hm_get_temperature_with_device_id (hashcat_ctx, device_id); const int temperature = hm_get_temperature_with_devices_idx (hashcat_ctx, backend_devices_idx);
if (temperature > (int) user_options->hwmon_temp_abort) if (temperature > (int) user_options->hwmon_temp_abort)
{ {
EVENT_DATA (EVENT_MONITOR_TEMP_ABORT, &device_id, sizeof (u32)); EVENT_DATA (EVENT_MONITOR_TEMP_ABORT, &backend_devices_idx, sizeof (int));
myabort (hashcat_ctx); myabort (hashcat_ctx);
} }
} }
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) continue; if (device_param->skipped == true) continue;
if (device_param->skipped_warning == true) continue; if (device_param->skipped_warning == true) continue;
const int rc_throttle = hm_get_throttle_with_device_id (hashcat_ctx, device_id); const int rc_throttle = hm_get_throttle_with_devices_idx (hashcat_ctx, backend_devices_idx);
if (rc_throttle == -1) continue; if (rc_throttle == -1) continue;
@ -148,9 +148,9 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
{ {
slowdown_warnings++; slowdown_warnings++;
if (slowdown_warnings == 1) EVENT_DATA (EVENT_MONITOR_THROTTLE1, &device_id, sizeof (u32)); if (slowdown_warnings == 1) EVENT_DATA (EVENT_MONITOR_THROTTLE1, &backend_devices_idx, sizeof (int));
if (slowdown_warnings == 2) EVENT_DATA (EVENT_MONITOR_THROTTLE2, &device_id, sizeof (u32)); if (slowdown_warnings == 2) EVENT_DATA (EVENT_MONITOR_THROTTLE2, &backend_devices_idx, sizeof (int));
if (slowdown_warnings == 3) EVENT_DATA (EVENT_MONITOR_THROTTLE3, &device_id, sizeof (u32)); if (slowdown_warnings == 3) EVENT_DATA (EVENT_MONITOR_THROTTLE3, &backend_devices_idx, sizeof (int));
} }
else else
{ {
@ -232,9 +232,9 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
hc_thread_mutex_lock (status_ctx->mux_hwmon); hc_thread_mutex_lock (status_ctx->mux_hwmon);
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) continue; if (device_param->skipped == true) continue;
@ -242,11 +242,11 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
exec_cnt++; exec_cnt++;
const double exec = status_get_exec_msec_dev (hashcat_ctx, device_id); const double exec = status_get_exec_msec_dev (hashcat_ctx, backend_devices_idx);
exec_total += exec; exec_total += exec;
const int util = hm_get_utilization_with_device_id (hashcat_ctx, device_id); const int util = hm_get_utilization_with_devices_idx (hashcat_ctx, backend_devices_idx);
if (util == -1) continue; if (util == -1) continue;

@ -202,30 +202,30 @@ int status_get_device_info_cnt (const hashcat_ctx_t *hashcat_ctx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
return backend_ctx->devices_cnt; return backend_ctx->backend_devices_cnt;
} }
int status_get_device_info_active (const hashcat_ctx_t *hashcat_ctx) int status_get_device_info_active (const hashcat_ctx_t *hashcat_ctx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
return backend_ctx->devices_active; return backend_ctx->backend_devices_active;
} }
bool status_get_skipped_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) bool status_get_skipped_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
return device_param->skipped; return device_param->skipped;
} }
bool status_get_skipped_warning_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) bool status_get_skipped_warning_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
return device_param->skipped_warning; return device_param->skipped_warning;
} }
@ -833,7 +833,7 @@ int status_get_guess_mask_length (const hashcat_ctx_t *hashcat_ctx)
return mp_get_length (mask_ctx->mask); return mp_get_length (mask_ctx->mask);
} }
char *status_get_guess_candidates_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) char *status_get_guess_candidates_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const hashconfig_t *hashconfig = hashcat_ctx->hashconfig; const hashconfig_t *hashconfig = hashcat_ctx->hashconfig;
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
@ -842,7 +842,7 @@ char *status_get_guess_candidates_dev (const hashcat_ctx_t *hashcat_ctx, const i
if (status_ctx->accessible == false) return NULL; if (status_ctx->accessible == false) return NULL;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
char *display = (char *) hcmalloc (HCBUFSIZ_TINY); char *display = (char *) hcmalloc (HCBUFSIZ_TINY);
@ -1414,22 +1414,22 @@ double status_get_hashes_msec_all (const hashcat_ctx_t *hashcat_ctx)
double hashes_all_msec = 0; double hashes_all_msec = 0;
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
hashes_all_msec += status_get_hashes_msec_dev (hashcat_ctx, device_id); hashes_all_msec += status_get_hashes_msec_dev (hashcat_ctx, backend_devices_idx);
} }
return hashes_all_msec; return hashes_all_msec;
} }
double status_get_hashes_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) double status_get_hashes_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
u64 speed_cnt = 0; u64 speed_cnt = 0;
double speed_msec = 0; double speed_msec = 0;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if ((device_param->skipped == false) && (device_param->skipped_warning == false)) if ((device_param->skipped == false) && (device_param->skipped_warning == false))
{ {
@ -1455,7 +1455,7 @@ double status_get_hashes_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int d
return hashes_dev_msec; return hashes_dev_msec;
} }
double status_get_hashes_msec_dev_benchmark (const hashcat_ctx_t *hashcat_ctx, const int device_id) double status_get_hashes_msec_dev_benchmark (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
// this function increases accuracy for benchmark modes // this function increases accuracy for benchmark modes
@ -1464,7 +1464,7 @@ double status_get_hashes_msec_dev_benchmark (const hashcat_ctx_t *hashcat_ctx, c
u64 speed_cnt = 0; u64 speed_cnt = 0;
double speed_msec = 0; double speed_msec = 0;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if ((device_param->skipped == false) && (device_param->skipped_warning == false)) if ((device_param->skipped == false) && (device_param->skipped_warning == false))
{ {
@ -1490,19 +1490,19 @@ double status_get_exec_msec_all (const hashcat_ctx_t *hashcat_ctx)
double exec_all_msec = 0; double exec_all_msec = 0;
for (u32 device_id = 0; device_id < backend_ctx->devices_cnt; device_id++) for (int backend_devices_idx = 0; backend_devices_idx < backend_ctx->backend_devices_cnt; backend_devices_idx++)
{ {
exec_all_msec += status_get_exec_msec_dev (hashcat_ctx, device_id); exec_all_msec += status_get_exec_msec_dev (hashcat_ctx, backend_devices_idx);
} }
return exec_all_msec; return exec_all_msec;
} }
double status_get_exec_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) double status_get_exec_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
double exec_dev_msec = 0; double exec_dev_msec = 0;
@ -1525,9 +1525,9 @@ char *status_get_speed_sec_all (const hashcat_ctx_t *hashcat_ctx)
return display; return display;
} }
char *status_get_speed_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) char *status_get_speed_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const double hashes_msec_dev = status_get_hashes_msec_dev (hashcat_ctx, device_id); const double hashes_msec_dev = status_get_hashes_msec_dev (hashcat_ctx, backend_devices_idx);
char *display = (char *) hcmalloc (HCBUFSIZ_TINY); char *display = (char *) hcmalloc (HCBUFSIZ_TINY);
@ -1698,11 +1698,11 @@ char *status_get_cpt (const hashcat_ctx_t *hashcat_ctx)
return cpt; return cpt;
} }
int status_get_salt_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_salt_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
int salt_pos = 0; int salt_pos = 0;
@ -1714,11 +1714,11 @@ int status_get_salt_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_
return salt_pos; return salt_pos;
} }
int status_get_innerloop_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_innerloop_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
int innerloop_pos = 0; int innerloop_pos = 0;
@ -1730,11 +1730,11 @@ int status_get_innerloop_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int de
return innerloop_pos; return innerloop_pos;
} }
int status_get_innerloop_left_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_innerloop_left_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
int innerloop_left = 0; int innerloop_left = 0;
@ -1746,11 +1746,11 @@ int status_get_innerloop_left_dev (const hashcat_ctx_t *hashcat_ctx, const int d
return innerloop_left; return innerloop_left;
} }
int status_get_iteration_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_iteration_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
int iteration_pos = 0; int iteration_pos = 0;
@ -1762,11 +1762,11 @@ int status_get_iteration_pos_dev (const hashcat_ctx_t *hashcat_ctx, const int de
return iteration_pos; return iteration_pos;
} }
int status_get_iteration_left_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_iteration_left_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
int iteration_left = 0; int iteration_left = 0;
@ -1779,11 +1779,11 @@ int status_get_iteration_left_dev (const hashcat_ctx_t *hashcat_ctx, const int d
} }
#ifdef WITH_BRAIN #ifdef WITH_BRAIN
int status_get_brain_link_client_id_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_brain_link_client_id_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
int brain_client_id = -1; int brain_client_id = -1;
@ -1795,11 +1795,11 @@ int status_get_brain_link_client_id_dev (const hashcat_ctx_t *hashcat_ctx, const
return brain_client_id; return brain_client_id;
} }
int status_get_brain_link_status_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_brain_link_status_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
int brain_link_status_dev = 0; int brain_link_status_dev = 0;
@ -1813,11 +1813,11 @@ int status_get_brain_link_status_dev (const hashcat_ctx_t *hashcat_ctx, const in
return brain_link_status_dev; return brain_link_status_dev;
} }
char *status_get_brain_link_recv_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) char *status_get_brain_link_recv_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
u64 brain_link_recv_bytes = 0; u64 brain_link_recv_bytes = 0;
@ -1833,11 +1833,11 @@ char *status_get_brain_link_recv_bytes_dev (const hashcat_ctx_t *hashcat_ctx, co
return display; return display;
} }
char *status_get_brain_link_send_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) char *status_get_brain_link_send_bytes_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
u64 brain_link_send_bytes = 0; u64 brain_link_send_bytes = 0;
@ -1853,11 +1853,11 @@ char *status_get_brain_link_send_bytes_dev (const hashcat_ctx_t *hashcat_ctx, co
return display; return display;
} }
char *status_get_brain_link_recv_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) char *status_get_brain_link_recv_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
u64 brain_link_recv_bytes = 0; u64 brain_link_recv_bytes = 0;
@ -1880,11 +1880,11 @@ char *status_get_brain_link_recv_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx
return display; return display;
} }
char *status_get_brain_link_send_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) char *status_get_brain_link_send_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
u64 brain_link_send_bytes = 0; u64 brain_link_send_bytes = 0;
@ -1908,11 +1908,11 @@ char *status_get_brain_link_send_bytes_sec_dev (const hashcat_ctx_t *hashcat_ctx
} }
#endif #endif
char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
char *output_buf = (char *) hcmalloc (HCBUFSIZ_TINY); char *output_buf = (char *) hcmalloc (HCBUFSIZ_TINY);
@ -1926,12 +1926,12 @@ char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_i
hc_thread_mutex_lock (status_ctx->mux_hwmon); hc_thread_mutex_lock (status_ctx->mux_hwmon);
const int num_temperature = hm_get_temperature_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id); const int num_temperature = hm_get_temperature_with_devices_idx ((hashcat_ctx_t *) hashcat_ctx, backend_devices_idx);
const int num_fanspeed = hm_get_fanspeed_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id); const int num_fanspeed = hm_get_fanspeed_with_devices_idx ((hashcat_ctx_t *) hashcat_ctx, backend_devices_idx);
const int num_utilization = hm_get_utilization_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id); const int num_utilization = hm_get_utilization_with_devices_idx ((hashcat_ctx_t *) hashcat_ctx, backend_devices_idx);
const int num_corespeed = hm_get_corespeed_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id); const int num_corespeed = hm_get_corespeed_with_devices_idx ((hashcat_ctx_t *) hashcat_ctx, backend_devices_idx);
const int num_memoryspeed = hm_get_memoryspeed_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id); const int num_memoryspeed = hm_get_memoryspeed_with_devices_idx ((hashcat_ctx_t *) hashcat_ctx, backend_devices_idx);
const int num_buslanes = hm_get_buslanes_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id); const int num_buslanes = hm_get_buslanes_with_devices_idx ((hashcat_ctx_t *) hashcat_ctx, backend_devices_idx);
int output_len = 0; int output_len = 0;
@ -1981,11 +1981,11 @@ char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_i
return output_buf; return output_buf;
} }
int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) return -1; if (device_param->skipped == true) return -1;
@ -1995,18 +1995,18 @@ int status_get_corespeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device
hc_thread_mutex_lock (status_ctx->mux_hwmon); hc_thread_mutex_lock (status_ctx->mux_hwmon);
const int num_corespeed = hm_get_corespeed_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id); const int num_corespeed = hm_get_corespeed_with_devices_idx ((hashcat_ctx_t *) hashcat_ctx, backend_devices_idx);
hc_thread_mutex_unlock (status_ctx->mux_hwmon); hc_thread_mutex_unlock (status_ctx->mux_hwmon);
return num_corespeed; return num_corespeed;
} }
int status_get_memoryspeed_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_memoryspeed_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) return -1; if (device_param->skipped == true) return -1;
@ -2016,18 +2016,18 @@ int status_get_memoryspeed_dev (const hashcat_ctx_t *hashcat_ctx, const int devi
hc_thread_mutex_lock (status_ctx->mux_hwmon); hc_thread_mutex_lock (status_ctx->mux_hwmon);
const int num_memoryspeed = hm_get_memoryspeed_with_device_id ((hashcat_ctx_t *) hashcat_ctx, device_id); const int num_memoryspeed = hm_get_memoryspeed_with_devices_idx ((hashcat_ctx_t *) hashcat_ctx, backend_devices_idx);
hc_thread_mutex_unlock (status_ctx->mux_hwmon); hc_thread_mutex_unlock (status_ctx->mux_hwmon);
return num_memoryspeed; return num_memoryspeed;
} }
u64 status_get_progress_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) u64 status_get_progress_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) return 0; if (device_param->skipped == true) return 0;
@ -2036,11 +2036,11 @@ u64 status_get_progress_dev (const hashcat_ctx_t *hashcat_ctx, const int device_
return device_param->outerloop_left; return device_param->outerloop_left;
} }
double status_get_runtime_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) double status_get_runtime_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) return 0; if (device_param->skipped == true) return 0;
@ -2049,11 +2049,11 @@ double status_get_runtime_msec_dev (const hashcat_ctx_t *hashcat_ctx, const int
return device_param->outerloop_msec; return device_param->outerloop_msec;
} }
int status_get_kernel_accel_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_kernel_accel_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) return 0; if (device_param->skipped == true) return 0;
@ -2064,11 +2064,11 @@ int status_get_kernel_accel_dev (const hashcat_ctx_t *hashcat_ctx, const int dev
return device_param->kernel_accel; return device_param->kernel_accel;
} }
int status_get_kernel_loops_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_kernel_loops_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) return 0; if (device_param->skipped == true) return 0;
@ -2079,11 +2079,11 @@ int status_get_kernel_loops_dev (const hashcat_ctx_t *hashcat_ctx, const int dev
return device_param->kernel_loops; return device_param->kernel_loops;
} }
int status_get_kernel_threads_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_kernel_threads_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) return 0; if (device_param->skipped == true) return 0;
@ -2092,11 +2092,11 @@ int status_get_kernel_threads_dev (const hashcat_ctx_t *hashcat_ctx, const int d
return device_param->kernel_threads; return device_param->kernel_threads;
} }
int status_get_vector_width_dev (const hashcat_ctx_t *hashcat_ctx, const int device_id) int status_get_vector_width_dev (const hashcat_ctx_t *hashcat_ctx, const int backend_devices_idx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
hc_device_param_t *device_param = &backend_ctx->devices_param[device_id]; hc_device_param_t *device_param = &backend_ctx->devices_param[backend_devices_idx];
if (device_param->skipped == true) return 0; if (device_param->skipped == true) return 0;

@ -658,59 +658,96 @@ void opencl_info (hashcat_ctx_t *hashcat_ctx)
{ {
const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx; const backend_ctx_t *backend_ctx = hashcat_ctx->backend_ctx;
event_log_info (hashcat_ctx, "OpenCL Info:"); if (backend_ctx->cuda)
event_log_info (hashcat_ctx, NULL); {
event_log_info (hashcat_ctx, "CUDA Info:");
cl_uint platforms_cnt = backend_ctx->platforms_cnt; event_log_info (hashcat_ctx, "==========");
cl_platform_id *platforms = backend_ctx->platforms; event_log_info (hashcat_ctx, NULL);
char **platforms_vendor = backend_ctx->platforms_vendor;
char **platforms_name = backend_ctx->platforms_name; int cuda_devices_cnt = backend_ctx->cuda_devices_cnt;
char **platforms_version = backend_ctx->platforms_version; int cuda_driver_version = backend_ctx->cuda_driver_version;
cl_uint devices_cnt = backend_ctx->devices_cnt;
event_log_info (hashcat_ctx, " CUDA.Version.: %d.%d", cuda_driver_version / 1000, (cuda_driver_version % 100) / 10);
for (cl_uint platforms_idx = 0; platforms_idx < platforms_cnt; platforms_idx++) event_log_info (hashcat_ctx, NULL);
{
cl_platform_id platform_id = platforms[platforms_idx]; for (int cuda_devices_idx = 0; cuda_devices_idx < cuda_devices_cnt; cuda_devices_idx++)
char *platform_vendor = platforms_vendor[platforms_idx]; {
char *platform_name = platforms_name[platforms_idx]; const int backend_devices_idx = backend_ctx->backend_device_from_cuda[cuda_devices_idx];
char *platform_version = platforms_version[platforms_idx];
const hc_device_param_t *device_param = backend_ctx->devices_param + backend_devices_idx;
event_log_info (hashcat_ctx, "Platform ID #%u", platforms_idx + 1);
event_log_info (hashcat_ctx, " Vendor : %s", platform_vendor); int device_id = device_param->device_id;
event_log_info (hashcat_ctx, " Name : %s", platform_name); char *device_name = device_param->device_name;
event_log_info (hashcat_ctx, " Version : %s", platform_version); u32 device_processors = device_param->device_processors;
u32 device_maxclock_frequency = device_param->device_maxclock_frequency;
u64 device_global_mem = device_param->device_global_mem;
event_log_info (hashcat_ctx, " Backend Device ID #%d", device_id + 1);
event_log_info (hashcat_ctx, " Name...........: %s", device_name);
event_log_info (hashcat_ctx, " Processor(s)...: %u", device_processors);
event_log_info (hashcat_ctx, " Clock..........: %u", device_maxclock_frequency);
event_log_info (hashcat_ctx, " Memory.........: %" PRIu64 " MB", device_global_mem / 1024 / 1024);
event_log_info (hashcat_ctx, NULL);
}
}
if (backend_ctx->ocl)
{
event_log_info (hashcat_ctx, "OpenCL Info:");
event_log_info (hashcat_ctx, "============");
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
for (cl_uint devices_idx = 0; devices_idx < devices_cnt; devices_idx++) cl_uint opencl_platforms_cnt = backend_ctx->opencl_platforms_cnt;
cl_uint *opencl_platforms_devices_cnt = backend_ctx->opencl_platforms_devices_cnt;
char **opencl_platforms_name = backend_ctx->opencl_platforms_name;
char **opencl_platforms_vendor = backend_ctx->opencl_platforms_vendor;
char **opencl_platforms_version = backend_ctx->opencl_platforms_version;
for (cl_uint opencl_platforms_idx = 0; opencl_platforms_idx < opencl_platforms_cnt; opencl_platforms_idx++)
{ {
const hc_device_param_t *device_param = backend_ctx->devices_param + devices_idx; char *opencl_platform_vendor = opencl_platforms_vendor[opencl_platforms_idx];
char *opencl_platform_name = opencl_platforms_name[opencl_platforms_idx];
if (device_param->platform != platform_id) continue; char *opencl_platform_version = opencl_platforms_version[opencl_platforms_idx];
cl_uint opencl_platform_devices_cnt = opencl_platforms_devices_cnt[opencl_platforms_idx];
cl_device_type opencl_device_type = device_param->opencl_device_type;
cl_uint device_vendor_id = device_param->device_vendor_id; event_log_info (hashcat_ctx, "OpenCL Platform ID #%u", opencl_platforms_idx + 1);
char *device_vendor = device_param->device_vendor; event_log_info (hashcat_ctx, " Vendor..: %s", opencl_platform_vendor);
char *device_name = device_param->device_name; event_log_info (hashcat_ctx, " Name....: %s", opencl_platform_name);
u32 device_processors = device_param->device_processors; event_log_info (hashcat_ctx, " Version.: %s", opencl_platform_version);
u32 device_maxclock_frequency = device_param->device_maxclock_frequency;
u64 device_maxmem_alloc = device_param->device_maxmem_alloc;
u64 device_global_mem = device_param->device_global_mem;
char *device_opencl_version = device_param->device_opencl_version;
char *device_version = device_param->device_version;
char *driver_version = device_param->driver_version;
event_log_info (hashcat_ctx, " Device ID #%u", devices_idx + 1);
event_log_info (hashcat_ctx, " Type : %s", ((opencl_device_type & CL_DEVICE_TYPE_CPU) ? "CPU" : ((opencl_device_type & CL_DEVICE_TYPE_GPU) ? "GPU" : "Accelerator")));
event_log_info (hashcat_ctx, " Vendor ID : %u", device_vendor_id);
event_log_info (hashcat_ctx, " Vendor : %s", device_vendor);
event_log_info (hashcat_ctx, " Name : %s", device_name);
event_log_info (hashcat_ctx, " Version : %s", device_version);
event_log_info (hashcat_ctx, " Processor(s) : %u", device_processors);
event_log_info (hashcat_ctx, " Clock : %u", device_maxclock_frequency);
event_log_info (hashcat_ctx, " Memory : %" PRIu64 "/%" PRIu64 " MB allocatable", device_maxmem_alloc / 1024 / 1024, device_global_mem / 1024 / 1024);
event_log_info (hashcat_ctx, " OpenCL Version : %s", device_opencl_version);
event_log_info (hashcat_ctx, " Driver Version : %s", driver_version);
event_log_info (hashcat_ctx, NULL); event_log_info (hashcat_ctx, NULL);
for (cl_uint opencl_platform_devices_idx = 0; opencl_platform_devices_idx < opencl_platform_devices_cnt; opencl_platform_devices_idx++)
{
const int backend_devices_idx = backend_ctx->backend_device_from_opencl_platform[opencl_platforms_idx][opencl_platform_devices_idx];
const hc_device_param_t *device_param = backend_ctx->devices_param + backend_devices_idx;
int device_id = device_param->device_id;
char *device_name = device_param->device_name;
u32 device_processors = device_param->device_processors;
u32 device_maxclock_frequency = device_param->device_maxclock_frequency;
u64 device_maxmem_alloc = device_param->device_maxmem_alloc;
u64 device_global_mem = device_param->device_global_mem;
cl_device_type opencl_device_type = device_param->opencl_device_type;
cl_uint opencl_device_vendor_id = device_param->opencl_device_vendor_id;
char *opencl_device_vendor = device_param->opencl_device_vendor;
char *opencl_device_c_version = device_param->opencl_device_c_version;
char *opencl_device_version = device_param->opencl_device_version;
char *opencl_driver_version = device_param->opencl_driver_version;
event_log_info (hashcat_ctx, " Backend Device ID #%d", device_id + 1);
event_log_info (hashcat_ctx, " Type...........: %s", ((opencl_device_type & CL_DEVICE_TYPE_CPU) ? "CPU" : ((opencl_device_type & CL_DEVICE_TYPE_GPU) ? "GPU" : "Accelerator")));
event_log_info (hashcat_ctx, " Vendor.ID......: %u", opencl_device_vendor_id);
event_log_info (hashcat_ctx, " Vendor.........: %s", opencl_device_vendor);
event_log_info (hashcat_ctx, " Name...........: %s", device_name);
event_log_info (hashcat_ctx, " Version........: %s", opencl_device_version);
event_log_info (hashcat_ctx, " Processor(s)...: %u", device_processors);
event_log_info (hashcat_ctx, " Clock..........: %u", device_maxclock_frequency);
event_log_info (hashcat_ctx, " Memory.........: %" PRIu64 "/%" PRIu64 " MB allocatable", device_maxmem_alloc / 1024 / 1024, device_global_mem / 1024 / 1024);
event_log_info (hashcat_ctx, " OpenCL.Version.: %s", opencl_device_c_version);
event_log_info (hashcat_ctx, " Driver.Version.: %s", opencl_driver_version);
event_log_info (hashcat_ctx, NULL);
}
} }
} }
} }
@ -724,21 +761,21 @@ void opencl_info_compact (hashcat_ctx_t *hashcat_ctx)
if (user_options->machine_readable == true) return; if (user_options->machine_readable == true) return;
if (user_options->status_json == true) return; if (user_options->status_json == true) return;
cl_uint platforms_cnt = backend_ctx->platforms_cnt; cl_uint opencl_platforms_cnt = backend_ctx->opencl_platforms_cnt;
cl_platform_id *platforms = backend_ctx->platforms; cl_platform_id *opencl_platforms = backend_ctx->opencl_platforms;
char **platforms_vendor = backend_ctx->platforms_vendor; char **opencl_platforms_vendor = backend_ctx->opencl_platforms_vendor;
bool *platforms_skipped = backend_ctx->platforms_skipped; bool *opencl_platforms_skipped = backend_ctx->opencl_platforms_skipped;
cl_uint devices_cnt = backend_ctx->devices_cnt; cl_uint opencl_devices_cnt = backend_ctx->opencl_devices_cnt;
for (cl_uint platforms_idx = 0; platforms_idx < platforms_cnt; platforms_idx++) for (cl_uint opencl_platforms_idx = 0; opencl_platforms_idx < opencl_platforms_cnt; opencl_platforms_idx++)
{ {
cl_platform_id platform_id = platforms[platforms_idx]; cl_platform_id opencl_platform_id = opencl_platforms[opencl_platforms_idx];
char *platform_vendor = platforms_vendor[platforms_idx]; char *opencl_platform_vendor = opencl_platforms_vendor[opencl_platforms_idx];
bool platform_skipped = platforms_skipped[platforms_idx]; bool opencl_platform_skipped = opencl_platforms_skipped[opencl_platforms_idx];
if (platform_skipped == false) if (opencl_platform_skipped == false)
{ {
const size_t len = event_log_info (hashcat_ctx, "OpenCL Platform #%u: %s", platforms_idx + 1, platform_vendor); const size_t len = event_log_info (hashcat_ctx, "OpenCL Platform #%u: %s", opencl_platforms_idx + 1, opencl_platform_vendor);
char line[HCBUFSIZ_TINY]; char line[HCBUFSIZ_TINY];
@ -750,14 +787,14 @@ void opencl_info_compact (hashcat_ctx_t *hashcat_ctx)
} }
else else
{ {
event_log_info (hashcat_ctx, "OpenCL Platform #%u: %s, skipped or no OpenCL compatible devices found.", platforms_idx + 1, platform_vendor); event_log_info (hashcat_ctx, "OpenCL Platform #%u: %s, skipped or no OpenCL compatible devices found.", opencl_platforms_idx + 1, opencl_platform_vendor);
} }
for (cl_uint devices_idx = 0; devices_idx < devices_cnt; devices_idx++) for (cl_uint opencl_devices_idx = 0; opencl_devices_idx < opencl_devices_cnt; opencl_devices_idx++)
{ {
const hc_device_param_t *device_param = backend_ctx->devices_param + devices_idx; const hc_device_param_t *device_param = backend_ctx->devices_param + opencl_devices_idx;
if (device_param->platform != platform_id) continue; if (device_param->opencl_platform != opencl_platform_id) continue;
char *device_name = device_param->device_name; char *device_name = device_param->device_name;
u32 device_processors = device_param->device_processors; u32 device_processors = device_param->device_processors;
@ -767,7 +804,7 @@ void opencl_info_compact (hashcat_ctx_t *hashcat_ctx)
if ((device_param->skipped == false) && (device_param->skipped_warning == false)) if ((device_param->skipped == false) && (device_param->skipped_warning == false))
{ {
event_log_info (hashcat_ctx, "* Device #%u: %s, %" PRIu64 "/%" PRIu64 " MB allocatable, %uMCU", event_log_info (hashcat_ctx, "* Device #%u: %s, %" PRIu64 "/%" PRIu64 " MB allocatable, %uMCU",
devices_idx + 1, opencl_devices_idx + 1,
device_name, device_name,
device_maxmem_alloc / 1024 / 1024, device_maxmem_alloc / 1024 / 1024,
device_global_mem / 1024 / 1024, device_global_mem / 1024 / 1024,
@ -776,7 +813,7 @@ void opencl_info_compact (hashcat_ctx_t *hashcat_ctx)
else else
{ {
event_log_info (hashcat_ctx, "* Device #%u: %s, skipped.", event_log_info (hashcat_ctx, "* Device #%u: %s, skipped.",
devices_idx + 1, opencl_devices_idx + 1,
device_name); device_name);
} }
} }
@ -851,7 +888,7 @@ void status_display_machine_readable (hashcat_ctx_t *hashcat_ctx)
if (device_info->skipped_warning_dev == true) continue; if (device_info->skipped_warning_dev == true) continue;
const int temp = hm_get_temperature_with_device_id (hashcat_ctx, device_id); const int temp = hm_get_temperature_with_devices_idx (hashcat_ctx, device_id);
printf ("%d\t", temp); printf ("%d\t", temp);
} }
@ -871,7 +908,7 @@ void status_display_machine_readable (hashcat_ctx_t *hashcat_ctx)
// ok, little cheat here again... // ok, little cheat here again...
const int util = hm_get_utilization_with_device_id (hashcat_ctx, device_id); const int util = hm_get_utilization_with_devices_idx (hashcat_ctx, device_id);
printf ("%d\t", util); printf ("%d\t", util);
} }
@ -948,12 +985,12 @@ void status_display_status_json (hashcat_ctx_t *hashcat_ctx)
if (hwmon_ctx->enabled == true) if (hwmon_ctx->enabled == true)
{ {
const int temp = hm_get_temperature_with_device_id (hashcat_ctx, device_id); const int temp = hm_get_temperature_with_devices_idx (hashcat_ctx, device_id);
printf (" \"temp\": %d,", temp); printf (" \"temp\": %d,", temp);
} }
const int util = hm_get_utilization_with_device_id (hashcat_ctx, device_id); const int util = hm_get_utilization_with_devices_idx (hashcat_ctx, device_id);
printf (" \"util\": %d }", util); printf (" \"util\": %d }", util);

Loading…
Cancel
Save