diff --git a/doc/fluid/advanced_usage/development/new_op/custom_op.md b/doc/fluid/advanced_usage/development/new_op/custom_op.md index 706399bb05d2d7bc441c7da1e9791bdbcc2d5792..7abc548c46cad27f0f0044a5774f67ad1add2d7b 100644 --- a/doc/fluid/advanced_usage/development/new_op/custom_op.md +++ b/doc/fluid/advanced_usage/development/new_op/custom_op.md @@ -251,29 +251,25 @@ lib_dir=$( python -c 'import paddle; print(paddle.sysconfig.get_lib())' ) echo $include_dir echo $lib_dir +# PaddlePaddel >=1.6.1, 仅需要include ${include_dir} 和 ${include_dir}/third_party nvcc relu_op.cu -c -o relu_op.cu.o -ccbin cc -DPADDLE_WITH_CUDA -DEIGEN_USE_GPU -DPADDLE_USE_DSO -Xcompiler -fPIC -std=c++11 -Xcompiler -fPIC -w --expt-relaxed-constexpr -O3 -DNVCC \ - -I ${include_dir}/third_party/install/gflags/include \ - -I ${include_dir}/third_party/install/glog/include \ - -I ${include_dir}/third_party/install/protobuf/include \ - -I ${include_dir}/third_party/install/xxhash/include \ - -I ${include_dir}/third_party/boost \ - -I ${include_dir}/third_party/eigen3 \ - -I ${include_dir}/third_party/dlpack/include \ - -I ${include_dir}/third_party/threadpool/src/extern_threadpool \ -I ${include_dir} \ + -I ${include_dir}/third_party \ g++ relu_op.cc relu_op.cu.o -o relu2_op.so -shared -fPIC -std=c++11 -O3 \ - -I ${include_dir}/third_party/install/protobuf/include \ - -I ${include_dir}/third_party/install/glog/include \ - -I ${include_dir}/third_party/install/gflags/include \ - -I ${include_dir}/third_party/install/xxhash/include \ - -I ${include_dir}/third_party/install/zlib/include \ - -I ${include_dir}/third_party/boost \ - -I ${include_dir}/third_party/eigen3 \ - -I ${include_dir}/third_party/dlpack/include \ -I ${include_dir} \ + -I ${include_dir}/third_party \ -L /usr/local/cuda/lib64 \ -L ${lib_dir} -lpaddle_framework -lcudart + +# PaddlePaddel 1.6.0, 需要include的third_party如下: +# -I ${include_dir}/third_party/install/protobuf/include \ +# -I ${include_dir}/third_party/install/glog/include \ +# -I ${include_dir}/third_party/install/gflags/include \ +# -I ${include_dir}/third_party/install/xxhash/include \ +# -I ${include_dir}/third_party/boost \ +# -I ${include_dir}/third_party/eigen3 \ +# -I ${include_dir}/third_party/dlpack/include \ ```