Package: pytorch / 1.13.1+dfsg-4

Metadata

Package Version Patches format
pytorch 1.13.1+dfsg-4 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
dirtyhack.patch | (download)

CMakeLists.txt | 15 10 + 5 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/CMakeLists.txt | 7 5 + 2 - 0 !
caffe2/CMakeLists.txt | 15 9 + 6 - 0 !
cmake/Dependencies.cmake | 31 13 + 18 - 0 !
modules/module_test/CMakeLists.txt | 1 1 + 0 - 0 !
test/cpp/tensorexpr/CMakeLists.txt | 2 1 + 1 - 0 !
tools/setup_helpers/cmake.py | 2 1 + 1 - 0 !
torch/CMakeLists.txt | 10 8 + 2 - 0 !
8 files changed, 48 insertions(+), 35 deletions(-)

 the elegant patching work is based on the master branch
    https://github.com/pytorch/pytorch/issues/14699
  And we will be able to use that solution in the next upstream release.
  I don't want to rebase my patches back to this version, so let's go with a fast, yet dirty hack.
mkldnn.patch | (download)

cmake/Modules/FindMKLDNN.cmake | 20 7 + 13 - 0 !
cmake/public/mkldnn.cmake | 2 2 + 0 - 0 !
2 files changed, 9 insertions(+), 13 deletions(-)

---
zstd.patch | (download)

cmake/Dependencies.cmake | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

---
cmake strip 3rdparty.patch | (download)

caffe2/CMakeLists.txt | 10 0 + 10 - 0 !
1 file changed, 10 deletions(-)

---
shebang.patch | (download)

