-
Notifications
You must be signed in to change notification settings - Fork 45
Add two scripts #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add two scripts #119
Changes from 2 commits
53125f2
38b7c4d
ec6249b
65c7630
40643be
18ea6fa
b95ebdc
894a885
015f190
0152857
04db4cd
f5aba2b
a1667f8
55ab3a8
0def944
bb0b974
2112998
08a6127
e8c8a68
0470cb1
12bfe79
ae72436
d4ca2c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,105 @@ | ||||||
| #!/bin/bash | ||||||
|
|
||||||
| SKN_PWD="" | ||||||
|
|
||||||
| # 默认值 | ||||||
| SKIP_BUILD=false | ||||||
|
|
||||||
| TEMP=$(getopt -o sw:t:h --long skip-build -n "$0" -- "$@") | ||||||
| if [ $? != 0 ]; then | ||||||
| echo "Terminating..." >&2 | ||||||
| exit 1 | ||||||
| fi | ||||||
|
|
||||||
| eval set -- "$TEMP" | ||||||
|
|
||||||
| while true; do | ||||||
| case "$1" in | ||||||
| -s|--skip-build) | ||||||
| SKIP_BUILD=true | ||||||
| shift | ||||||
| ;; | ||||||
| --) | ||||||
| shift | ||||||
| break | ||||||
| ;; | ||||||
| *) | ||||||
| echo "Invalid option: $1" >&2 | ||||||
| show_help | ||||||
|
||||||
| exit 1 | ||||||
| ;; | ||||||
| esac | ||||||
| done | ||||||
|
|
||||||
| # 切换目录 | ||||||
| cd "${SKN_PWD}" || { echo "Directory not found: ${SKN_PWD}"; exit 1; } | ||||||
|
|
||||||
| # 条件构建 | ||||||
| if [ "$SKIP_BUILD" = false ]; then | ||||||
| echo ">>> Building package..." | ||||||
| bash build.sh -a deepep || { echo "Build failed!"; exit 1; } | ||||||
| pip uninstall -y deep-ep | ||||||
| pip install ./output/deep_ep-*.whl || { echo "Install failed!"; exit 1; } | ||||||
| else | ||||||
| echo ">>> Skipping build and install (--skip-build)" | ||||||
| fi | ||||||
|
|
||||||
| # 进入测试目录 | ||||||
| cd ./tests/python/deepep || { echo "Test directory not found"; exit 1; } | ||||||
|
|
||||||
| # 设置环境变量 | ||||||
| export HCCL_BUFFSIZE=4096 | ||||||
| # 设置 Ascend 环境 | ||||||
| source /usr/local/Ascend/ascend-toolkit/set_env.sh | ||||||
|
|
||||||
| #遍历test_intranode.py | ||||||
| # 设置参数范围 | ||||||
| NUM_PROCESSES_LIST_=(4 8 16) | ||||||
|
||||||
| NUM_PROCESSES_LIST_=(4 8 16) | |
| NUM_PROCESSES_LIST=(4 8 16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,103 @@ | ||||||
| #!/bin/bash | ||||||
|
|
||||||
| SKN_PWD="" | ||||||
|
|
||||||
| # 默认值 | ||||||
| SKIP_BUILD=false | ||||||
|
|
||||||
| TEMP=$(getopt -o sw:t:h --long skip-build -n "$0" -- "$@") | ||||||
|
||||||
| TEMP=$(getopt -o sw:t:h --long skip-build -n "$0" -- "$@") | |
| TEMP=$(getopt -o s --long skip-build -n "$0" -- "$@") |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The script attempts to loop over ACTIVE_RANKS_LIST and ENABLE_DIAGNOSE_LIST, but these arrays are not defined in this script. This will cause the inner loops to be skipped silently, meaning a significant portion of the intended tests will not run. This is a critical bug, likely from a copy-paste error. Please either define these arrays with appropriate values for test_low_latency.py or remove the loops and the corresponding logic that uses ACTIVE_RANKS and ENABLE_DIAGNOSE variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
getoptstringsw:t:hdeclares optionsw:,t:, andhwhich are not handled in thecasestatement below. If a user provides any of these options, the script will fail with an "Invalid option" error. Please remove the unhandled options from thegetoptstring or add handlers for them.