diff --git a/.github/workflows/_ascend_npu_benchmark.yml b/.github/workflows/_ascend_npu_benchmark.yml index 710d5a3..67c46b0 100644 --- a/.github/workflows/_ascend_npu_benchmark.yml +++ b/.github/workflows/_ascend_npu_benchmark.yml @@ -73,6 +73,11 @@ jobs: git gcc g++ make cmake ninja-build curl \ libgl1 libglib2.0-0 libsndfile1 + # See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699 + - name: Config git + run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Checkout uses: actions/checkout@v4 @@ -99,6 +104,7 @@ jobs: curl -fsSL -O https://raw.githubusercontent.com/Ascend/pytorch/refs/heads/master/requirements.txt pip install -r requirements.txt + # TODO: We must use numpy 1.x - name: Install benchmark dependencies run: | pip install -r benchmark/requirements.txt --constraint ascend_npu/requirements.txt "numpy==1.*" @@ -130,7 +136,6 @@ jobs: path: benchmark/ascend_npu_benchmark.json if-no-files-found: error retention-days: 1 - overwrite: true - name: Write to workflow job summary run: | @@ -141,8 +146,15 @@ jobs: id: update-readme run: | python .ci/benchmark.py --update-readme --path benchmark/ascend_npu_benchmark.json - - # https://github.com/peter-evans/create-pull-request + if git diff --quiet README.md; then + echo "README.md not changed" + echo "changed=false" >> $GITHUB_OUTPUT + else + echo "README.md changed" + echo "changed=true" >> $GITHUB_OUTPUT + fi + + # See: https://github.com/peter-evans/create-pull-request - name: Create a pull request for changes to README.md if: ${{ steps.update-readme.outputs.changed == 'true' }} uses: peter-evans/create-pull-request@v7 diff --git a/.github/workflows/_ascend_npu_build.yml b/.github/workflows/_ascend_npu_build.yml index 249fbc2..1f2ee52 100644 --- a/.github/workflows/_ascend_npu_build.yml +++ b/.github/workflows/_ascend_npu_build.yml @@ -39,12 +39,21 @@ jobs: outputs: dist_name: ${{ steps.list-dist.outputs.dist_name }} steps: + - name: Config mirrors + run: | + sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list + pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple + # TODO(shink): Should we add these dependencies to the image? - name: Install system dependencies run: | - sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list - apt update - apt install --no-install-recommends -y git gcc g++ make cmake ninja-build + apt-get update + apt-get install -y git gcc g++ make cmake ninja-build + + # See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699 + - name: Config git + run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/_ascend_npu_ut.yml b/.github/workflows/_ascend_npu_ut.yml index 13b1e1b..22d78be 100644 --- a/.github/workflows/_ascend_npu_ut.yml +++ b/.github/workflows/_ascend_npu_ut.yml @@ -55,11 +55,20 @@ jobs: run: | npu-smi info - - name: Install system dependencies + - name: Config mirrors run: | sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list - apt update - apt install --no-install-recommends -y git gcc g++ make cmake ninja-build + pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple + + - name: Install system dependencies + run: | + apt-get update + apt-get install -y git gcc g++ make cmake ninja-build + + # See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699 + - name: Config git + run: | + git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Checkout uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f68380d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,13 @@ +# Contributing to PyTorch Ouf-of-tree Accelerator TestInfra + +We want to make contributing to this project as easy and transparent as possible. + +## Pull Requests + +We actively welcome your pull requests. + +1. Fork the repo and create your branch from main. +2. If you've added code that should be tested, add tests. +3. If you've changed APIs, update the documentation. +4. Ensure the test suite passes. +5. Make sure your code lints. diff --git a/README.md b/README.md index 6699136..d602fc6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# PyTorch Integration Tests +# PyTorch Out-of-tree Accelerator TestInfra Welcome to the `pytorch-integration-tests` repository! This repository is designed to facilitate the integration testing of different accelerators with @@ -9,7 +9,7 @@ across various devices by running comprehensive GitHub workflows.
-Torchbenchmark statistics report +Click here to view the torchbenchmark report @@ -156,6 +156,12 @@ The workflows are designed to be flexible. You can customize the parameters such as the target branch, runner, and loop time by modifying the inputs in the workflow files. +## Roadmap + +See our [roadmap project][101] for more details. + +[101]: https://github.com/orgs/cosdt/projects/7 + ## Contributing We welcome contributions to enhance the integration testing process. Feel free