From 8039290cd0d2a0b06240038548b413df037df4a4 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Mon, 6 Jan 2020 13:36:17 +0100 Subject: [PATCH] Update -m 10700 unstable warning and disable JiT compiler optimization for AMD GPU PRO, too --- src/Makefile | 2 +- src/modules/module_10700.c | 20 ++++++++------------ 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/Makefile b/src/Makefile index f61c6e641..a922a2362 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,7 +4,7 @@ ## SHARED := 0 -DEBUG := 1 +DEBUG := 0 PRODUCTION := 0 PRODUCTION_VERSION := v5.1.0 ENABLE_BRAIN := 1 diff --git a/src/modules/module_10700.c b/src/modules/module_10700.c index c885098b6..5dfa6f6a5 100644 --- a/src/modules/module_10700.c +++ b/src/modules/module_10700.c @@ -106,21 +106,17 @@ u32 module_pw_max (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED con return pw_max; } -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. - if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) - { - return true; - } - - return false; -} - char *module_jit_build_options (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 hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param) { char *jit_build_options = NULL; + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == false)) + { + // this is a workaround to avoid a Segmentation fault and self-test fails on AMD GPU PRO + + hc_asprintf (&jit_build_options, "-cl-opt-disable"); + } + if ((device_param->opencl_device_vendor_id == VENDOR_ID_AMD) && (device_param->has_vperm == true)) { if ((hashconfig->opti_type & OPTI_TYPE_OPTIMIZED_KERNEL) == 0) @@ -378,6 +374,6 @@ void module_init (module_ctx_t *module_ctx) module_ctx->module_st_hash = module_st_hash; module_ctx->module_st_pass = module_st_pass; module_ctx->module_tmp_size = module_tmp_size; - module_ctx->module_unstable_warning = module_unstable_warning; + module_ctx->module_unstable_warning = MODULE_DEFAULT; module_ctx->module_warmup_disable = MODULE_DEFAULT; }