Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 8 additions & 33 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function build_deepep()
cd -
}

function make_package()
function make_deepep_package()
{
if pip3 show wheel;then
echo "wheel has been installed"
Expand All @@ -44,45 +44,20 @@ function make_package()
fi

PYTHON_DIR="python"
cd "$PYTHON_DIR" || exit
cd "$PYTHON_DIR"/deep_ep || exit

cp -v ${OUTPUT_DIR}/lib/* "$CURRENT_DIR"/python/deep_ep/
rm -rf "$CURRENT_DIR"/python/dist
python3 setup.py build
cp -v ${OUTPUT_DIR}/lib/* "$CURRENT_DIR"/python/deep_ep/deep_ep/
rm -rf "$CURRENT_DIR"/python/deep_ep/dist
python3 setup.py bdist_wheel
mv -v "$CURRENT_DIR"/python/deep_ep/dist/deep_ep*.whl ${OUTPUT_DIR}/
rm -rf "$CURRENT_DIR"/python/deep_ep/dist
cd -
}

function build_kernels()
{
KERNEL_DIR="csrc/kernels"

CUSTOM_OPP_DIR="${CURRENT_DIR}/deep_ep"

cd "$KERNEL_DIR" || exit

chmod +x build.sh
chmod +x cmake/util/gen_ops_filter.sh
./build.sh

custom_opp_file=$(find ./build_out -maxdepth 1 -type f -name "custom_opp*.run")
if [ -z "$custom_opp_file" ]; then
echo "can not find run package"
exit 1
else
echo "find run package: $custom_opp_file"
chmod +x "$custom_opp_file"
fi
# echo "./build_out/custom_opp_*.run --install-path=$CUSTOM_OPP_DIR"
./build_out/custom_opp_*.run --install-path=$CUSTOM_OPP_DIR

cd -
}


function main()
{
build_deepep
make_package
make_deepep_package
}

main
12 changes: 0 additions & 12 deletions install.sh

This file was deleted.

13 changes: 4 additions & 9 deletions python/deep_ep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Ascend Implementation of DeepEP
Supported Hardware Models: Atlas A3 Series Products
Platform: aarch64/x86
Supporting Software
- Driver firmware Ascend HDK 25.0.RC1.1, CANN Community Edition 8.2.RC1.alpha001 and later versions (refer to the "[CANN Software Installation Guide](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha001/softwareinst/instg/instg_0001.html?Mode=PmIns&OS=Ubuntu&Software=cannToolKit)" to install the CANN development kit package, as well as the supporting firmware and drivers)
- Before installing CANN software, you need to install the relevant [dependency list](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha001/softwareinst/instg/instg_0045.html?Mode=PmIns&OS=Ubuntu&Software=cannToolKit)
- Driver Ascend HDK 25.0.RC1.1, CANN Community Edition 8.2.RC1.alpha003 and later versions (refer to the "[CANN Software Installation Guide](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha003/softwareinst/instg/instg_0001.html?Mode=PmIns&OS=Ubuntu&Software=cannToolKit)" to install the CANN development kit package, as well as the supporting firmware and drivers)
- Before installing CANN software, you need to install the relevant [dependency list](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha003/softwareinst/instg/instg_0045.html)
- Python >= 3.9
- PyTorch >= 2.5.1, torch-npu >= 2.5.1-7.0.0

Expand All @@ -34,18 +34,13 @@ bash build.sh

# Link to the deep_ep_cpp.*.so file based on your settings
ln -s build/lib.linux-aarch64-cpython-39/deep_ep/deep_ep_cpp.cpython-39-aarch64-linux-gnu.so

# Run test cases
bash tests/run_test.sh
```

### Installation
1. Run the installation script to install the `.whl` file into your Python environment
1. Pip install the `.whl` file into your Python environment
```bash
bash install.sh
pip install output/deep_ep*.whl
```
Install required environment variables:
- `ASCEND_HOME_PATH`: CANN installation path

2. Execute the environment variables for CANN (modify according to the installation path)
```bash
Expand Down
13 changes: 4 additions & 9 deletions python/deep_ep/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ DeepEP的ascend实现
硬件型号支持:Atlas A3 系列产品
平台:aarch64/x86
配套软件
- 驱动固件 Ascend HDK 25.0.RC1.1、CANN社区版8.2.RC1.alpha001及之后版本(参考《[CANN软件安装指南](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha001/softwareinst/instg/instg_0001.html?Mode=PmIns&OS=Ubuntu&Software=cannToolKit)》安装CANN开发套件包以及配套固件和驱动)
- 安装CANN软件前需安装相关[依赖列表](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha001/softwareinst/instg/instg_0045.html?Mode=PmIns&OS=Ubuntu&Software=cannToolKit)
- 驱动 Ascend HDK 25.0.RC1.1、CANN社区版8.2.RC1.alpha003及之后版本(参考《[CANN软件安装指南](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha003/softwareinst/instg/instg_0001.html?Mode=PmIns&OS=Ubuntu&Software=cannToolKit)》安装CANN开发套件包以及配套固件和驱动)
- 安装CANN软件前需安装相关[依赖列表](https://www.hiascend.com/document/detail/zh/CANNCommunityEdition/82RC1alpha003/softwareinst/instg/instg_0045.html)
- Python >= 3.9
- PyTorch >= 2.5.1, torch-npu >= 2.5.1-7.0.0

Expand All @@ -36,18 +36,13 @@ bash build.sh

# 根据你的设置软链接到 deep_ep_cpp.*.so 文件
ln -s build/lib.linux-aarch64-cpython-39/deep_ep/deep_ep_cpp.cpython-39-aarch64-linux-gnu.so

# 运行测试用例
bash tests/run_test.sh
```

### 安装
1、执行安装脚本,将`.whl`安装到你的python环境下
1、执行pip安装命令,将`.whl`安装到你的python环境下
```bash
bash install.sh
pip install output/deep_ep*.whl
```
安装需要的环境变量:
- `ASCEND_HOME_PATH`: CANN的安装路径

2、执行CANN的环境变量(根据安装路径修改)
```bash
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.