.circleci/codegen_validation/normalize_yaml_fragment.py | 2 1 + 1 - 0 !
.circleci/ensure-consistency.py | 2 1 + 1 - 0 !
.circleci/generate_config_yml.py | 2 1 + 1 - 0 !
.circleci/scripts/binary_upload.sh | 2 1 + 1 - 0 !
.circleci/scripts/build_android_gradle.sh | 2 1 + 1 - 0 !
.circleci/scripts/publish_android_snapshot.sh | 2 1 + 1 - 0 !
.circleci/scripts/setup_ci_environment.sh | 2 1 + 1 - 0 !
.circleci/scripts/setup_linux_system_environment.sh | 2 1 + 1 - 0 !
.github/scripts/build_publish_nightly_docker.sh | 2 1 + 1 - 0 !
.github/scripts/ensure_actions_will_cancel.py | 2 1 + 1 - 0 !
.github/scripts/export_pytorch_labels.py | 2 1 + 1 - 0 !
.github/scripts/generate_binary_build_matrix.py | 2 1 + 1 - 0 !
.github/scripts/generate_ci_workflows.py | 2 1 + 1 - 0 !
.github/scripts/generate_pytorch_version.py | 2 1 + 1 - 0 !
.github/scripts/gitutils.py | 2 1 + 1 - 0 !
.github/scripts/install_nvidia_utils_linux.sh | 2 1 + 1 - 0 !
.github/scripts/lint_native_functions.py | 2 1 + 1 - 0 !
.github/scripts/parse_ref.py | 2 1 + 1 - 0 !
.github/scripts/process_commit.py | 2 1 + 1 - 0 !
.github/scripts/report_git_status.sh | 2 1 + 1 - 0 !
.github/scripts/test_trymerge.py | 2 1 + 1 - 0 !
.github/scripts/trymerge.py | 2 1 + 1 - 0 !
.github/scripts/tryrebase.py | 2 1 + 1 - 0 !
.jenkins/pytorch/build-mobile.sh | 2 1 + 1 - 0 !
.jenkins/pytorch/codegen-test.sh | 2 1 + 1 - 0 !
.jenkins/pytorch/win-test-helpers/run_python_nn_smoketests.py | 2 1 + 1 - 0 !
aten/src/ATen/gen_vulkan_glsl.py | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/configure.py | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/deps/clog/configure.py | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-arm64.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-armv7.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-android-x86.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-arm64.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-arm64e.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-armv7.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-armv7s.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-i386.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-ios-x86_64.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/build-local.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-arm64.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-armv7.sh | 2 1 + 1 - 0 !
aten/src/ATen/native/quantized/cpu/qnnpack/scripts/test-android-x86.sh | 2 1 + 1 - 0 !
aten/src/ATen/nnapi/codegen.py | 2 1 + 1 - 0 !
benchmarks/distributed/ddp/benchmark.py | 2 1 + 1 - 0 !
benchmarks/distributed/ddp/diff.py | 2 1 + 1 - 0 !
binaries/bench_gen/bench_gen.py | 2 1 + 1 - 0 !
caffe2/contrib/gloo/gloo_test.py | 2 1 + 1 - 0 !
caffe2/core/nomnigraph/op_gen.py | 2 1 + 1 - 0 !
caffe2/proto/gen_proto_typestubs.sh | 2 1 + 1 - 0 !
caffe2/python/allcompare_test.py | 2 1 + 1 - 0 !
caffe2/python/benchmark_generator.py | 2 1 + 1 - 0 !
caffe2/python/fakefp16_transform_lib.py | 2 1 + 1 - 0 !
caffe2/python/lazy_dyndep_test.py | 2 1 + 1 - 0 !
caffe2/python/operator_test/alias_with_name_test.py | 2 1 + 1 - 0 !
caffe2/python/operator_test/async_net_barrier_test.py | 2 1 + 1 - 0 !
caffe2/python/operator_test/unsafe_coalesce_test.py | 2 1 + 1 - 0 !
caffe2/python/test/inference_lstm_op_test.py | 2 1 + 1 - 0 !
docs/caffe2/process.py | 2 1 + 1 - 0 !
scripts/build_tizen.sh | 2 1 + 1 - 0 !
scripts/release/anaconda-prune/prune.sh | 2 1 + 1 - 0 !
scripts/release/anaconda-prune/run.sh | 2 1 + 1 - 0 !
scripts/release/cut-release-branch.sh | 2 1 + 1 - 0 !
scripts/release/promote/common_utils.sh | 2 1 + 1 - 0 !
scripts/release/promote/conda_to_conda.sh | 2 1 + 1 - 0 !
scripts/release/promote/prep_binary_for_pypi.sh | 2 1 + 1 - 0 !
scripts/release/promote/s3_to_s3.sh | 2 1 + 1 - 0 !
scripts/release/promote/wheel_to_pypi.sh | 2 1 + 1 - 0 !
scripts/release/restore-backup.sh | 2 1 + 1 - 0 !
test/distributed/argparse_util_test.py | 2 1 + 1 - 0 !
test/distributed/bin/test_script.py | 2 1 + 1 - 0 !
test/distributed/elastic/agent/server/test/__init__.py | 2 1 + 1 - 0 !
test/distributed/elastic/agent/server/test/api_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/agent/server/test/local_elastic_agent_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/events/lib_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/metrics/__init__.py | 2 1 + 1 - 0 !
test/distributed/elastic/metrics/api_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/api_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/bin/echo1.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/bin/echo2.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/bin/echo3.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/bin/test_script.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/bin/zombie_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/errors/api_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/errors/error_handler_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/redirects_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/multiprocessing/tail_log_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/timer/local_timer_example.py | 2 1 + 1 - 0 !
test/distributed/elastic/utils/__init__.py | 2 1 + 1 - 0 !
test/distributed/elastic/utils/data/__init__.py | 2 1 + 1 - 0 !
test/distributed/elastic/utils/data/cycling_iterator_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/utils/distributed_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/utils/logging_test.py | 2 1 + 1 - 0 !
test/distributed/elastic/utils/util_test.py | 2 1 + 1 - 0 !
test/distributed/launcher/__init__.py | 2 1 + 1 - 0 !
test/distributed/launcher/api_test.py | 2 1 + 1 - 0 !
test/distributed/launcher/bin/test_script.py | 2 1 + 1 - 0 !
test/distributed/launcher/bin/test_script_init_method.py | 2 1 + 1 - 0 !
test/distributed/launcher/bin/test_script_is_torchelastic_launched.py | 2 1 + 1 - 0 !
test/distributed/launcher/bin/test_script_local_rank.py | 2 1 + 1 - 0 !
test/distributed/launcher/launch_test.py | 2 1 + 1 - 0 !
test/distributed/launcher/run_test.py | 2 1 + 1 - 0 !
test/distributed/nn/jit/test_instantiator.py | 2 1 + 1 - 0 !
test/distributed/rpc/cuda/test_tensorpipe_agent.py | 2 1 + 1 - 0 !
test/distributed/rpc/test_faulty_agent.py | 2 1 + 1 - 0 !
test/distributed/rpc/test_share_memory.py | 2 1 + 1 - 0 !
test/distributed/rpc/test_tensorpipe_agent.py | 2 1 + 1 - 0 !
test/run_test.py | 2 1 + 1 - 0 !
test/scripts/run_cuda_memcheck.py | 2 1 + 1 - 0 !
test/test_bundled_images.py | 2 1 + 1 - 0 !
test/test_bundled_inputs.py | 2 1 + 1 - 0 !
test/test_model_dump.py | 2 1 + 1 - 0 !
test/test_nnapi.py | 2 1 + 1 - 0 !
test/test_testing.py | 8 4 + 4 - 0 !
third_party/build_bundled.py | 2 1 + 1 - 0 !
third_party/generate-cpuinfo-wrappers.py | 2 1 + 1 - 0 !
third_party/generate-xnnpack-wrappers.py | 2 1 + 1 - 0 !
tools/amd_build/build_amd.py | 2 1 + 1 - 0 !
tools/code_analyzer/gen_operators_yaml.py | 2 1 + 1 - 0 !
tools/code_analyzer/gen_oplist.py | 2 1 + 1 - 0 !
tools/code_coverage/oss_coverage.py | 2 1 + 1 - 0 !
tools/extract_scripts.py | 6 3 + 3 - 0 !
tools/fast_nvcc/fast_nvcc.py | 2 1 + 1 - 0 !
tools/linter/adapters/nativefunctions_linter.py | 2 1 + 1 - 0 !
tools/linter/adapters/testowners_linter.py | 2 1 + 1 - 0 !
tools/lite_interpreter/gen_selected_mobile_ops_header.py | 2 1 + 1 - 0 !
tools/nightly.py | 2 1 + 1 - 0 !
tools/onnx/update_default_opset_version.py | 2 1 + 1 - 0 !
tools/render_junit.py | 2 1 + 1 - 0 !
tools/stats/import_test_stats.py | 2 1 + 1 - 0 !
tools/stats/print_test_stats.py | 2 1 + 1 - 0 !
tools/stats/test_history.py | 2 1 + 1 - 0 !
tools/testing/explicit_ci_jobs.py | 2 1 + 1 - 0 !
tools/vscode_settings.py | 2 1 + 1 - 0 !
torch/_appdirs.py | 2 1 + 1 - 0 !
torch/csrc/jit/tensorexpr/codegen_external.py | 2 1 + 1 - 0 !
torch/distributed/argparse_util.py | 2 1 + 1 - 0 !
torch/distributed/elastic/agent/server/__init__.py | 2 1 + 1 - 0 !
torch/distributed/elastic/agent/server/api.py | 2 1 + 1 - 0 !
torch/distributed/elastic/agent/server/local_elastic_agent.py | 2 1 + 1 - 0 !
torch/distributed/elastic/events/api.py | 2 1 + 1 - 0 !
torch/distributed/elastic/events/handlers.py | 2 1 + 1 - 0 !
torch/distributed/elastic/metrics/api.py | 2 1 + 1 - 0 !
torch/distributed/elastic/multiprocessing/__init__.py | 2 1 + 1 - 0 !
torch/distributed/elastic/multiprocessing/api.py | 2 1 + 1 - 0 !
torch/distributed/elastic/multiprocessing/errors/__init__.py | 2 1 + 1 - 0 !
torch/distributed/elastic/multiprocessing/errors/error_handler.py | 2 1 + 1 - 0 !
torch/distributed/elastic/multiprocessing/errors/handlers.py | 2 1 + 1 - 0 !
torch/distributed/elastic/multiprocessing/tail_log.py | 2 1 + 1 - 0 !
torch/distributed/elastic/rendezvous/etcd_rendezvous.py | 2 1 + 1 - 0 !
torch/distributed/elastic/rendezvous/etcd_server.py | 2 1 + 1 - 0 !
torch/distributed/elastic/rendezvous/static_tcp_rendezvous.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/__init__.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/api.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/data/__init__.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/data/cycling_iterator.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/data/elastic_distributed_sampler.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/distributed.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/log_level.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/logging.py | 2 1 + 1 - 0 !
torch/distributed/elastic/utils/store.py | 2 1 + 1 - 0 !
torch/distributed/launcher/api.py | 2 1 + 1 - 0 !
torch/distributed/rpc/_testing/faulty_agent_backend_registry.py | 2 1 + 1 - 0 !
torch/distributed/run.py | 2 1 + 1 - 0 !
torch/testing/_internal/distributed/ddp_under_dist_autograd_test.py | 2 1 + 1 - 0 !
torch/testing/_internal/distributed/rpc_utils.py | 2 1 + 1 - 0 !
torch/utils/bundled_inputs.py | 2 1 + 1 - 0 !
torch/utils/data/dataloader.py | 2 1 + 1 - 0 !
torch/utils/hipify/hipify_python.py | 2 1 + 1 - 0 !
torch/utils/model_dump/__init__.py | 2 1 + 1 - 0 !
torch/utils/model_dump/__main__.py | 2 1 + 1 - 0 !
torch/utils/show_pickle.py | 2 1 + 1 - 0 !
torchgen/decompositions/gen_jit_decompositions.py | 2 1 + 1 - 0 !
torchgen/operator_versions/gen_mobile_upgraders.py | 2 1 + 1 - 0 !
torchgen/shape_functions/gen_jit_shape_functions.py | 2 1 + 1 - 0 !
174 files changed, 179 insertions(+), 179 deletions(-)

 change shebang
  find . -type f -name '*.py' -exec sed -i -e 's@#!/usr/bin/env @#!/usr/bin/@g' '{}' \;
  find . -type f -name '*.sh' -exec sed -i -e 's@#!/usr/bin/env @#!/usr/bin/@g' '{}' \;   
