source /opt/dtk-22.04.2/env.sh

cd /opt/dtk-22.04.2/.hip/
./replace_origin.sh

cd -

export CPLUS_INCLUDE_PATH=${ROCM_PATH}/include:${ROCM_PATH}:/opencl/include
export LD_LIBRARY_PATH=/public/software/compiler/intel-compiler-2017.5.239/mkl/lib/intel64_lin/:$LD_LIBRARY_PATH

#export PATH=/home/huchen/FAISS/swig-4.0.2-build/bin/:$PATH
export CPLUS_INCLUDE_PATH=${ROCM_PATH}/hiprand/include/:${ROCM_PATH}/rocrand/include:$CPLUS_INCLUDE_PATH
export LD_LIBRARY_PATH=${ROCM_PATH}/hipblas/lib/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=${ROCM_PATH}/rocblas/lib/:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=${ROCM_PATH}/llvm/lib:$LD_LIBRARY_PATH

export BUILD_DIR=`pwd`/build
export LD_LIBRARY_PATH=${BUILD_DIR}/faiss/gpu/test/:${BUILD_DIR}faiss/:${BUILD_DIR}/lib/:$LD_LIBRARY_PATH
#export HIP_KERNEL_PRINTF=1
#make -j95 VERBOSE=1
export HIP_VISIBLE_DEVICES=3


#export AMD_LOG_LEVEL=4
#export AMD_OCL_WAIT_COMMAND=1

#export MKL_DEBUG_CPU_TYPE=5

#cd build/faiss/python && python3 setup.py build
#cd -

#PYTHONPATH="$(ls -d ./build/faiss/python/build/lib*/)" pytest tests/test_*.py
#export PYTHONPATH="$(ls -d ./build/faiss/python/build/lib*/)" 
#pytest -v -s --capture=no  -q tests/test_index_accuracy.py
pytest tests/test_*.py
#pytest -v tests/test_fast_scan.py
#pytest -v tests/test_index_accuracy.py
#pytest -v -s --capture=no  -q tests/test_index_accuracy.py::TestSQFlavors::test_SQ_IP

