forked from triton-lang/triton-cpu
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sh
executable file
·32 lines (26 loc) · 942 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
source ./../miniforge/bin/activate triton
# Note, build and install LLVM on this directory with hash to avoid conflicts
export LLVM_BUILD_DIR=$PWD/../llvm-project/build
export TRITON_BUILD_WITH_CCACHE=false
export TRITON_BUILD_WITH_CLANG_LLD=true
export LLVM_INCLUDE_DIRS=$LLVM_BUILD_DIR/include
export LLVM_LIBRARY_DIR=$LLVM_BUILD_DIR/lib
export LLVM_SYSPATH=$LLVM_BUILD_DIR
echo "===================================== Build"
pip install -e python/
if [ $? != 0 ]; then
exit 1
fi
echo "===================================== CMake Tests"
ctest --test-dir python/build/cmake*
if [ $? != 0 ]; then
exit 1
fi
echo "===================================== Setting up LIBXSMM for paddeing"
export XSMM_ROOT_DIR=$(realpath $(find python/build/ -type d -name xsmm-src | grep -v third_party))
export XSMM_LIB_DIR=$(realpath python/triton/_C)
cd third_party/cpu/python
python setup.py install
cd ../../../
conda deactivate