已合并
增加torch_atb wheel包名称abi信息 #2086
增加torch_atb wheel包名称abi信息 #2086
已合并
dovahkiiin创建于 5月18日
5 个文件变更+17-10
@@ -469,8 +469,9 @@ function fn_init_env()
469 469 
470function rename_whl_file() {470function rename_whl_file() {
471 python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')471 python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
472- version_suffix="cp${python_version//./}"472+ abi_tag=$([[ "$USE_CXX11_ABI" == "ON" ]] && echo 1 || echo 0)
473- echo "DEBUG: Current Python version: $python_version, setting wheel file tag: $version_suffix"473+ version_suffix="cp${python_version//./}-abi${abi_tag}"
474+ echo "DEBUG: Current Python version: $python_version, ABI: $abi_tag, setting wheel file tag: $version_suffix"
474 for whl in ./whl/*.whl; do475 for whl in ./whl/*.whl; do
475 if [[ "$whl" == *"py3"* ]]; then476 if [[ "$whl" == *"py3"* ]]; then
476 new_name="${whl/py3/${version_suffix}}"477 new_name="${whl/py3/${version_suffix}}"
@@ -721,7 +722,8 @@ function fn_install_torch_atb()
721 exit 1722 exit 1
722 fi723 fi
723 724 
724- wheel_file="torch_atb-0.0.1-cp${py_major_version}${py_minor_version}-none-any.whl"725+ abi_tag=$([[ "$USE_CXX11_ABI" == "ON" ]] && echo 1 || echo 0)
726+ wheel_file="torch_atb-0.0.1-cp${py_major_version}${py_minor_version}-abi${abi_tag}-none-any.whl"
725 wheel_path="${OUTPUT_DIR}/whl/${wheel_file}"727 wheel_path="${OUTPUT_DIR}/whl/${wheel_file}"
726 728 
727 if [ ! -f "$wheel_path" ]; then729 if [ ! -f "$wheel_path" ]; then
@@ -98,7 +98,8 @@ function switch_to_new_version()
98 py_version=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')98 py_version=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
99 py_major_version=${py_version%%.*}99 py_major_version=${py_version%%.*}
100 py_minor_version=${py_version##*.}100 py_minor_version=${py_version##*.}
101- wheel_file="torch_atb-0.0.1-cp${py_major_version}${py_minor_version}-none-any.whl"101+ abi_tag=$([[ "$USE_CXX11_ABI" == "ON" ]] && echo 1 || echo 0)
102+ wheel_file="torch_atb-0.0.1-cp${py_major_version}${py_minor_version}-abi${abi_tag}-none-any.whl"
102 wheel_path="latest/whl/${wheel_file}"103 wheel_path="latest/whl/${wheel_file}"
103 if [ -n "$torch_atb_flag" ]; then104 if [ -n "$torch_atb_flag" ]; then
104 if pip3 install --force-reinstall "$wheel_path" > /dev/null 2>&1; then105 if pip3 install --force-reinstall "$wheel_path" > /dev/null 2>&1; then
@@ -68,8 +68,10 @@ atb/cxx_abi_1/lib/libtbe_adapter.so
68atb/cxx_abi_1/lib/libcann_ops_adapter.so68atb/cxx_abi_1/lib/libcann_ops_adapter.so
69atb/cxx_abi_1/lib/libexp_ops_static.a69atb/cxx_abi_1/lib/libexp_ops_static.a
70atb/cxx_abi_1/lib/libexp_mixops_static.a70atb/cxx_abi_1/lib/libexp_mixops_static.a
71-whl/torch_atb-0.0.1-cp310-none-any.whl71+whl/torch_atb-0.0.1-cp310-abi0-none-any.whl
72-whl/torch_atb-0.0.1-cp311-none-any.whl72+whl/torch_atb-0.0.1-cp311-abi0-none-any.whl
73+whl/torch_atb-0.0.1-cp310-abi1-none-any.whl
74+whl/torch_atb-0.0.1-cp311-abi1-none-any.whl
73scripts/create_version_softlink.sh75scripts/create_version_softlink.sh
74scripts/filelist.csv76scripts/filelist.csv
75scripts/uninstall.sh77scripts/uninstall.sh
@@ -594,7 +594,8 @@ function install_torch_atb() {
594 exit 1594 exit 1
595 fi595 fi
596 596 
597- wheel_file="torch_atb-0.0.1-cp${py_major_version}${py_minor_version}-none-any.whl"597+ abi_tag=$([[ "$USE_CXX11_ABI" == "ON" ]] && echo 1 || echo 0)
598+ wheel_file="torch_atb-0.0.1-cp${py_major_version}${py_minor_version}-abi${abi_tag}-none-any.whl"
598 wheel_path="${sourcedir}/whl/${wheel_file}"599 wheel_path="${sourcedir}/whl/${wheel_file}"
599 600 
600 if [ ! -f "$wheel_path" ]; then601 if [ ! -f "$wheel_path" ]; then
@@ -180,8 +180,9 @@ function fn_init_env()
180 180 
181function rename_whl_file() {181function rename_whl_file() {
182 python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')182 python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
183- version_suffix="cp${python_version//./}"183+ abi_tag=$([[ "$USE_CXX11_ABI" == "ON" ]] && echo 1 || echo 0)
N
Nnino8885月18日

需同步给构建同事

likedislike
184- echo "DEBUG: Current Python version: $python_version, setting wheel file tag: $version_suffix"184+ version_suffix="cp${python_version//./}-abi${abi_tag}"
185+ echo "DEBUG: Current Python version: $python_version, ABI: $abi_tag, setting wheel file tag: $version_suffix"
185 for whl in ./whl/*.whl; do186 for whl in ./whl/*.whl; do
186 if [[ "$whl" == *"py3"* ]]; then187 if [[ "$whl" == *"py3"* ]]; then
187 new_name="${whl/py3/${version_suffix}}"188 new_name="${whl/py3/${version_suffix}}"
@@ -216,7 +217,7 @@ function fn_build()
216 cmake $CODE_ROOT $COMPILE_OPTIONS217 cmake $CODE_ROOT $COMPILE_OPTIONS
217 cmake --build . --parallel $(nproc)218 cmake --build . --parallel $(nproc)
218 cmake --install .219 cmake --install .
219- if [ "$USE_CXX11_ABI" == "ON" -a "$USE_CXX11_ABI" == "ON" ]; then220+ if [ "$USE_CXX11_ABI" == "ON" ]; then
220 fn_build_torch_atb221 fn_build_torch_atb
221 fn_gen_atb_whl222 fn_gen_atb_whl
222 fi223 fi