Ai
223 Star 1.3K Fork 1.1K

Ascend/samples

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
run.sh 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
诸葛文洵 提交于 2024-08-14 10:22 +08:00 . change names from MatMul to Matmul
#!/bin/bash
CURRENT_DIR=$(
cd $(dirname ${BASH_SOURCE:-$0})
pwd
)
cd $CURRENT_DIR
SHORT=v:,
LONG=soc-version:,
OPTS=$(getopt -a --options $SHORT --longoptions $LONG -- "$@")
eval set -- "$OPTS"
while :; do
case "$1" in
-v | --soc-version)
SOC_VERSION="$2"
shift 2
;;
--)
shift
break
;;
*)
echo "[ERROR] Unexpected option: $1"
break
;;
esac
done
if [ -n "$ASCEND_INSTALL_PATH" ]; then
_ASCEND_INSTALL_PATH=$ASCEND_INSTALL_PATH
elif [ -n "$ASCEND_HOME_PATH" ]; then
_ASCEND_INSTALL_PATH=$ASCEND_HOME_PATH
else
if [ -d "$HOME/Ascend/ascend-toolkit/latest" ]; then
_ASCEND_INSTALL_PATH=$HOME/Ascend/ascend-toolkit/latest
else
_ASCEND_INSTALL_PATH=/usr/local/Ascend/ascend-toolkit/latest
fi
fi
source $_ASCEND_INSTALL_PATH/bin/setenv.bash
set -e
pip3 install pybind11
rm -rf build
mkdir -p build
cmake -B build \
-DSOC_VERSION=${SOC_VERSION} \
-DASCEND_CANN_PACKAGE_PATH=${_ASCEND_INSTALL_PATH}
cmake --build build -j
(
cd build
python3 ../matmul_leakyrelu_custom_test.py
)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ascend/samples.git
git@gitee.com:ascend/samples.git
ascend
samples
samples
8.0.RC3

搜索帮助