From 68b1ea4b68e03a2d16aad2013186b3dec169d553 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 28 Jan 2018 20:14:25 +0100 Subject: [PATCH] OpenCL Runtime: Updated rocm detection --- docs/changes.txt | 1 + src/opencl.c | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 0703e8ff7..76e561f28 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -48,6 +48,7 @@ - Files: Switched back to relative current working directory on windows to work around problems with unicode characters - Hash Parser: Changed the way large strings are handled/truncated within the event buffer if they are too large to fit - Hash Parser: Fixed the use of strtok_r () calls +- OpenCL Runtime: Updated rocm detection - OpenCL Kernels: Replace variables from uXX to uXXa if used in __constant space - OpenCL Kernels: Use a special kernel to initialize the password buffer used during autotune measurements, to reduce startup time - OpenCL Kernels: Use static declaraction for uXXa variables used in __constant space diff --git a/src/opencl.c b/src/opencl.c index b82fd048a..105204813 100644 --- a/src/opencl.c +++ b/src/opencl.c @@ -3231,14 +3231,11 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) // check for AMD ROCm driver (only available on linux) - const char *t1 = strstr (device_param->driver_version, "(HSA,LC)"); - const char *t2 = strstr (device_param->driver_version, "(PAL,LC)"); - const char *t3 = strstr (device_param->driver_version, "(PAL,HSAIL)"); - const char *t4 = strstr (device_param->driver_version, "(HSA, LC)"); - const char *t5 = strstr (device_param->driver_version, "(PAL, LC)"); - const char *t6 = strstr (device_param->driver_version, "(PAL, HSAIL)"); + const char *t1 = strstr (device_param->driver_version, "HSA"); + const char *t2 = strstr (device_param->driver_version, "LC"); + const char *t3 = strstr (device_param->driver_version, "PAL"); - if ((t1 == NULL) && (t2 == NULL) && (t3 == NULL) && (t4 == NULL) && (t5 == NULL) && (t6 == NULL)) + if ((t1 == NULL) && (t2 == NULL) && (t3 == NULL)) { device_param->is_rocm = false; } @@ -3252,6 +3249,8 @@ int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime) device_param->is_rocm = false; #endif + +printf ("%d\n", device_param->is_rocm); } if ((device_param->platform_vendor_id == VENDOR_ID_NV) && (device_param->device_vendor_id == VENDOR_ID_NV))