From ae44a3022b383276ea12775646ad88c2422b8870 Mon Sep 17 00:00:00 2001 From: Jukka Ojanen Date: Tue, 27 Jul 2021 13:00:39 +0300 Subject: [PATCH] Use fast event to synchronize selftest() --- src/selftest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/selftest.c b/src/selftest.c index 77ad8f23b..d5fff9433 100644 --- a/src/selftest.c +++ b/src/selftest.c @@ -695,14 +695,14 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param { if (hc_cuMemcpyDtoHAsync (hashcat_ctx, &num_cracked, device_param->cuda_d_result, sizeof (u32), device_param->cuda_stream) == -1) return -1; - if (hc_cuEventRecord (hashcat_ctx, device_param->cuda_event1, device_param->cuda_stream) == -1) return -1; + if (hc_cuEventRecord (hashcat_ctx, device_param->cuda_event3, device_param->cuda_stream) == -1) return -1; } if (device_param->is_hip == true) { if (hc_hipMemcpyDtoHAsync (hashcat_ctx, &num_cracked, device_param->hip_d_result, sizeof (u32), device_param->hip_stream) == -1) return -1; - if (hc_hipEventRecord (hashcat_ctx, device_param->hip_event1, device_param->hip_stream) == -1) return -1; + if (hc_hipEventRecord (hashcat_ctx, device_param->hip_event3, device_param->hip_stream) == -1) return -1; } if (device_param->is_opencl == true) @@ -837,12 +837,12 @@ static int selftest (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param // synchronize and .. if (device_param->is_cuda == true) { - if (hc_cuEventSynchronize (hashcat_ctx, device_param->cuda_event1) == -1) return -1; + if (hc_cuEventSynchronize (hashcat_ctx, device_param->cuda_event3) == -1) return -1; } if (device_param->is_hip == true) { - if (hc_hipEventSynchronize (hashcat_ctx, device_param->hip_event1) == -1) return -1; + if (hc_hipEventSynchronize (hashcat_ctx, device_param->hip_event3) == -1) return -1; } if (device_param->is_opencl == true)