diff --git a/.github/workflows/_ascend_npu_benchmark.yml b/.github/workflows/_ascend_npu_benchmark.yml index 3217f1f..74e4fef 100644 --- a/.github/workflows/_ascend_npu_benchmark.yml +++ b/.github/workflows/_ascend_npu_benchmark.yml @@ -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: @@ -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 diff --git a/.github/workflows/_ascend_npu_build_torch.yml b/.github/workflows/_ascend_npu_build_torch.yml index bd87f94..05113a1 100644 --- a/.github/workflows/_ascend_npu_build_torch.yml +++ b/.github/workflows/_ascend_npu_build_torch.yml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/_ascend_npu_build_torch_npu.yml b/.github/workflows/_ascend_npu_build_torch_npu.yml index 00b1815..a9cdaec 100644 --- a/.github/workflows/_ascend_npu_build_torch_npu.yml +++ b/.github/workflows/_ascend_npu_build_torch_npu.yml @@ -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: @@ -63,9 +51,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 uses: actions/checkout@v4 @@ -73,11 +63,7 @@ jobs: - 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 @@ -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 diff --git a/.github/workflows/_ascend_npu_ut.yml b/.github/workflows/_ascend_npu_ut.yml index f5ccc85..67ec667 100644 --- a/.github/workflows/_ascend_npu_ut.yml +++ b/.github/workflows/_ascend_npu_ut.yml @@ -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: | @@ -65,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 uses: actions/checkout@v4 @@ -75,11 +65,7 @@ jobs: - 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 diff --git a/.github/workflows/ascend_npu_test.yml b/.github/workflows/ascend_npu_test.yml index 6004f3f..82fd8ed 100644 --- a/.github/workflows/ascend_npu_test.yml +++ b/.github/workflows/ascend_npu_test.yml @@ -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' @@ -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