diff --git a/cmake/third_party.cmake b/cmake/third_party.cmake index 28b2bae9518792574860771c6049401d4c340680..8516fe8177ca55057cd8c5f21da75e1108202c30 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 23cdc33658d1c1c0b71c34fffea5551c3c496b3d..becef73569b29cb0c1ddb6493ea7757fa1ff165c 100755 --- a/paddle/fluid/operators/fused/CMakeLists.txt +++ b/paddle/fluid/operators/fused/CMakeLists.txt @@ -69,7 +69,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)