pytorch_glog_update.patch | (download)

c10/util/Logging.cpp | 12 1 + 11 - 0 !
1 file changed, 1 insertion(+), 11 deletions(-)

 move isgooglelogginginitialized() to public api
 It was an internal function and project used hacks to reach it. Now it's part
 of the public API.
flatbuffers v2.0.8.patch | (download)

torch/csrc/jit/mobile/flatbuffer_loader.cpp | 58 29 + 29 - 0 !
torch/csrc/jit/serialization/flatbuffer_serializer.cpp | 46 23 + 23 - 0 !
torch/csrc/jit/serialization/mobile_bytecode_generated.h | 272 138 + 134 - 0 !
3 files changed, 190 insertions(+), 186 deletions(-)

 flatbuffers api breakage fix
 in debian/rules, you can find a line invoking `flatc` to generate some cpp
 code from flatbuffers protocol file. The pytorch upstream code is based on
 some early version of flatbuffers, while our flatbuffers version (v2.0.8)
 is much newer than that supported by pytorch upstream. As a result, there
 are some API mismatches. This patch is to fix these API mismatch and hence
 fix FTBFS.
fix wrong shebang.patch | (download)

torch/distributed/elastic/__init__.py | 2 1 + 1 - 0 !
torch/distributed/elastic/events/__init__.py | 2 1 + 1 - 0 !
torch/distributed/elastic/metrics/__init__.py | 2 1 + 1 - 0 !
torch/distributed/launcher/__init__.py | 2 1 + 1 - 0 !
4 files changed, 4 insertions(+), 4 deletions(-)

 fix wrong shebang
