#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "$0")"

g++ -O3 -DNDEBUG -std=c++17 -fPIC -shared \
  bpu_dnn_policy.cpp \
  -I/usr/include \
  -ldnn \
  -o libbpu_dnn_policy.so

g++ -O3 -DNDEBUG -std=c++17 \
  bpu_dnn_bench.cpp \
  -I/usr/include \
  -L. -lbpu_dnn_policy \
  -Wl,-rpath,'$ORIGIN' \
  -o bpu_dnn_bench

ls -lh libbpu_dnn_policy.so
ls -lh bpu_dnn_bench
