Skip to content

Commit d396e1a

Browse files
committed
Update on "Ensure that deleter is called even for a no-data tensor."
Summary: When using a custom deleter InefficientStdFunctionContext was using a std::unique_ptr<> to store the pointer and call the deleter - but this failed to call the deleter if the pointer was null. Since we have a separate holder class anyway take out the std::unique_ptr<> and call the deleter directly. Fixes #117273 Test Plan: [ghstack-poisoned]
2 parents 93ded60 + 9af9adf commit d396e1a

File tree

247 files changed

+6485
-3081
lines changed

Some content is hidden

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

247 files changed

+6485
-3081
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
663882fe7dc518c04adf3d2ee5ccb7d99f41ade4
1+
2d39c223f23fbd6cc063e06f3374cb107e229a31

.ci/docker/common/install_executorch.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ setup_executorch() {
4848

4949
install_flatc_from_source
5050
pip_install .
51-
build_executorch_runner "cmake"
5251

5352
# Make sure that all the newly generate files are owned by Jenkins
5453
chown -R jenkins .

.ci/pytorch/test.sh

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -278,18 +278,13 @@ test_dynamo_shard() {
278278
test_autograd \
279279
test_jit \
280280
test_quantization \
281-
test_public_bindings \
282281
test_dataloader \
283282
test_reductions \
284-
test_namedtensor \
285283
profiler/test_profiler \
286284
profiler/test_profiler_tree \
287285
test_python_dispatch \
288286
test_fx \
289-
test_package \
290-
test_legacy_vmap \
291287
test_custom_ops \
292-
test_content_store \
293288
export/test_db \
294289
functorch/test_dims \
295290
functorch/test_aotdispatch \
@@ -690,9 +685,8 @@ test_xpu_bin(){
690685
TEST_REPORTS_DIR=$(pwd)/test/test-reports
691686
mkdir -p "$TEST_REPORTS_DIR"
692687

693-
for xpu_case in "${BUILD_BIN_DIR}"/*{xpu,sycl}*
694-
do
695-
if [[ "$xpu_case" != *"*"* ]]; then
688+
for xpu_case in "${BUILD_BIN_DIR}"/*{xpu,sycl}*; do
689+
if [[ "$xpu_case" != *"*"* && "$xpu_case" != *.so && "$xpu_case" != *.a ]]; then
696690
case_name=$(basename "$xpu_case")
697691
echo "Testing ${case_name} ..."
698692
"$xpu_case" --gtest_output=xml:"$TEST_REPORTS_DIR"/"$case_name".xml
@@ -1035,14 +1029,17 @@ test_docs_test() {
10351029
}
10361030

10371031
test_executorch() {
1032+
echo "Install torchvision and torchaudio"
1033+
install_torchvision
1034+
install_torchaudio
1035+
10381036
pushd /executorch
10391037

1040-
echo "Install torchvision and torchaudio"
1041-
# TODO(huydhn): Switch this to the pinned commits on ExecuTorch once they are
1042-
# there. These libraries need to be built here, and not part of the Docker
1043-
# image because they require the target version of torch to be installed first
1044-
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/audio.git"
1045-
pip_install --no-use-pep517 --user "git+https://github.com/pytorch/vision.git"
1038+
# NB: We need to build ExecuTorch runner here and not inside the Docker image
1039+
# because it depends on PyTorch
1040+
# shellcheck disable=SC1091
1041+
source .ci/scripts/utils.sh
1042+
build_executorch_runner "cmake"
10461043

10471044
echo "Run ExecuTorch regression tests for some models"
10481045
# NB: This is a sample model, more can be added here

.github/actions/setup-rocm/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ runs:
99
shell: bash
1010
run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}"
1111

12+
- name: Remove leftover Docker config file
13+
shell: bash
14+
continue-on-error: true
15+
run: |
16+
set -ex
17+
18+
cat ~/.docker/config.json || true
19+
# https://stackoverflow.com/questions/64455468/error-when-logging-into-ecr-with-docker-login-error-saving-credentials-not
20+
rm -f ~/.docker/config.json
21+
1222
- name: Stop all running docker containers
1323
if: always()
1424
shell: bash

.github/actions/update-commit-hash/action.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/ci_commit_pins/audio.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e3efbc2d9094685dd2d4ae143853941f82f167af
1+
b2d9c3e315405f2b5cfdfa5b93f849d5b27a4109

.github/ci_commit_pins/vision.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d23430765b5df76cd1267f438f129f51b7d6e3e1
1+
a00a72b1ee41483407717379fb5cafe992de2f82

.github/ci_commit_pins/xla.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e1c94dfa5a74331a376537c23bf74a2c367f24bd
1+
27ae6dc955734b223e2b93e1c5bbcd681b0537fd

.github/merge_rules.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,17 +275,20 @@
275275
- wanchaol
276276
- fduwjj
277277
- H-Huang
278-
- aazzolini
279278
- kwen2501
280279
- XilunWu
281280
- wz337
282281
- awgu
283282
- fegin
284-
- kumpera
285-
- yhcharles
283+
- kurman
284+
- LucasLLC
285+
- sanketpurandare
286+
- shuqiangzhang
287+
- tianyu-l
286288
- kiukchung
287289
- d4l3k
288290
- shuqiangzhang
291+
- weifengpy
289292
mandatory_checks_name:
290293
- EasyCLA
291294
- Lint

.github/scripts/update_commit_hashes.py

Lines changed: 0 additions & 171 deletions
This file was deleted.

.github/templates/linux_binary_build_workflow.yml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
name: !{{ build_environment }}
88
{%- endblock %}
99

10+
1011
on:
1112
push:
1213
{%- if branches == "nightly" %}

.github/templates/upload.yml.j2

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
{%- macro upload_binaries(config, is_windows=False, has_test=True, use_s3=True) -%}
5454
!{{ config["build_name"] }}-upload: # Uploading
5555
if: ${{ github.repository_owner == 'pytorch' }}
56+
permissions:
57+
id-token: write
58+
contents: read
5659
{%- if has_test %}
5760
needs: !{{ config["build_name"] }}-test
5861
{%- else %}
@@ -65,8 +68,6 @@
6568
{%- endif %}
6669
secrets:
6770
github-token: ${{ secrets.GITHUB_TOKEN }}
68-
aws-pytorch-uploader-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }}
69-
aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }}
7071
conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }}
7172
conda-pytorchbot-token-test: ${{ secrets.CONDA_PYTORCHBOT_TOKEN_TEST }}
7273
uses: ./.github/workflows/_binary-upload.yml

0 commit comments

Comments
 (0)