Skip to content

Commit d07d26f

Browse files
author
samdow
committed
Update on "[stateless] add weight tying support"
cc zou3519 Chillee soumith [ghstack-poisoned]
2 parents b0500be + b09fd67 commit d07d26f

File tree

76 files changed

+1310
-565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1310
-565
lines changed

.github/actions/upload-test-artifacts/action.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ runs:
4949
if [ -f 'usage_log.txt' ]; then
5050
zip "usage-log-${FILE_SUFFIX}.zip" 'usage_log.txt'
5151
fi
52+
if ls test/**/*.log 1> /dev/null 2>&1; then
53+
zip -r "usage-log-${FILE_SUFFIX}.zip" test -i '*.log'
54+
fi
5255
5356
# Windows zip
5457
- name: Zip JSONs for upload
@@ -76,7 +79,7 @@ runs:
7679
FILE_SUFFIX: ${{ inputs.file-suffix }}
7780
run: |
7881
# -ir => recursive include all files in pattern
79-
7z a "usage-log-$Env:FILE_SUFFIX.zip" 'usage_log.txt'
82+
7z a "usage-log-$Env:FILE_SUFFIX.zip" 'usage_log.txt' -ir'!test\*.log'
8083
8184
# S3 upload
8285
- name: Store Test Downloaded JSONs on S3
@@ -141,5 +144,7 @@ runs:
141144
name: usage-log-runattempt${{ github.run_attempt }}-${{ inputs.file-suffix }}.zip
142145
retention-days: 14
143146
if-no-files-found: ignore
144-
path: usage_log.txt
147+
path: |
148+
usage_log.txt
149+
test/**/*.log
145150
continue-on-error: true

.github/merge_rules.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@
366366
approved_by:
367367
- mruberry
368368
- lezcano
369+
- Skylion007
369370
mandatory_checks_name:
370371
- EasyCLA
371372
- Lint

.github/scripts/trymerge.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,9 @@ def merge_ghstack_into(
871871
skip_mandatory_checks: bool,
872872
comment_id: Optional[int] = None,
873873
land_check_commit: Optional[str] = None
874-
) -> None:
874+
) -> List["GitHubPR"]:
875875
assert self.is_ghstack_pr()
876+
additional_prs: List["GitHubPR"] = []
876877
# For ghstack, cherry-pick commits based from origin
877878
orig_ref = f"{repo.remote}/{re.sub(r'/head$', '/orig', self.head_ref())}"
878879
rev_list = repo.revlist(f"{self.default_branch()}..{orig_ref}")
@@ -898,9 +899,11 @@ def merge_ghstack_into(
898899
skip_mandatory_checks=skip_mandatory_checks,
899900
skip_internal_checks=can_skip_internal_checks(self, comment_id),
900901
land_check_commit=land_check_commit)
902+
additional_prs.append(pr)
901903

902904
repo.cherry_pick(rev)
903905
repo.amend_commit_message(commit_msg)
906+
return additional_prs
904907

