-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into opt_softmax_bwd
- Loading branch information
Showing
73 changed files
with
4,173 additions
and
1,139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include_directories($ENV{jni_path} $ENV{jni_sub_path} $ENV{paddle_path}) | ||
find_library(PADDLE_INFERENCE_C libpaddle_inference_c.so HINTS $ENV{paddle_inference_lib}) | ||
aux_source_directory(native JNI_SRCS) | ||
add_library(paddle_inference SHARED ${JNI_SRCS}) | ||
target_link_libraries(paddle_inference ${PADDLE_INFERENCE_C}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. | ||
# | ||
|
||
mkdir build && cd build | ||
export library_path=$1 | ||
export jni_path=$2 | ||
export jni_sub_path=$3 | ||
mkldnn_lib=$library_path"/third_party/install/mkldnn/lib" | ||
mklml_lib=$library_path"/third_party/install/mklml/lib" | ||
export paddle_inference_lib=$library_path"/paddle/lib" | ||
export paddle_path=$library_path"/paddle/include" | ||
export LD_LIBRARY_PATH=mkldnn_lib:mklml_lib:paddle_inference_lib | ||
cmake .. && make | ||
#g++ -fPIC -D_REENTRANT -I $jni_path -I $jni_sub_path -I $paddle_path -L $paddle_inference_lib -c com_baidu_paddle_inference_Predictor.cpp com_baidu_paddle_inference_Config.cpp com_baidu_paddle_inference_Tensor.cpp | ||
#g++ -shared -I $paddle_path -L $paddle_inference_lib com_baidu_paddle_inference_Config.o com_baidu_paddle_inference_Predictor.o com_baidu_paddle_inference_Tensor.o -o libpaddle_inference.so -lpaddle_inference_c | ||
|
||
cd ../src/main/java/com/baidu/paddle/inference | ||
javac Config.java Predictor.java Tensor.java | ||
cd ../../../../../../../ | ||
cp ./native/libpaddle_inference.so libpaddle_inference.so | ||
pwd | ||
jar cvf JavaInference.jar -C src/main/java/ . |
Oops, something went wrong.
24e82bb
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.
✅Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