You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wget https://github.com/oneapi-src/oneDNN/archive/refs/tags/v2.5.1.tar.gz # get v2.5.1 source code
tar -xzvf v2.5.1.tar.gz && cd oneDNN-2.5.1/ # extract the source code
mkdir build && cd "$_" # setup a build dir
cmake -DCMAKE_INSTALL_PREFIX=../install .. && make -j && make install # build and install
export oneDNN_HOME=`pwd`/../install
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:${oneDNN_HOME}/include
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${oneDNN_HOME}/lib64
build TVM
get tvm
git clone --recursive https://github.com/yangulei/tvm -b dev_byoc
cd tvm
build for tvm benchmark
mkdir build_release_native && cd "$_"
cp ../cmake/config.cmake .
sed -i '/USE_LLVM/ s/OFF/ON/g' config.cmake # Enable LLVM
cmake .. -DCMAKE_BUILD_TYPE=Release && make -j
build for byoc benchmark
cd .. && mkdir build_release_gnu && cd "$_"
cp ../cmake/config.cmake .
sed -i '/USE_LLVM/ s/OFF/ON/g' config.cmake # Enable LLVM
sed -i '/USE_DNNL_CODEGEN/ s/OFF/ON/g' config.cmake # Enable oneDNN
sed -i '/USE_OPENMP/ s/none/gnu/g' config.cmake # needed for oneDNN-BYOC, but slow for native TVM codegen
cmake .. -DCMAKE_BUILD_TYPE=Release -DEXTERN_LIBRARY_DNNL=${oneDNN_HOME}/lib64/libdnnl.so
make -j && cd ..