905908
def gen_commit_message(self, filter_ghstack: bool = False) -> str:
906909
""" Fetches title and body from PR description
@@ -930,20 +933,22 @@ def merge_into(self, repo: GitRepo, *,
930933
skip_mandatory_checks=skip_mandatory_checks,
931934
skip_internal_checks=can_skip_internal_checks(self, comment_id),
932935
land_check_commit=land_check_commit)
933-
self.merge_changes(repo, skip_mandatory_checks, comment_id, land_check_commit=land_check_commit)
936+
additional_merged_prs = self.merge_changes(repo, skip_mandatory_checks, comment_id, land_check_commit=land_check_commit)
934937

935938
repo.push(self.default_branch(), dry_run)
936939
if not dry_run:
937940
if land_check_commit:
938941
self.delete_land_time_check_branch(repo)
939942
gh_add_labels(self.org, self.project, self.pr_num, ["merged"])
943+
for pr in additional_merged_prs:
944+
gh_add_labels(self.org, self.project, pr.pr_num, ["merged"])
940945

941946
def merge_changes(self,
942947
repo: GitRepo,
943948
skip_mandatory_checks: bool = False,
944949
comment_id: Optional[int] = None,
945950
land_check_commit: Optional[str] = None,
946-
branch: Optional[str] = None) -> None:
951+
branch: Optional[str] = None) -> List["GitHubPR"]:
947952
branch_to_merge_into = self.default_branch() if branch is None else branch
948953
if repo.current_branch() != branch_to_merge_into:
949954
repo.checkout(branch_to_merge_into)
@@ -953,8 +958,9 @@ def merge_changes(self,
953958
repo.fetch(f"pull/{self.pr_num}/head", pr_branch_name)
954959
repo._run_git("merge", "--squash", pr_branch_name)
955960
repo._run_git("commit", f"--author=\"{self.get_author()}\"", "-m", msg)
961+
return []
956962
else:
957-
self.merge_ghstack_into(
963+
return self.merge_ghstack_into(
958964
repo,
959965
skip_mandatory_checks,
960966
comment_id=comment_id,

.github/workflows/_bazel-build-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,19 @@ jobs:
164164
)
165165
docker exec -t "${container_name}" sh -c 'sudo chown -R jenkins . && sudo chown -R jenkins /dev && .jenkins/pytorch/test.sh && cp -Lr ./bazel-testlogs ./test/test-reports'
166166
167+
- name: Print remaining test logs
168+
shell: bash
169+
if: always()
170+
run: |
171+
cat test/**/*.log || true
172+
167173
- name: Chown workspace
168174
uses: ./.github/actions/chown-workspace
169175
if: always()
170176

171177
- name: Upload test artifacts
172178
uses: ./.github/actions/upload-test-artifacts
173-
if: always() && (steps.test.conclusion == 'success' || steps.test.conclusion == 'failure')
179+
if: always() && steps.test.conclusion && steps.test.conclusion != 'skipped'
174180
with:
175181
file-suffix: bazel-${{ github.job }}_${{ steps.get-job-id.outputs.job-id }}
176182

.github/workflows/_linux-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,12 @@ jobs:
206206
echo "DOCKER_CONTAINER_ID=${container_name}" >> "${GITHUB_ENV}"
207207
docker exec -t "${container_name}" sh -c "pip install $(echo dist/*.whl)[opt-einsum] && ${TEST_COMMAND}"
208208
209+
- name: Print remaining test logs
210+
shell: bash
211+
if: always()
212+
run: |
213+
cat test/**/*.log || true
214+
209215
- name: Get workflow job id
210216
id: get-job-id
211217
uses: ./.github/actions/get-workflow-job-id
@@ -224,7 +230,7 @@ jobs:
224230
225231
- name: Upload test artifacts
226232
uses: ./.github/actions/upload-test-artifacts
227-
if: always() && (steps.test.conclusion == 'success' || steps.test.conclusion == 'failure')
233+
if: always() && steps.test.conclusion && steps.test.conclusion != 'skipped'
228234
with:
229235
file-suffix: ${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}_${{ steps.get-job-id.outputs.job-id }}
230236
use-gha: ${{ inputs.use-gha }}

.github/workflows/_mac-test-mps.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@ jobs:
8282
8383
${CONDA_RUN} python3 test/run_test.py --mps --verbose
8484
85+
- name: Print remaining test logs
86+
shell: bash
87+
if: always()
88+
run: |
89+
cat test/**/*.log || true
90+
8591
- name: Get workflow job id
8692
id: get-job-id
8793
uses: ./.github/actions/get-workflow-job-id
@@ -91,7 +97,7 @@ jobs:
9197

9298
- name: Upload test artifacts
9399
uses: ./.github/actions/upload-test-artifacts
94-
if: always() && (steps.test.conclusion == 'success' || steps.test.conclusion == 'failure')
100+
if: always() && steps.test.conclusion && steps.test.conclusion != 'skipped'
95101
with:
96102
use-gha: true
97103
file-suffix: ${{ github.job }}-mps-1-1-macos-m1-12_${{ steps.get-job-id.outputs.job-id }}

.github/workflows/_mac-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,12 @@ jobs:
150150
${CONDA_RUN} python3 -mpip install --no-index --no-deps $(echo dist/*.whl)
151151
${CONDA_RUN} .jenkins/pytorch/macos-test.sh
152152
153+
- name: Print remaining test logs
154+
shell: bash
155+
if: always()
156+
run: |
157+
cat test/**/*.log || true
158+
153159
- name: Get workflow job id
154160
id: get-job-id
155161
uses: ./.github/actions/get-workflow-job-id
@@ -167,7 +173,7 @@ jobs:
167173
168174
- name: Upload test artifacts
169175
uses: ./.github/actions/upload-test-artifacts
170-
if: always() && (steps.test.conclusion == 'success' || steps.test.conclusion == 'failure')
176+
if: always() && steps.test.conclusion && steps.test.conclusion != 'skipped'
171177
with:
172178
use-gha: true
173179
file-suffix: ${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}_${{ steps.get-job-id.outputs.job-id }}

.github/workflows/_rocm-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ jobs:
196196
# copy test results back to the mounted workspace, needed sudo, resulting permissions were correct
197197
docker exec -t "${{ env.CONTAINER_NAME }}" sh -c "cd ../pytorch && sudo cp -R test/test-reports ../workspace/test"
198198
199+
- name: Print remaining test logs
200+
shell: bash
201+
if: always()
202+
run: |
203+
cat test/**/*.log || true
204+
199205
- name: Get workflow job id
200206
id: get-job-id
201207
uses: ./.github/actions/get-workflow-job-id
@@ -214,7 +220,7 @@ jobs:
214220
215221
- name: Upload test artifacts
216222
uses: ./.github/actions/upload-test-artifacts
217-
if: always() && (steps.test.conclusion == 'success' || steps.test.conclusion == 'failure')
223+
if: always() && steps.test.conclusion && steps.test.conclusion != 'skipped'
218224
with:
219225
use-gha: true
220226
file-suffix: ${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}_${{ steps.get-job-id.outputs.job-id }}

.github/workflows/_win-test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ jobs:
164164
165165
.jenkins/pytorch/win-test.sh
166166
167+
- name: Print remaining test logs
168+
shell: bash
169+
if: always()
170+
run: |
171+
cat test/**/*.log || true
172+
167173
- name: Get workflow job id
168174
id: get-job-id
169175
uses: ./.github/actions/get-workflow-job-id
@@ -182,7 +188,7 @@ jobs:
182188
183189
- name: Upload test artifacts
184190
uses: ./.github/actions/upload-test-artifacts
185-
if: always() && (steps.test.conclusion == 'success' || steps.test.conclusion == 'failure')
191+
if: always() && steps.test.conclusion && steps.test.conclusion != 'skipped'
186192
with:
187193
file-suffix: ${{ github.job }}-${{ matrix.config }}-${{ matrix.shard }}-${{ matrix.num_shards }}-${{ matrix.runner }}_${{ steps.get-job-id.outputs.job-id }}
188194

.github/workflows/pull.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ jobs:
230230
test-matrix: ${{ needs.linux-bionic-py3_7-clang8-xla-build.outputs.test-matrix }}
231231

232232
win-vs2019-cpu-py3-build:
233+
if: false
233234
name: win-vs2019-cpu-py3
234235
uses: ./.github/workflows/_win-build.yml
235236
with:
@@ -243,6 +244,7 @@ jobs:
243244
]}
244245
245246
win-vs2019-cpu-py3-test:
247+
if: false
246248
name: win-vs2019-cpu-py3
247249
uses: ./.github/workflows/_win-test.yml
248250
needs: win-vs2019-cpu-py3-build

0 commit comments

Comments
 (0)