
cmake_minimum_required(VERSION 3.4...3.18)
project(functions LANGUAGES CXX)

add_subdirectory(pybind11)

include_directories(/public/home/zhangqha/.conda/envs/hhenv/include/python3.6m)
include_directories(/public/home/zhangqha/.conda/envs/hhenv/lib/python3.6/site-packages/numpy/core/include)
include_directories(/public/home/zhangqha/dtk-21.04/hipcub/include)
include_directories(/public/home/zhangqha/dtk-21.04/hiprand/include)
include_directories(/public/home/zhangqha/dtk-21.04/hipsparse/include)
include_directories(/public/home/zhangqha/dtk-21.04/include)
include_directories(/public/home/zhangqha/dtk-21.04/miopen/include)
include_directories(/public/home/zhangqha/dtk-21.04/rccl/include)
include_directories(/public/home/zhangqha/dtk-21.04/rocblas/include)
include_directories(/public/home/zhangqha/dtk-21.04/rocfft/include)
include_directories(/public/home/zhangqha/dtk-21.04/rocprim/include)
include_directories(/public/home/zhangqha/dtk-21.04/rocrand/include)
include_directories(/public/home/zhangqha/dtk-21.04/rocsparse/include)
include_directories(/public/home/zhangqha/dtk-21.04/rocthrust/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/paddle/fluid/platform)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/dlpack/src/extern_dlpack/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/eigen3/src/extern_eigen3)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/brpc/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/gflags/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/glog/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/gloo/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/gtest/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/leveldb/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/libmct/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/mklml/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/mklml/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/protobuf/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/rocksdb/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/snappy/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/utf8proc/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/warpctc/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/xbyak/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/xbyak/include/xbyak)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/xxhash/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/xxhash/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/install/zlib/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/pocketfft/src)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/pybind/src/extern_pybind/include)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/build/third_party/threadpool/src/extern_threadpool)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/paddle/fluid/framework/io)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/paddle/fluid/platform)
include_directories(/public/home/zhangqha/for_baidu/Paddle-develop/patches/thrust)
add_definitions(-DPADDLE_WITH_RCCL)
add_definitions(-DEIGEN_USE_HIP)
add_definitions(-DTHRUST_IGNORE_CUB_VERSION_CHECK)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -D_GLIBCXX_USE_CXX11_ABI=1 -fPIC -D__HIP_PLATFORM_HCC__=1 ")

set(extension_name "functions")
add_definitions("-DMLPERF_EXTENSION_NAME=${extension_name}")
pybind11_add_module(${extension_name} functions.cc)
target_link_libraries(${extension_name} PRIVATE /usr/local/lib/python3.6/site-packages/paddle/fluid/core_avx.so)
