Skip to content

Commit b166bd0

Browse files
authored
Improve docs [1/N] (#13)
1 parent 9962218 commit b166bd0

File tree

5 files changed

+60
-11
lines changed

5 files changed

+60
-11
lines changed

.github/workflows/_ascend_npu_benchmark.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ jobs:
7373
git gcc g++ make cmake ninja-build curl \
7474
libgl1 libglib2.0-0 libsndfile1
7575
76+
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
77+
- name: Config git
78+
run: |
79+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
80+
7681
- name: Checkout
7782
uses: actions/checkout@v4
7883

@@ -99,6 +104,7 @@ jobs:
99104
curl -fsSL -O https://raw.githubusercontent.com/Ascend/pytorch/refs/heads/master/requirements.txt
100105
pip install -r requirements.txt
101106
107+
# TODO: We must use numpy 1.x
102108
- name: Install benchmark dependencies
103109
run: |
104110
pip install -r benchmark/requirements.txt --constraint ascend_npu/requirements.txt "numpy==1.*"
@@ -130,7 +136,6 @@ jobs:
130136
path: benchmark/ascend_npu_benchmark.json
131137
if-no-files-found: error
132138
retention-days: 1
133-
overwrite: true
134139

135140
- name: Write to workflow job summary
136141
run: |
@@ -141,8 +146,15 @@ jobs:
141146
id: update-readme
142147
run: |
143148
python .ci/benchmark.py --update-readme --path benchmark/ascend_npu_benchmark.json
144-
145-
# https://github.com/peter-evans/create-pull-request
149+
if git diff --quiet README.md; then
150+
echo "README.md not changed"
151+
echo "changed=false" >> $GITHUB_OUTPUT
152+
else
153+
echo "README.md changed"
154+
echo "changed=true" >> $GITHUB_OUTPUT
155+
fi
156+
157+
# See: https://github.com/peter-evans/create-pull-request
146158
- name: Create a pull request for changes to README.md
147159
if: ${{ steps.update-readme.outputs.changed == 'true' }}
148160
uses: peter-evans/create-pull-request@v7

.github/workflows/_ascend_npu_build.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,21 @@ jobs:
3939
outputs:
4040
dist_name: ${{ steps.list-dist.outputs.dist_name }}
4141
steps:
42+
- name: Config mirrors
43+
run: |
44+
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
45+
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
46+
4247
# TODO(shink): Should we add these dependencies to the image?
4348
- name: Install system dependencies
4449
run: |
45-
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
46-
apt update
47-
apt install --no-install-recommends -y git gcc g++ make cmake ninja-build
50+
apt-get update
51+
apt-get install -y git gcc g++ make cmake ninja-build
52+
53+
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
54+
- name: Config git
55+
run: |
56+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
4857
4958
- name: Checkout
5059
uses: actions/checkout@v4

.github/workflows/_ascend_npu_ut.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,20 @@ jobs:
5555
run: |
5656
npu-smi info
5757
58-
- name: Install system dependencies
58+
- name: Config mirrors
5959
run: |
6060
sed -i 's|ports.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list
61-
apt update
62-
apt install --no-install-recommends -y git gcc g++ make cmake ninja-build
61+
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
62+
63+
- name: Install system dependencies
64+
run: |
65+
apt-get update
66+
apt-get install -y git gcc g++ make cmake ninja-build
67+
68+
# See: https://github.com/actions/checkout/issues/363#issuecomment-1915075699
69+
- name: Config git
70+
run: |
71+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
6372
6473
- name: Checkout
6574
uses: actions/checkout@v4

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Contributing to PyTorch Ouf-of-tree Accelerator TestInfra
2+
3+
We want to make contributing to this project as easy and transparent as possible.
4+
5+
## Pull Requests
6+
7+
We actively welcome your pull requests.
8+
9+
1. Fork the repo and create your branch from main.
10+
2. If you've added code that should be tested, add tests.
11+
3. If you've changed APIs, update the documentation.
12+
4. Ensure the test suite passes.
13+
5. Make sure your code lints.

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# PyTorch Integration Tests
1+
# PyTorch Out-of-tree Accelerator TestInfra
22

33
Welcome to the `pytorch-integration-tests` repository! This repository is
44
designed to facilitate the integration testing of different accelerators with
@@ -9,7 +9,7 @@ across various devices by running comprehensive GitHub workflows.
99

1010
<details>
1111

12-
<summary>Torchbenchmark statistics report</summary>
12+
<summary>Click here to view the torchbenchmark report</summary>
1313

1414
<!-- Torchbenchmark start -->
1515

@@ -156,6 +156,12 @@ The workflows are designed to be flexible. You can customize the parameters
156156
such as the target branch, runner, and loop time by modifying the inputs in
157157
the workflow files.
158158

159+
## Roadmap
160+
161+
See our [roadmap project][101] for more details.
162+
163+
[101]: https://github.com/orgs/cosdt/projects/7
164+
159165
## Contributing
160166

161167
We welcome contributions to enhance the integration testing process. Feel free

0 commit comments

Comments
 (0)