Skip to content
Merged
14 changes: 2 additions & 12 deletions .github/workflows/_ascend_npu_benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,6 @@ jobs:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
volumes:
- /usr/local/dcmi:/usr/local/dcmi
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
- /etc/ascend_install.info:/etc/ascend_install.info
options: >-
--network host
--device ${{ inputs.device }}
--device /dev/davinci_manager
--device /dev/devmm_svm
--device /dev/hisi_hdc
env:
HF_ENDPOINT: https://hf-mirror.com
steps:
Expand All @@ -73,9 +61,11 @@ jobs:
libgl1 libglib2.0-0 libsndfile1

# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
# See: https://github.com/hunshcn/gh-proxy/issues/28#issuecomment-773769630
- name: Config git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/

- name: Checkout
uses: actions/checkout@v4
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/_ascend_npu_build_torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ jobs:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
options: >-
--network host
outputs:
dist-name: ${{ steps.list-dist.outputs.dist-name }}
steps:
Expand All @@ -55,9 +53,11 @@ jobs:
apt-get install -y git gcc g++ make cmake ninja-build

# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
# See: https://github.com/hunshcn/gh-proxy/issues/28#issuecomment-773769630
- name: Config git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/

- name: Checkout PyTorch
uses: actions/checkout@v4
Expand All @@ -81,6 +81,8 @@ jobs:
working-directory: pytorch
run: |
python setup.py build bdist_wheel
env:
MAX_JOBS: 8

- name: List distribution package
id: list-dist
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/_ascend_npu_build_torch_npu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ jobs:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
volumes:
- /usr/local/dcmi:/usr/local/dcmi
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
- /etc/ascend_install.info:/etc/ascend_install.info
options: >-
--network host
--device ${{ inputs.device }}
--device /dev/davinci_manager
--device /dev/devmm_svm
--device /dev/hisi_hdc
outputs:
dist-name: ${{ steps.list-dist.outputs.dist-name }}
steps:
Expand All @@ -63,21 +51,19 @@ jobs:
apt-get install -y git gcc g++ make cmake ninja-build

# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
# See: https://github.com/hunshcn/gh-proxy/issues/28#issuecomment-773769630
- name: Config git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/

- name: Checkout
uses: actions/checkout@v4

- name: Checkout torch_npu
uses: actions/checkout@v4
with:
# TODO(shink): Use Ascend/pytorch once this pr merged:
# https://gitee.com/ascend/pytorch/pulls/12854
# repository: Ascend/pytorch
repository: shink/torchnpu
ref: feat/autoload
repository: Ascend/pytorch
submodules: recursive
path: torch_npu

Expand Down Expand Up @@ -118,6 +104,7 @@ jobs:
bash ci/build.sh --python=${{ steps.list-py-version.outputs.py-version }}
env:
_GLIBCXX_USE_CXX11_ABI: 1 # https://gitee.com/ascend/pytorch/issues/IBJFZY
MAX_JOBS: 8

- name: List distribution package
id: list-dist
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/_ascend_npu_ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,6 @@ jobs:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
volumes:
- /usr/local/dcmi:/usr/local/dcmi
- /usr/local/bin/npu-smi:/usr/local/bin/npu-smi
- /usr/local/Ascend/driver/lib64/:/usr/local/Ascend/driver/lib64/
- /usr/local/Ascend/driver/version.info:/usr/local/Ascend/driver/version.info
- /etc/ascend_install.info:/etc/ascend_install.info
options: >-
--network host
--device ${{ inputs.device }}
--device /dev/davinci_manager
--device /dev/devmm_svm
--device /dev/hisi_hdc
steps:
- name: Show NPU info
run: |
Expand All @@ -65,21 +53,19 @@ jobs:
apt-get install -y git gcc g++ make cmake ninja-build

# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
# See: https://github.com/hunshcn/gh-proxy/issues/28#issuecomment-773769630
- name: Config git
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global url."https://gh-proxy.test.osinfra.cn/https://github.com/".insteadOf https://github.com/

- name: Checkout
uses: actions/checkout@v4

- name: Checkout torch_npu
uses: actions/checkout@v4
with:
# TODO(shink): Use Ascend/pytorch once this pr merged:
# https://gitee.com/ascend/pytorch/pulls/12854
# repository: Ascend/pytorch
repository: shink/torchnpu
ref: feat/autoload
repository: Ascend/pytorch
path: torch_npu

- name: Install pip dependencies
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ascend_npu_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,19 @@ on:
required: true
type: choice
options:
- self-hosted
- npu-arm64
default: 'self-hosted'
- linux-arm64-npu-0
- linux-arm64-npu-1
- linux-arm64-npu-2
- linux-arm64-npu-4
default: 'linux-arm64-npu-1'
description: 'The runner selected to run on'
image:
required: true
type: choice
options:
- ascendai/cann:7.1-openeuler2203sp2
- ascendai/cann:8.0.rc2.alpha003-910b-ubuntu22.04-py3.9
- ascendai/cann:8.0.rc3.alpha002-910b-ubuntu22.04-py3.9
- ascendai/cann:7.0.1-910b-ubuntu22.04-py3.8
- ascendai/cann:8.0.0-910b-ubuntu22.04-py3.10
- ascendai/cann:latest
default: 'ascendai/cann:latest'
description: 'The docker image which will be loaded'
Expand Down Expand Up @@ -95,7 +97,7 @@ jobs:
- name: Set environment params
id: set-env
run: |
echo "runner=${{ github.event.inputs.runner || 'self-hosted' }}" >> $GITHUB_OUTPUT
echo "runner=${{ github.event.inputs.runner || 'linux-arm64-npu-1' }}" >> $GITHUB_OUTPUT
echo "device=${{ github.event.inputs.device || '/dev/davinci5' }}" >> $GITHUB_OUTPUT
echo "image=${{ github.event.inputs.image || 'ascendai/cann:latest' }}" >> $GITHUB_OUTPUT

Expand Down