fmtlib revert.patch | (download)

torch/csrc/Exceptions.cpp | 13 4 + 9 - 0 !
1 file changed, 4 insertions(+), 9 deletions(-)

 revert the string formatting overhead.
 Basically a partial revert of this: https://github.com/pytorch/pytorch/pull/76977
 we encountered a strange FTBFS issue when compiling against libfmt.
 reverting back to c++ std and try again.
 This patch is not yet verified.
0009 Fix corner cases with permute 88226.patch | (download)

functorch/csrc/dim/dim.cpp | 3 3 + 0 - 0 !
1 file changed, 3 insertions(+)

 fix corner cases with permute (#88226)

Previously the permute function was extended to behave like the `order`
function for first-class dimensions. However, unlike `permute`,
`order` doesn't have a keyword argment `dims`, and there is no way to add
it in a way that makes both permute an order to continue to have the same
behavior. So this change just removes the extra functionality of permute,
which wasn't documented anyway. Fixes #88187
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88226
Approved by: https://github.com/zou3519

0010 fix possible overflow 83389.patch | (download)

functorch/csrc/dim/dim.cpp | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 fix possible overflow (#83389)

Fix some errors detected by static analysis.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/83389
Approved by: https://github.com/zou3519

0011 Use python compat from python pythoncapi_compat 9116.patch | (download)

functorch/csrc/dim/dim.cpp | 4 0 + 4 - 0 !
1 file changed, 4 deletions(-)

 use python compat from python/pythoncapi_compat (#91163)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/91163
Approved by: https://github.com/ezyang

0013 Fix test_math_ops for python 3.11 91774.patch | (download)

test/test_jit.py | 6 5 + 1 - 0 !
1 file changed, 5 insertions(+), 1 deletion(-)

 fix `test_math_ops` for python-3.11 (#91774)

From [math.pow](https://docs.python.org/3/library/math.html#math.pow) documentation:
> Changed in version 3.11: The special cases `pow(0.0, -inf)` and `pow(-0.0, -inf)` were changed to return `inf` instead of raising [`ValueError`](https://docs.python.org/3/library/exceptions.html#ValueError), for consistency with IEEE 754.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/91774
Approved by: https://github.com/ngimel

0014 Skip builtins while enumerating class methods 91805.patch | (download)

torch/_jit_internal.py | 4 4 + 0 - 0 !
1 file changed, 4 insertions(+)

 skip builtins while enumerating class methods (#91805)

This is needed to support `enum.Enum` derived classes in Python-3.11
that adds `_new_member_` to classdict, see:
https://github.com/python/cpython/blob/15c44789bb125b93e96815a336ec73423c47508e/Lib/enum.py#L529

Following snippet illustrates the problem with the previous iteration of
the code on 3.11:
```python
from enum import Enum
import inspect

class Color(Enum):
    RED = 1
    GREEN = 2

def print_routines(cls):
    print(cls.__name__)
    for name in cls.__dict__:
        fn = getattr(cls, name)
        if inspect.isroutine(fn):
            print(name, fn, f"has_globals: {hasattr(fn, '__globals__')}")

print_routines(Color)
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/91805
Approved by: https://github.com/albanD, https://github.com/suo

0015 Add missing gc untrack for cpp autograd Nodes 92351.patch | (download)

torch/csrc/autograd/python_cpp_function.cpp | 1 1 + 0 - 0 !
1 file changed, 1 insertion(+)

 add missing gc untrack for cpp autograd nodes (#92351)

Fixes https://github.com/pytorch/pytorch/issues/91161 the assertion after the warning seems to be linked to the fact that we didn't untrack this properly.
In 3.11 they added a warning when this is not called properly before tp_free
Pull Request resolved: https://github.com/pytorch/pytorch/pull/92351
Approved by: https://github.com/ezyang