From 9431bae1725b834277b82cf478bc0ad287bd6192 Mon Sep 17 00:00:00 2001 From: zhaoyingli <86812880+zhaoyinglia@users.noreply.github.com> Date: Fri, 7 Apr 2023 14:57:08 +0800 Subject: [PATCH] modify cmake file for cuda11.8 compile (#49020) (#52481) --- cmake/third_party.cmake | 5 +++-- paddle/fluid/operators/fused/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/third_party.cmake b/cmake/third_party.cmake index 96a78b527ac..6d56808f05c 100755 --- a/cmake/third_party.cmake +++ b/cmake/third_party.cmake @@ -317,8 +317,9 @@ if(WITH_ONNXRUNTIME) endif() if(WITH_GPU) - if(${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0 OR ${CMAKE_CUDA_COMPILER_VERSION} - GREATER_EQUAL 11.6) + if(${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0 + OR (${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6 + AND ${CMAKE_CUDA_COMPILER_VERSION} LESS 11.8)) include(external/cub) # download cub list(APPEND third_party_deps extern_cub) endif() diff --git a/paddle/fluid/operators/fused/CMakeLists.txt b/paddle/fluid/operators/fused/CMakeLists.txt index 9a14d35b599..fe82565bc36 100755 --- a/paddle/fluid/operators/fused/CMakeLists.txt +++ b/paddle/fluid/operators/fused/CMakeLists.txt @@ -67,7 +67,7 @@ if(WITH_GPU OR WITH_ROCM) op_library(skip_layernorm_op) op_library(yolo_box_head_op) op_library(yolo_box_post_op) - op_library(fused_embedding_eltwise_layernorm_op) + op_library(fused_embedding_eltwise_layernorm_op DEPS bert_encoder_functor) op_library(fused_gate_attention_op) # fusion_group if(NOT APPLE AND NOT WIN32) -- GitLab