-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send recv op #5520
Send recv op #5520
Changes from all commits
20b44d0
9adb447
ee27f4a
a487601
a637f38
fc5739d
e6a2f53
f009f97
7d30ad8
12f86d9
e0ae95b
4ef4c29
22b414b
c230adf
453421b
e647ab8
582c521
138cdef
e6c8080
a993bd7
3ab2f65
3c98a33
2d7e3ba
6271d86
28ff5c1
02a8bd7
b236248
7b3d081
3b1230f
8043f56
d966c20
1a309bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,3 @@ AllowAllParametersOfDeclarationOnNextLine: true | |
BinPackParameters: false | ||
BinPackArguments: false | ||
... | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. Will add. Thanks for reminding. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
IF(MOBILE_INFERENCE) | ||
return() | ||
ENDIF() | ||
|
||
include (ExternalProject) | ||
|
||
# NOTE: c-ares is needed when linking with grpc. | ||
|
||
SET(CARES_SOURCES_DIR ${THIRD_PARTY_PATH}/cares) | ||
SET(CARES_INSTALL_DIR ${THIRD_PARTY_PATH}/install/cares) | ||
SET(CARES_INCLUDE_DIR "${CARES_INSTALL_DIR}/include/" CACHE PATH "cares include directory." FORCE) | ||
|
||
ExternalProject_Add( | ||
extern_cares | ||
GIT_REPOSITORY "https://github.com/c-ares/c-ares.git" | ||
GIT_TAG "cares-1_13_0" | ||
PREFIX ${CARES_SOURCES_DIR} | ||
UPDATE_COMMAND "" | ||
CONFIGURE_COMMAND ./buildconf && ./configure --disable-shared --prefix=${CARES_INSTALL_DIR} | ||
BUILD_IN_SOURCE 1 | ||
BUILD_COMMAND make | ||
INSTALL_COMMAND make install | ||
) | ||
|
||
ADD_LIBRARY(cares STATIC IMPORTED GLOBAL) | ||
SET_PROPERTY(TARGET cares PROPERTY IMPORTED_LOCATION | ||
"${CARES_INSTALL_DIR}/lib/libcares.a") | ||
|
||
include_directories(${CARES_INCLUDE_DIR}) | ||
ADD_DEPENDENCIES(cares extern_cares) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
IF(MOBILE_INFERENCE) | ||
return() | ||
ENDIF() | ||
|
||
include (ExternalProject) | ||
|
||
SET(GRPC_SOURCES_DIR ${THIRD_PARTY_PATH}/grpc) | ||
SET(GRPC_INSTALL_DIR ${THIRD_PARTY_PATH}/install/grpc) | ||
SET(GRPC_INCLUDE_DIR "${GRPC_INSTALL_DIR}/include/" CACHE PATH "grpc include directory." FORCE) | ||
SET(GRPC_CPP_PLUGIN "${GRPC_INSTALL_DIR}/bin/grpc_cpp_plugin" CACHE FILEPATH "GRPC_CPP_PLUGIN" FORCE) | ||
|
||
ExternalProject_Add( | ||
extern_grpc | ||
DEPENDS protobuf zlib | ||
GIT_REPOSITORY "https://github.com/grpc/grpc.git" | ||
GIT_TAG "v1.7.x" | ||
PREFIX ${GRPC_SOURCES_DIR} | ||
UPDATE_COMMAND "" | ||
CONFIGURE_COMMAND "" | ||
BUILD_IN_SOURCE 1 | ||
BUILD_COMMAND make | ||
INSTALL_COMMAND make prefix=${GRPC_INSTALL_DIR} install | ||
) | ||
|
||
# FIXME(typhoonzero): hack to get static lib path, try a better way like merge them. | ||
ADD_LIBRARY(grpc++_unsecure STATIC IMPORTED GLOBAL) | ||
SET_PROPERTY(TARGET grpc++_unsecure PROPERTY IMPORTED_LOCATION | ||
"${GRPC_INSTALL_DIR}/lib/libgrpc++_unsecure.a") | ||
|
||
ADD_LIBRARY(grpc++ STATIC IMPORTED GLOBAL) | ||
SET_PROPERTY(TARGET grpc++ PROPERTY IMPORTED_LOCATION | ||
"${GRPC_INSTALL_DIR}/lib/libgrpc++.a") | ||
ADD_LIBRARY(gpr STATIC IMPORTED GLOBAL) | ||
SET_PROPERTY(TARGET gpr PROPERTY IMPORTED_LOCATION | ||
"${GRPC_INSTALL_DIR}/lib/libgpr.a") | ||
|
||
ADD_LIBRARY(grpc_unsecure STATIC IMPORTED GLOBAL) | ||
SET_PROPERTY(TARGET grpc_unsecure PROPERTY IMPORTED_LOCATION | ||
"${GRPC_INSTALL_DIR}/lib/libgrpc_unsecure.a") | ||
|
||
include_directories(${GRPC_INCLUDE_DIR}) | ||
ADD_DEPENDENCIES(grpc++_unsecure extern_grpc) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely remember that you said you want to try brpc? @typhoonzero
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Will add benchmark in next PR to decide which to use. That won't affect current code structure.