From 21ec4878681498d73495ea20d13173c8182f5678 Mon Sep 17 00:00:00 2001 From: wilfChen Date: Sat, 9 Apr 2022 09:42:41 +0800 Subject: [PATCH] fix cuda10 cusparse library link issue --- .../plugin/device/gpu/hal/device/gpu_common.h | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/mindspore/ccsrc/plugin/device/gpu/hal/device/gpu_common.h b/mindspore/ccsrc/plugin/device/gpu/hal/device/gpu_common.h index b73e3a0347..483ea83ed2 100644 --- a/mindspore/ccsrc/plugin/device/gpu/hal/device/gpu_common.h +++ b/mindspore/ccsrc/plugin/device/gpu/hal/device/gpu_common.h @@ -209,22 +209,20 @@ namespace gpu { } \ } -#define CHECK_CUSPARSE_RET_WITH_ERROR(expression, message) \ - do { \ - cusparseStatus_t result = (expression); \ - if (result != CUSPARSE_STATUS_SUCCESS) { \ - MS_LOG(ERROR) << "cusparse Error: " << message << " | Error Code: " << result \ - << "| Error String: " << cusparseGetErrorString(result); \ - } \ +#define CHECK_CUSPARSE_RET_WITH_ERROR(expression, message) \ + do { \ + cusparseStatus_t result = (expression); \ + if (result != CUSPARSE_STATUS_SUCCESS) { \ + MS_LOG(ERROR) << "cusparse Error: " << message << " | Error Code: " << result; \ + } \ } while (0) -#define CHECK_CUSPARSE_RET_WITH_EXCEPT(expression, message) \ - do { \ - cusparseStatus_t result = (expression); \ - if (result != CUSPARSE_STATUS_SUCCESS) { \ - MS_LOG(EXCEPTION) << "cusparse Error: " << message << " | Error Code: " << result \ - << "| Error String: " << cusparseGetErrorString(result); \ - } \ +#define CHECK_CUSPARSE_RET_WITH_EXCEPT(expression, message) \ + do { \ + cusparseStatus_t result = (expression); \ + if (result != CUSPARSE_STATUS_SUCCESS) { \ + MS_LOG(EXCEPTION) << "cusparse Error: " << message << " | Error Code: " << result; \ + } \ } while (0) #define VARIABLE_NOT_USED(var) \