#!/bin/bash

# Ascend home
export ASCEND_PATH=/usr/local/Ascend

# Atlas
if [ -d "${ASCEND_PATH}/ascend-toolkit" ]; then
    export ASCEND_OPP_PATH=${ASCEND_PATH}/ascend-toolkit/latest/opp
    export ASCEND_FWKACLLIB_PATH=${ASCEND_PATH}/ascend-toolkit/latest/fwkacllib
    export PYTHONPATH=${ASCEND_FWKACLLIB_PATH}/python/site-packages:${PYTHONPATH}
else
    export ASCEND_OPP_PATH=${ASCEND_PATH}/opp
    export ASCEND_FWKACLLIB_PATH=${ASCEND_PATH}/fwkacllib
fi

# Ascend910
export TBE_IMPL_PATH=${ASCEND_OPP_PATH}/op_impl/built-in/ai_core/tbe
export PATH=${ASCEND_FWKACLLIB_PATH}/ccec_compiler/bin:${PATH}
export LD_LIBRARY_PATH=${ASCEND_FWKACLLIB_PATH}/lib64:${ASCEND_PATH}/add-ons:${ASCEND_PATH}/driver/lib64/common:${LD_LIBRARY_PATH}
export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH}
