From 0e19aeb91c2136acd187cefa8632fd22899174a0 Mon Sep 17 00:00:00 2001 From: Liu-xiandong <85323580+Liu-xiandong@users.noreply.github.com> Date: Fri, 24 Sep 2021 11:38:42 +0800 Subject: [PATCH] [cherry-pick] fix cusparse compile bug in windows CUDA11.2, test=release/2.2 (#36015) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决Windowsä¸CUDA11.2编译出错的问题。 cherry-pick #35941 --- paddle/fluid/platform/dynload/cusparse.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/platform/dynload/cusparse.h b/paddle/fluid/platform/dynload/cusparse.h index 3f41f6978d..9884194967 100644 --- a/paddle/fluid/platform/dynload/cusparse.h +++ b/paddle/fluid/platform/dynload/cusparse.h @@ -41,6 +41,7 @@ extern void *cusparse_dso_handle; }; \ extern DynLoad__##__name __name +#ifndef _WIN32 #if CUDA_VERSION >= 11020 #define CUSPARSE_ROUTINE_EACH(__macro) \ __macro(cusparseCreate); \ @@ -57,6 +58,7 @@ extern void *cusparse_dso_handle; CUSPARSE_ROUTINE_EACH(DECLARE_DYNAMIC_LOAD_CUSPARSE_WRAP); #endif +#endif #undef DECLARE_DYNAMIC_LOAD_CUSPARSE_WRAP } // namespace dynload -- GitLab