-
Notifications
You must be signed in to change notification settings - Fork 610
[CI] add ascend test #3959
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
Merged
Merged
[CI] add ascend test #3959
Changes from 35 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
372b2c5
AUTOTEST: add device type for ascend
littlegy b9ad171
Merge branch 'InternLM:main' into test
littlegy 28907ca
AOTOTEST: fix lint
littlegy ecee43a
Merge branch 'InternLM:main' into test
littlegy fb57ada
AUTOTEST: add pipeline test timeout
littlegy 4869f64
AUTOTEST: fix lint flake8
littlegy d8f85d4
Create api_eva.yml
littlegy 82188f7
WORKFLOW: add ascend workflow
littlegy ddaa36c
WORKFLOW: update ascend runner
littlegy 2cda270
fix yaml
littlegy 755cee6
fix yaml ii
littlegy 28f4df6
fix yaml ii
littlegy 0ef80d6
fix yaml ii
littlegy c6c6183
fix yaml ii
littlegy 39b6dc3
fix yaml ii
littlegy 88c8461
fix yaml ii
littlegy 82cec68
update ascend
littlegy 49b3d59
update ascend
littlegy 4b591d4
update ascend
littlegy ee49e02
AUTOTEST: update hw yml
littlegy 85bac1e
AUTOTEST: fix hw yml
littlegy 06568e2
AUTOTEST: add ascend device
littlegy c1ae0b1
CI: fix yml
littlegy 55b2f76
CI: add pip cache
littlegy b012c5a
CI: add pip cache
littlegy 43e6666
CI: add pip cache
littlegy b3dcf40
CI: add pip cache
littlegy b8ace1d
Merge branch 'InternLM:main' into hw_runner
littlegy dd8bac7
TEST: update ascend test
littlegy 9bda185
TEST: rm api eval
littlegy 9ce6864
TEST: update chat test
littlegy 4e62a33
TEST: fix tmp dir
littlegy ff2ed1d
Merge branch 'main' into hw_runner
littlegy 858cb5a
TEST: fix lint
littlegy a786543
TEST: update ascend config
littlegy 5e06c9f
TEST: rm ascend config
littlegy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
name: daily_ete_test_ascend | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
repo_org: | ||
required: false | ||
description: 'Tested repository organization name. Default is InternLM' | ||
type: string | ||
default: 'InternLM/lmdeploy' | ||
repo_ref: | ||
required: false | ||
description: 'Set branch or tag or commit id. Default is "main"' | ||
type: string | ||
default: 'main' | ||
backend: | ||
required: true | ||
description: 'Set backend testcase filter: turbomind or pytorch or turbomind, pytorch. Default is "["turbomind", "pytorch"]"' | ||
type: string | ||
default: "['pytorch']" | ||
model: | ||
required: true | ||
description: 'Set testcase module filter: llm, vllm. Default contains all models' | ||
type: string | ||
default: "['llm']" | ||
function: | ||
required: true | ||
description: 'Set testcase function filter: chat, restful, pipeline. Default contains all functions' | ||
type: string | ||
default: '["pipeline", "restful", "chat"]' | ||
regression_func: | ||
required: true | ||
description: 'regression functions' | ||
type: string | ||
default: "['tools']" | ||
|
||
env: | ||
REPORT_DIR: /test/test-reports/${{ github.run_id }} | ||
COV_PARAM: --cov /usr/local/python3.10.17/lib/python3.10/site-packages/lmdeploy | ||
FAIL_CONFIG: ${{ github.event_name == 'push' && github.run_attempt != 1 && '--lf --lfnf none' || '--lf'}} | ||
TEST_CODE_PATH: /test/test_pkg/lmdeploy/${{ github.run_id }} | ||
LOG_PATH: /test/log/${{ github.run_id }} | ||
TMPDIR: /mnt/deeplink/docker-tmp/qa_tmp | ||
RAY_TMPDIR: /mnt/deeplink/docker-tmp/qa_tmp/ray | ||
|
||
jobs: | ||
download_pkgs: | ||
if: ${{!cancelled()}} | ||
runs-on: [self-hosted, ascend-013] | ||
timeout-minutes: 50 | ||
container: | ||
image: crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/ascend:910b-latest | ||
options: "--device=/dev/davinci0 --device=/dev/davinci1 --device=/dev/davinci2 --device=/dev/davinci3 --device=/dev/davinci4 --device=/dev/davinci5 --device=/dev/davinci6 --device=/dev/davinci7 --device=/dev/davinci_manager --device=/dev/devmm_svm --device=/dev/hisi_hdc -e PIP_CACHE_DIR=/root/.cache/pip --shm-size=150g --pull never" | ||
volumes: | ||
- /usr/local/Ascend/driver:/usr/local/Ascend/driver:ro | ||
- /usr/local/sbin:/usr/local/sbin:ro | ||
- /var/log/npu/slog:/var/log/npu/slog | ||
- /var/log/npu/profiling:/var/log/npu/profiling | ||
- /var/log/npu/dump:/var/log/npu/dump | ||
- /var/log/npu:/usr/slog | ||
- /etc/hccn.conf:/etc/hccn.conf:ro | ||
- /root/qa_test:/test | ||
- /mnt:/mnt | ||
- /root/.cache/pip:/root/.cache/pip | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v2 | ||
if: ${{ !cancelled() }} | ||
with: | ||
repository: ${{ github.event.inputs.repo_org || 'InternLM/lmdeploy' }} | ||
ref: ${{github.event.inputs.repo_ref || 'main'}} | ||
- name: Copy repository | ||
if: ${{ !cancelled() }} | ||
run: rm -rf ${{env.TEST_CODE_PATH}} && mkdir ${{env.TEST_CODE_PATH}} && cp -r . ${{env.TEST_CODE_PATH}} | ||
|
||
test_tools: | ||
if: ${{!cancelled() && contains(fromJSON(github.event.inputs.regression_func), 'tools')}} | ||
runs-on: [self-hosted, ascend-013] | ||
needs: download_pkgs | ||
timeout-minutes: 300 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
backend: ${{ fromJSON(inputs.backend || '["turbomind", "pytorch"]')}} | ||
model: ${{ fromJSON(inputs.model || '["llm", "mllm"]')}} | ||
function: ${{ fromJSON(inputs.function || '["pipeline","restful","chat"]')}} | ||
exclude: | ||
- backend: turbomind | ||
model: mllm | ||
function: chat | ||
- backend: pytorch | ||
model: mllm | ||
function: chat | ||
container: | ||
image: crpi-4crprmm5baj1v8iv.cn-hangzhou.personal.cr.aliyuncs.com/lmdeploy_dlinfer/ascend:910b-latest | ||
options: "--device=/dev/davinci0 --device=/dev/davinci1 --device=/dev/davinci2 --device=/dev/davinci3 --device=/dev/davinci4 --device=/dev/davinci5 --device=/dev/davinci6 --device=/dev/davinci7 --device=/dev/davinci_manager --device=/dev/devmm_svm --device=/dev/hisi_hdc -e PIP_CACHE_DIR=/root/.cache/pip --shm-size=150g --pull never" | ||
volumes: | ||
- /usr/local/Ascend/driver:/usr/local/Ascend/driver | ||
- /usr/local/sbin:/usr/local/sbin | ||
- /var/log/npu/slog:/var/log/npu/slog | ||
- /var/log/npu/profiling:/var/log/npu/profiling | ||
- /var/log/npu/dump:/var/log/npu/dump | ||
- /var/log/npu:/usr/slog | ||
- /etc/hccn.conf:/etc/hccn.conf | ||
- /root/qa_test:/test | ||
- /mnt:/mnt | ||
- /root/.cache/pip:/root/.cache/pip | ||
steps: | ||
- name: Copy repository and Artifacts | ||
run: | | ||
cp -r ${{ env.TEST_CODE_PATH }}/. . | ||
- name: Install lmdeploy - offline | ||
run: | | ||
python3 -m pip install -r requirements_ascend.txt -i https://mirrors.aliyun.com/pypi/simple/ | ||
- name: Install lmdeploy - test | ||
run: | | ||
python3 -m pip install -r requirements/test.txt -i https://mirrors.aliyun.com/pypi/simple/ | ||
- name: Check env | ||
run: | | ||
python3 -m pip list | ||
lmdeploy check_env | ||
rm -rf allure-results | ||
# remove tmp log in testcase | ||
rm -rf ${{ env.LOG_PATH }}/* | ||
mkdir ${{ env.REPORT_DIR }}/.pytest_cache -p | ||
ln -s ${{ env.REPORT_DIR }}/.pytest_cache autotest | ||
- name: Test lmdeploy - chat | ||
continue-on-error: true | ||
if: ${{ (matrix.backend == 'pytorch' || matrix.backend == 'turbomind') && matrix.model == 'llm' && matrix.function == 'chat' }} | ||
run: | | ||
pytest autotest/tools/chat/test_command_chat_hf_${{ matrix.backend }}.py -m 'gpu_num_1 and test_ascend' -n 8 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') || true | ||
pytest autotest/tools/chat/test_command_chat_hf_${{ matrix.backend }}.py -m 'gpu_num_2 and test_ascend' -n 4 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
pytest autotest/tools/chat/test_command_chat_hf_${{ matrix.backend }}.py -m 'gpu_num_4 and test_ascend' -n 2 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
pytest autotest/tools/chat/test_command_chat_hf_${{ matrix.backend }}.py -m 'gpu_num_8 and test_ascend' --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
- name: Test lmdeploy - pipeline | ||
continue-on-error: true | ||
if: ${{ matrix.function == 'pipeline' }} | ||
run: | | ||
pytest autotest/tools/pipeline/test_pipeline_chat_${{ matrix.backend }}_${{ matrix.model }}.py -m 'gpu_num_1 and test_ascend' -n 8 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') || true | ||
pytest autotest/tools/pipeline/test_pipeline_chat_${{ matrix.backend }}_${{ matrix.model }}.py -m 'gpu_num_2 and test_ascend' -n 4 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
pytest autotest/tools/pipeline/test_pipeline_chat_${{ matrix.backend }}_${{ matrix.model }}.py -m 'gpu_num_4 and test_ascend' -n 2 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
pytest autotest/tools/pipeline/test_pipeline_chat_${{ matrix.backend }}_${{ matrix.model }}.py -m 'gpu_num_8 and test_ascend' --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
- name: Test lmdeploy - restful | ||
continue-on-error: true | ||
if: ${{ matrix.function == 'restful' }} | ||
run: | | ||
pytest autotest/tools/restful/test_restful_chat_hf_${{ matrix.backend }}_${{ matrix.model }}.py -m 'gpu_num_1 and test_ascend' -n 8 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') || true | ||
pytest autotest/tools/restful/test_restful_chat_hf_${{ matrix.backend }}_${{ matrix.model }}.py -m 'gpu_num_2 and test_ascend' -n 4 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
pytest autotest/tools/restful/test_restful_chat_hf_${{ matrix.backend }}_${{ matrix.model }}.py -m 'gpu_num_4 and test_ascend' -n 2 --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
pytest autotest/tools/restful/test_restful_chat_hf_${{ matrix.backend }}_${{ matrix.model }}.py -m 'gpu_num_8 and test_ascend' --device ascend --alluredir=${{ env.REPORT_DIR }} ${{ env.COV_PARAM }} || true | ||
mv .coverage ${{ env.REPORT_DIR }}/.coverage.$(date +'%Y%m%d%H%M%S') | ||
- name: Clear workfile | ||
if: always() | ||
run: | | ||
chmod -R 777 $REPORT_DIR | ||
export workdir=$(pwd) | ||
cd .. | ||
rm -rf $workdir | ||
mkdir $workdir | ||
chmod -R 777 $workdir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
model_path: /mnt/deeplink/group01/deeplink-test/weight | ||
resource_path: /nvme/qa_test_models/resource | ||
dst_path: /nvme/qa_test_models/autotest_model | ||
log_path: /test/log | ||
benchmark_path: /nvme/qa_test_models/benchmark-reports | ||
dataset_path: /nvme/qa_test_models/datasets/ShareGPT_V3_unfiltered_cleaned_split.json | ||
env_tag: a100 | ||
|
||
tp_config: | ||
Qwen2.5-32B-Instruct: 2 | ||
|
||
pytorch_chat_model: | ||
- /Qwen3-0.6B | ||
|
||
pytorch_vl_model: | ||
- /Qwen3-0.6B | ||
|
||
pytorch_base_model: | ||
- /Qwen3-0.6B | ||
|
||
pytorch_quatization: | ||
awq: | ||
- meta-llama/Meta-Llama-3-8B-Instruct | ||
w8a8: | ||
- meta-llama/Meta-Llama-3-8B-Instruct | ||
no_kvint4: | ||
- /Qwen3-0.6B | ||
no_kvint8: | ||
- /Qwen3-0.6B | ||
|
||
|
||
longtext_model: | ||
- /Qwen3-0.6B | ||
zhulinJulia24 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
benchmark_model: | ||
- /Qwen3-0.6B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What's this tag used for?