Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update torch requirement from <1.14.0,>=1.7.0 to >=1.7.0,<3.0.0 #758

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 16, 2023

Updates the requirements on torch to permit the latest version.

Release notes

Sourced from torch's releases.

PyTorch 2.0: Our next generation release that is faster, more Pythonic and Dynamic as ever

PyTorch 2.0 Release notes

  • Highlights
  • Backwards Incompatible Changes
  • Deprecations
  • New Features
  • Improvements
  • Bug fixes
  • Performance
  • Documentation

Highlights

We are excited to announce the release of PyTorch® 2.0 (release note) which we highlighted during the PyTorch Conference on 12/2/22! PyTorch 2.0 offers the same eager-mode development and user experience, while fundamentally changing and supercharging how PyTorch operates at compiler level under the hood with faster performance and support for Dynamic Shapes and Distributed.

This next-generation release includes a Stable version of Accelerated Transformers (formerly called Better Transformers); Beta includes torch.compile as the main API for PyTorch 2.0, the scaled_dot_product_attention function as part of torch.nn.functional, the MPS backend, functorch APIs in the torch.func module; and other Beta/Prototype improvements across various inferences, performance and training optimization features on GPUs and CPUs. For a comprehensive introduction and technical overview of torch.compile, please visit the 2.0 Get Started page.

Along with 2.0, we are also releasing a series of beta updates to the PyTorch domain libraries, including those that are in-tree, and separate libraries including TorchAudio, TorchVision, and TorchText. An update for TorchX is also being released as it moves to community supported mode. More details can be found in this library blog.

This release is composed of over 4,541 commits and 428 contributors since 1.13.1. We want to sincerely thank our dedicated community for your contributions. As always, we encourage you to try these out and report any issues as we improve 2.0 and the overall 2-series this year.

Summary:

  • torch.compile is the main API for PyTorch 2.0, which wraps your model and returns a compiled model. It is a fully additive (and optional) feature and hence 2.0 is 100% backward compatible by definition.
  • As an underpinning technology of torch.compile, TorchInductor with Nvidia and AMD GPUs will rely on OpenAI Triton deep learning compiler to generate performant code and hide low level hardware details. OpenAI Triton-generated kernels achieve performance that's on par with hand-written kernels and specialized cuda libraries such as cublas.
  • Accelerated Transformers introduce high-performance support for training and inference using a custom kernel architecture for scaled dot product attention (SPDA). The API is integrated with torch.compile() and model developers may also use the scaled dot product attention kernels directly by calling the new scaled_dot_product_attention() operator.
  • Metal Performance Shaders (MPS) backend provides GPU accelerated PyTorch training on Mac platforms with added support for Top 60 most used ops, bringing coverage to over 300 operators.
  • Amazon AWS optimize the PyTorch CPU inference on AWS Graviton3 based C7g instances. PyTorch 2.0 improves inference performance on Graviton compared to the previous releases, including improvements for Resnet50 and Bert.
  • New prototype features and technologies across TensorParallel, DTensor, 2D parallel, TorchDynamo, AOTAutograd, PrimTorch and TorchInductor.

... (truncated)

Changelog

Sourced from torch's changelog.

Releasing PyTorch

Release Compatibility Matrix

Following is the Release Compatibility Matrix for PyTorch releases:

PyTorch version Python Stable CUDA Experimental CUDA
2.0 >=3.8, <=3.11 CUDA 11.7, CUDNN 8.5.0.96 CUDA 11.8, CUDNN 8.7.0.84
1.13 >=3.7, <=3.10 CUDA 11.6, CUDNN 8.3.2.44 CUDA 11.7, CUDNN 8.5.0.96
1.12 >=3.7, <=3.10 CUDA 11.3, CUDNN 8.3.2.44 CUDA 11.6, CUDNN 8.3.2.44

General Overview

Releasing a new version of PyTorch generally entails 3 major steps:

... (truncated)

Commits

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Mar 16, 2023
@dependabot dependabot bot requested review from ascillitoe, jklaise and mauicv March 16, 2023 07:57
@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2023

Codecov Report

Merging #758 (e267fed) into master (3992180) will decrease coverage by 0.34%.
The diff coverage is n/a.

❗ Current head e267fed differs from pull request most recent head 5a8e2ed. Consider uploading reports for the commit 5a8e2ed to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #758      +/-   ##
==========================================
- Coverage   81.03%   80.69%   -0.34%     
==========================================
  Files         146      144       -2     
  Lines        9721     9577     -144     
==========================================
- Hits         7877     7728     -149     
- Misses       1844     1849       +5     
Flag Coverage Δ
ubuntu-latest-3.7 80.69% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 26 files with indirect coverage changes

@dependabot dependabot bot force-pushed the dependabot/pip/torch-gte-1.7.0-and-lt-2.1.0 branch from 329188c to a74d225 Compare April 5, 2023 12:41
Updates the requirements on [torch](https://github.com/pytorch/pytorch) to permit the latest version.
- [Release notes](https://github.com/pytorch/pytorch/releases)
- [Changelog](https://github.com/pytorch/pytorch/blob/master/RELEASE.md)
- [Commits](pytorch/pytorch@v1.7.0...v2.0.0)

---
updated-dependencies:
- dependency-name: torch
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/torch-gte-1.7.0-and-lt-2.1.0 branch from a74d225 to e267fed Compare April 5, 2023 14:20
@jklaise
Copy link
Contributor

jklaise commented Apr 18, 2023

@mauicv as you're pushing to this branch, could you change the upper version bound to <3.0 and change the title of the PR too please?

@mauicv mauicv changed the title Update torch requirement from <1.14.0,>=1.7.0 to >=1.7.0,<2.1.0 Update torch requirement from <1.14.0,>=1.7.0 to >=1.7.0,<3.0.0 Apr 18, 2023
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github May 9, 2023

A newer version of torch exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@jklaise jklaise mentioned this pull request Jun 19, 2023
5 tasks
@jklaise
Copy link
Contributor

jklaise commented Jun 19, 2023

Due to pytorch/pytorch#97580 to unblock our CI running with torch 2.0 and tensorflow 2.12 we should see if we can force the import order to be torch first then tensorflow. Nothing that alibi doesn't have this issue.

@julien-blanchon
Copy link

Yes please bump the pytorch to 2.0

@ascillitoe
Copy link
Contributor

ascillitoe commented Jul 6, 2023

Additional note, from the torch docs:

Currently, PyTorch on Windows only supports Python 3.8-3.11; Python 2.x is not supported.

torch 2.0 doesn't support Windows, so we'll have to reflect that in the Windows tests... Correction, the Windows tests will simply run an older torch version...

@CLAassistant
Copy link

CLAassistant commented May 7, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants