python-torch/releases.html

5182 lines
562 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<link rel="dns-prefetch" href="https://github.githubassets.com/">
<link rel="dns-prefetch" href="https://avatars0.githubusercontent.com/">
<link rel="dns-prefetch" href="https://avatars1.githubusercontent.com/">
<link rel="dns-prefetch" href="https://avatars2.githubusercontent.com/">
<link rel="dns-prefetch" href="https://avatars3.githubusercontent.com/">
<link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com/">
<link rel="dns-prefetch" href="https://user-images.githubusercontent.com/">
<link crossorigin="anonymous" media="all" integrity="sha512-xnQIMZDOHZTyEPkXHdiwqBPPUAyzDzAU5iDJa6OfzDqwhJdI+0IyBajpzgDAKoegEWUXs4Ze9+/jGhP/OMD98w==" rel="stylesheet" href="releases_files/frameworks-c674083190ce1d94f210f9171dd8b0a8.css">
<link crossorigin="anonymous" media="all" integrity="sha512-rjE+eBPAhjq4TouR/xBwBnZhFDQBWm2j/705S1XcBj0g7cXxCbGRxVb/+dMzD8uGWMzoTPK4LU4a+3UXgUdspQ==" rel="stylesheet" href="releases_files/github-ae313e7813c0863ab84e8b91ff107006.css">
<meta name="viewport" content="width=device-width">
<title>Releases · pytorch/pytorch</title>
<meta name="description" content="Tensors and Dynamic neural networks in Python with strong GPU acceleration - pytorch/pytorch">
<link rel="search" type="application/opensearchdescription+xml" href="https://github.com/opensearch.xml" title="GitHub">
<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<meta property="fb:app_id" content="1401488693436528">
<meta name="apple-itunes-app" content="app-id=1477376905">
<meta name="twitter:image:src" content="https://avatars2.githubusercontent.com/u/21003710?s=400&amp;v=4"><meta name="twitter:site" content="@github"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="pytorch/pytorch"><meta name="twitter:description" content="Tensors and Dynamic neural networks in Python with strong GPU acceleration - pytorch/pytorch">
<meta property="og:image" content="https://avatars2.githubusercontent.com/u/21003710?s=400&amp;v=4"><meta property="og:site_name" content="GitHub"><meta property="og:type" content="object"><meta property="og:title" content="pytorch/pytorch"><meta property="og:url" content="https://github.com/pytorch/pytorch"><meta property="og:description" content="Tensors and Dynamic neural networks in Python with strong GPU acceleration - pytorch/pytorch">
<link rel="assets" href="https://github.githubassets.com/">
<link rel="shared-web-socket" href="wss://live.github.com/_luau/eyJ2IjoiVjMiLCJ1IjoyMTg5OTMwLCJzIjo0ODc5MTc5MjMsImMiOjEwNjQzOTAwODEsInQiOjE1OTI5MjY0MjR9--4ab0eb04ab2c930a7af086d0745f8b9b305319d51491dbf61cd893035752e7e1" data-refresh-url="/_ws">
<link rel="sudo-modal" href="https://github.com/sessions/sudo_modal">
<meta name="request-id" content="81E2:D4BB:2A94361:3CB5B60:5EF220D6" data-pjax-transient="true"><meta name="html-safe-nonce" content="63cf28986171eba6e85014f1ef02269d3e1cee5a" data-pjax-transient="true"><meta name="visitor-payload" content="eyJyZWZlcnJlciI6Imh0dHBzOi8vZ2l0aHViLmNvbS9weXRvcmNoL3B5dG9yY2gvdHJlZS92MS41LjEiLCJyZXF1ZXN0X2lkIjoiODFFMjpENEJCOjJBOTQzNjE6M0NCNUI2MDo1RUYyMjBENiIsInZpc2l0b3JfaWQiOiI2MTU5NjY1OTUyMjY4OTA1NzI1IiwicmVnaW9uX2VkZ2UiOiJhbXMiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=" data-pjax-transient="true"><meta name="visitor-hmac" content="d7d3f85e88451c7460ab52072bc025840584a609feaef8956fde615909648b6a" data-pjax-transient="true">
<meta name="github-keyboard-shortcuts" content="repository" data-pjax-transient="true">
<meta name="selected-link" value="repo_releases" data-pjax-transient="">
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY">
<meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU">
<meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA">
<meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc">
<meta name="octolytics-host" content="collector.githubapp.com"><meta name="octolytics-app-id" content="github"><meta name="octolytics-event-url" content="https://collector.githubapp.com/github-external/browser_event"><meta name="octolytics-dimension-ga_id" content="" class="js-octo-ga-id"><meta name="octolytics-actor-id" content="2189930"><meta name="octolytics-actor-login" content="mslacken"><meta name="octolytics-actor-hash" content="9badaf2026d84d5acd76e2d5942ecb58e77e600be11832208089a7ac4865ca11">
<meta name="analytics-location" content="/&lt;user-name&gt;/&lt;repo-name&gt;/releases/index" data-pjax-transient="true">
<meta name="optimizely-datafile" content="{}">
<meta class="js-ga-set" name="userId" content="aec8fae2bac15e96f301ee80f3e7267c">
<meta class="js-ga-set" name="dimension10" content="Responsive" data-pjax-transient="">
<meta class="js-ga-set" name="dimension1" content="Logged In">
<meta name="hostname" content="github.com">
<meta name="user-login" content="mslacken">
<meta name="expected-hostname" content="github.com">
<meta name="js-proxy-site-detection-payload" content="OWY3N2UyMWM5MjlhMDJiNmQxNGM3Y2ViZDk5M2U2MmRhMTZlYjZlODgxNjgwZmY5NTE0ZTM3YzkyY2Y3OTM2ZHx7InJlbW90ZV9hZGRyZXNzIjoiNjIuMjI0Ljg4LjE5IiwicmVxdWVzdF9pZCI6IjgxRTI6RDRCQjoyQTk0MzYxOjNDQjVCNjA6NUVGMjIwRDYiLCJ0aW1lc3RhbXAiOjE1OTI5MjY0MjQsImhvc3QiOiJnaXRodWIuY29tIn0=">
<meta name="enabled-features" content="MARKETPLACE_PENDING_INSTALLATIONS,PAGE_STALE_CHECK,PRIMER_NEXT">
<meta http-equiv="x-pjax-version" content="37c80835ed90927534ff8f32172969c7">
<link rel="alternate" type="application/atom+xml" title="pytorch Release Notes" href="https://github.com/pytorch/pytorch/releases.atom">
<link rel="alternate" type="application/atom+xml" title="pytorch Tags" href="https://github.com/pytorch/pytorch/tags.atom">
<link href="https://github.com/pytorch/pytorch/commits/master.atom" rel="alternate" title="Recent Commits to pytorch:master" type="application/atom+xml">
<meta name="go-import" content="github.com/pytorch/pytorch git https://github.com/pytorch/pytorch.git">
<meta name="octolytics-dimension-user_id" content="21003710"><meta name="octolytics-dimension-user_login" content="pytorch"><meta name="octolytics-dimension-repository_id" content="65600975"><meta name="octolytics-dimension-repository_nwo" content="pytorch/pytorch"><meta name="octolytics-dimension-repository_public" content="true"><meta name="octolytics-dimension-repository_is_fork" content="false"><meta name="octolytics-dimension-repository_network_root_id" content="65600975"><meta name="octolytics-dimension-repository_network_root_nwo" content="pytorch/pytorch"><meta name="octolytics-dimension-repository_explore_github_marketplace_ci_cta_shown" content="false">
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000">
<link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png">
<link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327">
<link rel="manifest" href="https://github.com/manifest.json" crossorigin="use-credentials">
</head>
<body class="logged-in env-production page-responsive">
<div class="position-relative js-header-wrapper ">
<a href="#start-of-content" class="p-3 bg-blue text-white show-on-focus js-skip-to-content">Skip to content</a>
<span class="Progress progress-pjax-loader position-fixed width-full js-pjax-loader-bar">
<span class="progress-pjax-loader-bar top-0 left-0" style="width: 0%;"></span>
</span>
<header class="Header py-lg-0 js-details-container Details flex-wrap flex-lg-nowrap p-responsive" role="banner">
<div class="Header-item d-none d-lg-flex">
<a class="Header-link" href="https://github.com/" data-hotkey="g d" aria-label="Homepage " data-ga-click="Header, go to dashboard, icon:logo">
<svg class="octicon octicon-mark-github v-align-middle" height="32" viewBox="0 0 16 16" version="1.1" width="32" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
</div>
<div class="Header-item d-lg-none">
<button class="Header-link btn-link js-details-target" type="button" aria-label="Toggle navigation" aria-expanded="false">
<svg height="24" class="octicon octicon-three-bars" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"></path></svg>
</button>
</div>
<div class="Header-item Header-item--full flex-column flex-lg-row width-full flex-order-2 flex-lg-order-none mr-0 mr-lg-3 mt-3 mt-lg-0 Details-content--hidden">
<div class="header-search header-search-current js-header-search-current flex-self-stretch flex-lg-self-auto mr-0 mr-lg-3 mb-3 mb-lg-0 scoped-search site-scoped-search js-site-search position-relative js-jump-to js-header-search-current-jump-to" role="combobox" aria-owns="jump-to-results" aria-label="Search or jump to" aria-haspopup="listbox" aria-expanded="false">
<div class="position-relative">
<!-- '"` --><!-- </textarea></xmp> --><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="65600975" data-scoped-search-url="/pytorch/pytorch/search" data-unscoped-search-url="/search" action="/pytorch/pytorch/search" accept-charset="UTF-8" method="get">
<label class="form-control input-sm header-search-wrapper p-0 header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center js-chromeless-input-container">
<input type="text" class="form-control input-sm header-search-input jump-to-field js-jump-to-field js-site-search-focus js-site-search-field is-clearable" data-hotkey="s,/" name="q" placeholder="Search or jump to…" data-unscoped-placeholder="Search or jump to…" data-scoped-placeholder="Search or jump to…" autocapitalize="off" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search or jump to…" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off">
<input type="hidden" value="TEQT4xx5Z3pl8ABxHQVCJ2HDRtvdUk72f55zpXTcKqm3oWfgo4lQG8HDdZnR04I7NqKh1PW5xktpjzWoNxnQhw==" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf">
<input type="hidden" class="js-site-search-type-field" name="type">
<img src="releases_files/search-key-slash.svg" alt="" class="mr-2 header-search-key-slash">
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<ul class="d-none js-jump-to-suggestions-template-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-suggestion" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle"></span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle"></span>
</div>
</a>
</li>
</ul>
<ul class="d-none js-jump-to-no-results-template-container">
<li class="d-flex flex-justify-center flex-items-center f5 d-none js-jump-to-suggestion p-2">
<span class="text-gray">No suggested jump to results</span>
</li>
</ul>
<ul id="jump-to-results" role="listbox" class="p-0 m-0 js-navigation-container jump-to-suggestions-results-container js-jump-to-suggestions-results-container">
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-scoped-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle"></span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle"></span>
</div>
</a>
</li>
<li class="d-flex flex-justify-start flex-items-center p-0 f5 navigation-item js-navigation-item js-jump-to-global-search d-none" role="option">
<a tabindex="-1" class="no-underline d-flex flex-auto flex-items-center jump-to-suggestions-path js-jump-to-suggestion-path js-navigation-open p-2" href="">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none">
<svg height="16" width="16" class="octicon octicon-repo flex-shrink-0 js-jump-to-octicon-repo d-none" title="Repository" aria-label="Repository" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
<svg height="16" width="16" class="octicon octicon-project flex-shrink-0 js-jump-to-octicon-project d-none" title="Project" aria-label="Project" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg>
<svg height="16" width="16" class="octicon octicon-search flex-shrink-0 js-jump-to-octicon-search d-none" title="Search" aria-label="Search" viewBox="0 0 16 16" version="1.1" role="img"><path fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></path></svg>
</div>
<img class="avatar mr-2 flex-shrink-0 js-jump-to-suggestion-avatar d-none" alt="" aria-label="Team" src="" width="28" height="28">
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target">
</div>
<div class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none js-jump-to-badge-search">
<span class="js-jump-to-badge-search-text-default d-none" aria-label="in this repository">
In this repository
</span>
<span class="js-jump-to-badge-search-text-global d-none" aria-label="in all of GitHub">
All GitHub
</span>
<span aria-hidden="true" class="d-inline-block ml-1 v-align-middle"></span>
</div>
<div aria-hidden="true" class="border rounded-1 flex-shrink-0 bg-gray px-1 text-gray-light ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump">
Jump to
<span class="d-inline-block ml-1 v-align-middle"></span>
</div>
</a>
</li>
<li class="d-flex flex-justify-center flex-items-center p-0 f5 js-jump-to-suggestion">
<img src="releases_files/octocat-spinner-128.gif" alt="Octocat Spinner Icon" class="m-2" width="28">
</li>
</ul>
</div>
</label>
</form> </div>
</div>
<nav class="d-flex flex-column flex-lg-row flex-self-stretch flex-lg-self-auto" aria-label="Global">
<a class="Header-link py-lg-3 d-block d-lg-none py-2 border-top border-lg-top-0 border-white-fade-15" data-ga-click="Header, click, Nav menu - item:dashboard:user" aria-label="Dashboard" href="https://github.com/dashboard">
Dashboard
</a>
<a class="js-selected-navigation-item Header-link py-lg-3 mr-0 mr-lg-3 py-2 border-top border-lg-top-0 border-white-fade-15" data-hotkey="g p" data-ga-click="Header, click, Nav menu - item:pulls context:user" aria-label="Pull requests you created" data-selected-links="/pulls /pulls/assigned /pulls/mentioned /pulls" href="https://github.com/pulls">
Pull requests
</a>
<a class="js-selected-navigation-item Header-link py-lg-3 mr-0 mr-lg-3 py-2 border-top border-lg-top-0 border-white-fade-15" data-hotkey="g i" data-ga-click="Header, click, Nav menu - item:issues context:user" aria-label="Issues you created" data-selected-links="/issues /issues/assigned /issues/mentioned /issues" href="https://github.com/issues">
Issues
</a>
<div class="mr-0 mr-lg-3 py-2 py-lg-0 border-top border-lg-top-0 border-white-fade-15">
<a class="js-selected-navigation-item Header-link py-lg-3 d-inline-block" data-ga-click="Header, click, Nav menu - item:marketplace context:user" data-octo-click="marketplace_click" data-octo-dimensions="location:nav_bar" data-selected-links=" /marketplace" href="https://github.com/marketplace">
Marketplace
</a>
</div>
<a class="js-selected-navigation-item Header-link py-lg-3 mr-0 mr-lg-3 py-2 border-top border-lg-top-0 border-white-fade-15" data-ga-click="Header, click, Nav menu - item:explore" data-selected-links="/explore /trending /trending/developers /integrations /integrations/feature/code /integrations/feature/collaborate /integrations/feature/ship showcases showcases_search showcases_landing /explore" href="https://github.com/explore">
Explore
</a>
<a class="Header-link d-block d-lg-none mr-0 mr-lg-3 py-2 py-lg-3 border-top border-lg-top-0 border-white-fade-15" href="https://github.com/mslacken">
<img class="avatar avatar-user" src="releases_files/2189930.png" alt="@mslacken" width="20" height="20">
mslacken
</a>
<!-- '"` --><!-- </textarea></xmp> --><form action="/logout" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="CxIDTrimjFtYmMdTN0mp8hN8B6So1zp3W5Q6P9f9PRFYsQXLLO8ss9ODzR4jA8C/JTlFe9pOvg7mbBYCVXpH+w==">
<button type="submit" class="Header-link mr-0 mr-lg-3 py-2 py-lg-3 border-top border-lg-top-0 border-white-fade-15 d-lg-none btn-link d-block width-full text-left" data-ga-click="Header, sign out, icon:logout" style="padding-left: 2px;">
<svg class="octicon octicon-sign-out v-align-middle" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 2.75C2 1.784 2.784 1 3.75 1h2.5a.75.75 0 010 1.5h-2.5a.25.25 0 00-.25.25v10.5c0 .138.112.25.25.25h2.5a.75.75 0 010 1.5h-2.5A1.75 1.75 0 012 13.25V2.75zm10.44 4.5H6.75a.75.75 0 000 1.5h5.69l-1.97 1.97a.75.75 0 101.06 1.06l3.25-3.25a.75.75 0 000-1.06l-3.25-3.25a.75.75 0 10-1.06 1.06l1.97 1.97z"></path></svg>
Sign out
</button>
</form></nav>
</div>
<div class="Header-item Header-item--full flex-justify-center d-lg-none position-relative">
<div class="css-truncate css-truncate-target width-fit position-absolute left-0 right-0 text-center">
<svg class="octicon octicon-repo" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
<a class="Header-link" href="https://github.com/pytorch">pytorch</a>
/
<a class="Header-link" href="https://github.com/pytorch/pytorch">pytorch</a>
</div>
</div>
<div class="Header-item mr-0 mr-lg-3 flex-order-1 flex-lg-order-none">
<a aria-label="You have unread notifications" class="Header-link notification-indicator position-relative tooltipped tooltipped-sw js-socket-channel js-notification-indicator" data-hotkey="g n" data-ga-click="Header, go to notifications, icon:unread" data-channel="eyJjIjoibm90aWZpY2F0aW9uLWNoYW5nZWQ6MjE4OTkzMCIsInQiOjE1OTI5MjY0MjR9--88a2dfa2cb93da487c2c5e04b90d6dda85ad67f9cb472ba9c47ff45695f4e8e6" href="https://github.com/notifications">
<span class="js-indicator-modifier mail-status unread"></span>
<svg class="octicon octicon-bell" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 16a2 2 0 001.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 008 16z"></path><path fill-rule="evenodd" d="M8 1.5A3.5 3.5 0 004.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.018.018 0 00-.003.01l.001.006c0 .002.002.004.004.006a.017.017 0 00.006.004l.007.001h10.964l.007-.001a.016.016 0 00.006-.004.016.016 0 00.004-.006l.001-.007a.017.017 0 00-.003-.01l-1.703-2.554a1.75 1.75 0 01-.294-.97V5A3.5 3.5 0 008 1.5zM3 5a5 5 0 0110 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.518 1.518 0 0113.482 13H2.518a1.518 1.518 0 01-1.263-2.36l1.703-2.554A.25.25 0 003 7.947V5z"></path></svg>
</a>
</div>
<div class="Header-item position-relative d-none d-lg-flex">
<details class="details-overlay details-reset">
<summary class="Header-link" aria-label="Create new…" data-ga-click="Header, create new, icon:add" aria-haspopup="menu" role="button">
<svg class="octicon octicon-plus" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 2a.75.75 0 01.75.75v4.5h4.5a.75.75 0 010 1.5h-4.5v4.5a.75.75 0 01-1.5 0v-4.5h-4.5a.75.75 0 010-1.5h4.5v-4.5A.75.75 0 018 2z"></path></svg> <span class="dropdown-caret"></span>
</summary>
<details-menu class="dropdown-menu dropdown-menu-sw mt-n2" role="menu">
<a role="menuitem" class="dropdown-item" href="https://github.com/new" data-ga-click="Header, create new repository">
New repository
</a>
<a role="menuitem" class="dropdown-item" href="https://github.com/new/import" data-ga-click="Header, import a repository">
Import repository
</a>
<a role="menuitem" class="dropdown-item" href="https://gist.github.com/" data-ga-click="Header, create new gist">
New gist
</a>
<a role="menuitem" class="dropdown-item" href="https://github.com/organizations/new" data-ga-click="Header, create new organization">
New organization
</a>
<div role="none" class="dropdown-divider"></div>
<div class="dropdown-header">
<span title="pytorch/pytorch">This repository</span>
</div>
<a role="menuitem" class="dropdown-item" href="https://github.com/pytorch/pytorch/issues/new/choose" data-ga-click="Header, create new issue" data-skip-pjax="">
New issue
</a>
</details-menu>
</details>
</div>
<div class="Header-item position-relative mr-0 d-none d-lg-flex">
<details class="details-overlay details-reset js-feature-preview-indicator-container" data-feature-preview-indicator-src="/users/mslacken/feature_preview/indicator_check">
<summary class="Header-link" aria-label="View profile and more" data-ga-click="Header, show menu, icon:avatar" aria-haspopup="menu" role="button">
<img alt="@mslacken" src="releases_files/2189930_002.png" class="avatar avatar-user " width="20" height="20">
<span class="feature-preview-indicator js-feature-preview-indicator" style="top: 10px;"></span>
<span class="dropdown-caret"></span>
</summary>
<details-menu class="dropdown-menu dropdown-menu-sw mt-n2" style="width: 180px" role="menu">
<div class="header-nav-current-user css-truncate"><a role="menuitem" class="no-underline user-profile-link px-3 pt-2 pb-2 mb-n2 mt-n1 d-block" href="https://github.com/mslacken" data-ga-click="Header, go to profile, text:Signed in as">Signed in as <strong class="css-truncate-target">mslacken</strong></a></div>
<div role="none" class="dropdown-divider"></div>
<div class="pl-3 pr-3 f6 user-status-container js-user-status-context lh-condensed" data-url="/users/status?compact=1&amp;link_mentions=0&amp;truncate=1">
<div class="js-user-status-container rounded-1 px-2 py-1 mt-2 border" data-team-hovercards-enabled="">
<details class="js-user-status-details details-reset details-overlay details-overlay-dark">
<summary class="btn-link btn-block link-gray no-underline js-toggle-user-status-edit toggle-user-status-edit " role="menuitem" data-hydro-click="{&quot;event_type&quot;:&quot;user_profile.click&quot;,&quot;payload&quot;:{&quot;profile_user_id&quot;:21003710,&quot;target&quot;:&quot;EDIT_USER_STATUS&quot;,&quot;user_id&quot;:2189930,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;}}" data-hydro-click-hmac="b99fe3724092422d4024fec8ae0ec9b1095089279d621f34f6329603fdded92a">
<div class="d-flex flex-items-center flex-items-stretch">
<div class="f6 lh-condensed user-status-header d-flex user-status-emoji-only-header circle">
<div class="user-status-emoji-container flex-shrink-0 mr-2 d-flex flex-items-center flex-justify-center lh-condensed-ultra v-align-bottom">
<svg class="octicon octicon-smiley" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM5 8a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zM5.32 9.636a.75.75 0 011.038.175l.007.009c.103.118.22.222.35.31.264.178.683.37 1.285.37.602 0 1.02-.192 1.285-.371.13-.088.247-.192.35-.31l.007-.008a.75.75 0 111.222.87l-.614-.431c.614.43.614.431.613.431v.001l-.001.002-.002.003-.005.007-.014.019a1.984 1.984 0 01-.184.213c-.16.166-.338.316-.53.445-.63.418-1.37.638-2.127.629-.946 0-1.652-.308-2.126-.63a3.32 3.32 0 01-.715-.657l-.014-.02-.005-.006-.002-.003v-.002h-.001l.613-.432-.614.43a.75.75 0 01.183-1.044h.001z"></path></svg>
</div>
</div>
<div class="
user-status-message-wrapper f6 min-width-0" style="line-height: 20px;">
<div class="css-truncate css-truncate-target width-fit text-gray-dark text-left">
<span class="text-gray">Set status</span>
</div>
</div>
</div>
</summary>
<details-dialog class="details-dialog rounded-1 anim-fade-in fast Box Box--overlay" role="dialog" tabindex="-1" aria-modal="true">
<!-- '"` --><!-- </textarea></xmp> --><form class="position-relative flex-auto js-user-status-form" action="/users/status?circle=0&amp;compact=1&amp;link_mentions=0&amp;truncate=1" accept-charset="UTF-8" method="post"><input type="hidden" name="_method" value="put"><input type="hidden" name="authenticity_token" value="3Ti39Q39ULrKI9NjdI+xZbxmE9mTB06RcvHGMctykSwgtiMGfbh5FHS1/MZbsYXEeoI1zdrJhBvUw4O/Nr0WwQ==">
<div class="Box-header bg-gray border-bottom p-3">
<button class="Box-btn-octicon js-toggle-user-status-edit btn-octicon float-right" type="reset" aria-label="Close dialog" data-close-dialog="">
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<h3 class="Box-title f5 text-bold text-gray-dark">Edit status</h3>
</div>
<input type="hidden" name="emoji" class="js-user-status-emoji-field" value="">
<input type="hidden" name="organization_id" class="js-user-status-org-id-field" value="">
<div class="px-3 py-2 text-gray-dark">
<div class="js-characters-remaining-container position-relative mt-2">
<div class="input-group d-table form-group my-0 js-user-status-form-group">
<span class="input-group-button d-table-cell v-align-middle" style="width: 1%">
<button type="button" aria-label="Choose an emoji" class="btn-outline btn js-toggle-user-status-emoji-picker btn-open-emoji-picker p-0">
<span class="js-user-status-original-emoji" hidden=""></span>
<span class="js-user-status-custom-emoji"></span>
<span class="js-user-status-no-emoji-icon">
<svg class="octicon octicon-smiley" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM5 8a1 1 0 100-2 1 1 0 000 2zm7-1a1 1 0 11-2 0 1 1 0 012 0zM5.32 9.636a.75.75 0 011.038.175l.007.009c.103.118.22.222.35.31.264.178.683.37 1.285.37.602 0 1.02-.192 1.285-.371.13-.088.247-.192.35-.31l.007-.008a.75.75 0 111.222.87l-.614-.431c.614.43.614.431.613.431v.001l-.001.002-.002.003-.005.007-.014.019a1.984 1.984 0 01-.184.213c-.16.166-.338.316-.53.445-.63.418-1.37.638-2.127.629-.946 0-1.652-.308-2.126-.63a3.32 3.32 0 01-.715-.657l-.014-.02-.005-.006-.002-.003v-.002h-.001l.613-.432-.614.43a.75.75 0 01.183-1.044h.001z"></path></svg>
</span>
</button>
</span>
<text-expander keys=": @" data-mention-url="/autocomplete/user-suggestions" data-emoji-url="/autocomplete/emoji">
<input type="text" autocomplete="off" data-no-org-url="/autocomplete/user-suggestions" data-org-url="/suggestions?mention_suggester=1" data-maxlength="80" class="d-table-cell width-full form-control js-user-status-message-field js-characters-remaining-field" placeholder="What's happening?" name="message" aria-label="What is your current status?">
</text-expander>
<div class="error">Could not update your status, please try again.</div>
</div>
<div style="margin-left: 53px" class="my-1 text-small label-characters-remaining js-characters-remaining" data-suffix="remaining" hidden="">
80 remaining
</div>
</div>
<include-fragment class="js-user-status-emoji-picker" data-url="/users/status/emoji"></include-fragment>
<div class="overflow-auto ml-n3 mr-n3 px-3 border-bottom" style="max-height: 33vh">
<div class="user-status-suggestions js-user-status-suggestions collapsed overflow-hidden">
<h4 class="f6 text-normal my-3">Suggestions:</h4>
<div class="mx-3 mt-2 clearfix">
<div class="float-left col-6">
<button type="button" value=":palm_tree:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="palm_tree" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f334.png"><img class="emoji" alt="palm_tree" src="releases_files/1f334.png" width="20" height="20"></g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
On vacation
</div>
</button>
<button type="button" value=":face_with_thermometer:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="face_with_thermometer" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f912.png"><img class="emoji" alt="face_with_thermometer" src="releases_files/1f912.png" width="20" height="20"></g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Out sick
</div>
</button>
</div>
<div class="float-left col-6">
<button type="button" value=":house:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="house" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3e0.png"><img class="emoji" alt="house" src="releases_files/1f3e0.png" width="20" height="20"></g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Working from home
</div>
</button>
<button type="button" value=":dart:" class="d-flex flex-items-baseline flex-items-stretch lh-condensed f6 btn-link link-gray no-underline js-predefined-user-status mb-1">
<div class="emoji-status-width mr-2 v-align-middle js-predefined-user-status-emoji">
<g-emoji alias="dart" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f3af.png"><img class="emoji" alt="dart" src="releases_files/1f3af.png" width="20" height="20"></g-emoji>
</div>
<div class="d-flex flex-items-center no-underline js-predefined-user-status-message ws-normal text-left" style="border-left: 1px solid transparent">
Focusing
</div>
</button>
</div>
</div>
</div>
<div class="user-status-limited-availability-container">
<div class="form-checkbox my-0">
<input type="checkbox" name="limited_availability" value="1" class="js-user-status-limited-availability-checkbox" data-default-message="I may be slow to respond." aria-describedby="limited-availability-help-text-truncate-true-compact-true" id="limited-availability-truncate-true-compact-true">
<label class="d-block f5 text-gray-dark mb-1" for="limited-availability-truncate-true-compact-true">
Busy
</label>
<p class="note" id="limited-availability-help-text-truncate-true-compact-true">
When others mention you, assign you, or request your review,
GitHub will let them know that you have limited availability.
</p>
</div>
</div>
</div>
<div class="d-inline-block f5 mr-2 pt-3 pb-2">
<div class="d-inline-block mr-1">
Clear status
</div>
<details class="js-user-status-expire-drop-down f6 dropdown details-reset details-overlay d-inline-block mr-2">
<summary class="f5 btn-link link-gray-dark border px-2 py-1 rounded-1" aria-haspopup="true">
<div class="js-user-status-expiration-interval-selected d-inline-block v-align-baseline">
Never
</div>
<div class="dropdown-caret"></div>
</summary>
<ul class="dropdown-menu dropdown-menu-se pl-0 overflow-auto" style="width: 220px; max-height: 15.5em">
<li>
<button type="button" class="btn-link dropdown-item js-user-status-expire-button ws-normal" title="Never">
<span class="d-inline-block text-bold mb-1">Never</span>
<div class="f6 lh-condensed">Keep this status until you clear your status or edit your status.</div>
</button>
</li>
<li class="dropdown-divider" role="none"></li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 30 minutes" value="2020-06-23T18:03:44+02:00">
in 30 minutes
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 1 hour" value="2020-06-23T18:33:44+02:00">
in 1 hour
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="in 4 hours" value="2020-06-23T21:33:44+02:00">
in 4 hours
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="today" value="2020-06-23T23:59:59+02:00">
today
</button>
</li>
<li>
<button type="button" class="btn-link dropdown-item ws-normal js-user-status-expire-button" title="this week" value="2020-06-28T23:59:59+02:00">
this week
</button>
</li>
</ul>
</details>
<input class="js-user-status-expiration-date-input" type="hidden" name="expires_at" value="">
</div>
<include-fragment class="js-user-status-org-picker" data-url="/users/status/organizations"></include-fragment>
</div>
<div class="d-flex flex-items-center flex-justify-between p-3 border-top">
<button type="submit" disabled="disabled" class="width-full btn btn-primary mr-2 js-user-status-submit">
Set status
</button>
<button type="button" disabled="disabled" class="width-full js-clear-user-status-button btn ml-2 ">
Clear status
</button>
</div>
</form> </details-dialog>
</details>
</div>
</div>
<div role="none" class="dropdown-divider"></div>
<a role="menuitem" class="dropdown-item" href="https://github.com/mslacken" data-ga-click="Header, go to profile, text:your profile" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;YOUR_PROFILE&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="596244f29312bddf019af45a1261bcee05dc3916f0b865106553bd7c9ca8f61c">Your profile</a>
<a role="menuitem" class="dropdown-item" href="https://github.com/mslacken?tab=repositories" data-ga-click="Header, go to repositories, text:your repositories" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;YOUR_REPOSITORIES&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="a728aebe357ded31d008ea3b7f6e41e0e87015c6191c920d80f24f42010e6929">Your repositories</a>
<a role="menuitem" class="dropdown-item" href="https://github.com/settings/organizations" data-ga-click="Header, go to organizations, text:your organizations" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;YOUR_ORGANIZATIONS&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="a49959cd987b0cbfbe9666df66301950b0042287568cc680772fe75f93dbf427">Your organizations</a>
<a role="menuitem" class="dropdown-item" href="https://github.com/mslacken?tab=projects" data-ga-click="Header, go to projects, text:your projects" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;YOUR_PROJECTS&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="9a2fe35ddcd414987d943d72a2db76a742079aaf4cb082de00eb3a33f921d43d">Your projects</a>
<a role="menuitem" class="dropdown-item" href="https://github.com/mslacken?tab=stars" data-ga-click="Header, go to starred repos, text:your stars" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;YOUR_STARS&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="3a9029fa49dff517cd46daecf6e2eead4991b49385eaaea42ff309516c27cdad">Your stars</a>
<a role="menuitem" class="dropdown-item" href="https://gist.github.com/mine" data-ga-click="Header, your gists, text:your gists" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;YOUR_GISTS&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="ebedd3947c448f521eb69f0d92f11b566e5b23e535686265efcf9d35f1918c04">Your gists</a>
<div role="none" class="dropdown-divider"></div>
<div id="feature-enrollment-toggle" class="hide-sm hide-md feature-preview-details position-relative">
<button type="button" class="dropdown-item btn-link" role="menuitem" data-feature-preview-trigger-url="/users/mslacken/feature_previews" data-feature-preview-close-details="{&quot;event_type&quot;:&quot;feature_preview.clicks.close_modal&quot;,&quot;payload&quot;:{&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-feature-preview-close-hmac="85c6987b81b51e66ab5b8913f1f9f7d7e4d80d969841f65d014450d17cc0fc50" data-hydro-click="{&quot;event_type&quot;:&quot;feature_preview.clicks.open_modal&quot;,&quot;payload&quot;:{&quot;link_location&quot;:&quot;user_dropdown&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="cf1d6438f034901e9ea87245cf78786785b1501aded11482b3bbc6075efb3382">
Feature preview
</button>
<span class="feature-preview-indicator js-feature-preview-indicator"></span>
</div>
<a role="menuitem" class="dropdown-item" href="https://help.github.com/" data-ga-click="Header, go to help, text:help" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;HELP&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="7b3da1dc5c5ef58d2ddc3b566d893696264f52e4d9f876813397cf2034765f51">Help</a>
<a role="menuitem" class="dropdown-item" href="https://github.com/settings/profile" data-ga-click="Header, go to settings, icon:settings" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;SETTINGS&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="7e1e26943ae2892f8fcb8d15c0e24b5697ded34e809f38906b178bc562905eab">Settings</a>
<!-- '"` --><!-- </textarea></xmp> --><form class="logout-form" action="/logout" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="HxrDVIpJH3YgVY6XEycGTgB3LC212E3ftk7sskX3Q6xMucXRHgC/nqtOhNoHbW8DNjJu8sdByaYLtsCPx3A5Rg==">
<button type="submit" class="dropdown-item dropdown-signout" data-ga-click="Header, sign out, icon:logout" data-hydro-click="{&quot;event_type&quot;:&quot;global_header.user_menu_dropdown.click&quot;,&quot;payload&quot;:{&quot;request_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;target&quot;:&quot;SIGN_OUT&quot;,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="a948b9f8dcbd97e7e489ceeb8846089b9fcdeb9e66f9502e6dbfcb28b5fa6312" role="menuitem">
Sign out
</button>
<input type="text" name="required_field_0824" class="form-control" hidden="hidden"><input type="hidden" name="timestamp" value="1592926424380" class="form-control"><input type="hidden" name="timestamp_secret" value="74f0fa95e0398894ab03dc95147cd25d365cc5e43fc990efc159165bc9a6f222" class="form-control">
</form> </details-menu>
</details>
</div>
</header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container">
<template class="js-flash-template">
<div class="flash flash-full js-flash-template-container">
<div class="container-lg px-2">
<button class="flash-close js-flash-close" type="button" aria-label="Dismiss this message">
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<div class="js-flash-template-message"></div>
</div>
</div>
</template>
</div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="application-main " data-commit-hovercards-enabled="" data-discussion-hovercards-enabled="" data-issue-and-pr-hovercards-enabled="">
<div itemscope="" itemtype="http://schema.org/SoftwareSourceCode" class="">
<main>
<div class="pagehead repohead hx_repohead readability-menu bg-gray-light pb-0 pt-0 pt-lg-3">
<div class="d-flex container-lg mb-4 p-responsive d-none d-lg-flex">
<div class="flex-auto min-width-0 width-fit mr-3">
<h1 class="public d-flex flex-wrap flex-items-center break-word float-none ">
<span class="flex-self-stretch" style="margin-top: -2px;">
<svg class="octicon octicon-repo" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
</span>
<span class="author ml-2 flex-self-stretch" itemprop="author">
<a class="url fn" rel="author" data-hovercard-type="organization" data-hovercard-url="/orgs/pytorch/hovercard" href="https://github.com/pytorch">pytorch</a>
</span>
<span class="path-divider flex-self-stretch">/</span>
<strong itemprop="name" class="mr-2 flex-self-stretch">
<a data-pjax="#js-repo-pjax-container" href="https://github.com/pytorch/pytorch">pytorch</a>
</strong>
</h1>
</div>
<ul class="pagehead-actions flex-shrink-0 ">
<li>
<details class="dropdown details-reset details-overlay d-inline-block float-left" data-deferred-details-content-url="/pytorch/pytorch/used_by_contents">
<summary class="btn btn-sm btn-with-count" data-menu-button="">
<svg class="octicon octicon-package v-align-text-bottom" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.878.392a1.75 1.75 0 00-1.756 0l-5.25 3.045A1.75 1.75 0 001 4.951v6.098c0 .624.332 1.2.872 1.514l5.25 3.045a1.75 1.75 0 001.756 0l5.25-3.045c.54-.313.872-.89.872-1.514V4.951c0-.624-.332-1.2-.872-1.514L8.878.392zM7.875 1.69a.25.25 0 01.25 0l4.63 2.685L8 7.133 3.245 4.375l4.63-2.685zM2.5 5.677v5.372c0 .09.047.171.125.216l4.625 2.683V8.432L2.5 5.677zm6.25 8.271l4.625-2.683a.25.25 0 00.125-.216V5.677L8.75 8.432v5.516z"></path></svg>
Used by
<div class="dropdown-caret"></div>
</summary>
<include-fragment accept="text/fragment+html">
<div class="dropdown-menu dropdown-menu-s p-3 text-center" style="width:360px;">
<img alt="Loading..." class="my-0" src="releases_files/octocat-spinner-64.gif" width="32" height="32">
<p class="pt-1 m-0 f5 text-gray-light">
Loading dependents...
</p>
</div>
</include-fragment>
</details>
<a class="social-count" href="https://github.com/pytorch/pytorch/network/dependents?package_id=UGFja2FnZS01MjY1MjIxNQ%3D%3D" aria-label="33218 repositories depend on this package">
33.2k
</a>
</li>
<li>
<!-- '"` --><!-- </textarea></xmp> --><form data-remote="true" class="js-social-form js-social-container clearfix" action="/notifications/subscribe" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="bSFUn+BrFQSFLZjL84S4pMG4pEd58I5Obq43K3gzGlN7jtI+SpZRCEE0Rty5XvJnMLD5uu20EN62kaajMuX3rA=="> <input type="hidden" name="repository_id" value="65600975">
<details class="details-reset details-overlay select-menu float-left">
<summary class="select-menu-button float-left btn btn-sm btn-with-count" data-hydro-click="{&quot;event_type&quot;:&quot;repository.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;WATCH_BUTTON&quot;,&quot;repository_id&quot;:65600975,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="9fea351b3440c8081d58a9251ae85235195609c517fc75f1d154bd1b42b3101f" data-ga-click="Repository, click Watch settings, action:releases#index" aria-haspopup="menu" role="button"> <span data-menu-button="">
<svg class="octicon octicon-eye" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"></path></svg>
Watch
</span>
</summary> <details-menu class="select-menu-modal position-absolute mt-5 " style="z-index: 99;" role="menu">
<div class="select-menu-header">
<span class="select-menu-title">Notifications</span>
</div>
<div class="select-menu-list">
<button type="submit" name="do" value="included" class="select-menu-item width-full" aria-checked="true" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Not watching</span>
<span class="description">Be notified only when participating or @mentioned.</span>
<span class="hidden-select-button-text" data-menu-button-contents="">
<svg class="octicon octicon-eye" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"></path></svg>
Watch
</span>
</div>
</button>
<button type="submit" name="do" value="release_only" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Releases only</span>
<span class="description">Be notified of new releases, and when participating or @mentioned.</span>
<span class="hidden-select-button-text" data-menu-button-contents="">
<svg class="octicon octicon-eye" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"></path></svg>
Unwatch releases
</span>
</div>
</button>
<button type="submit" name="do" value="subscribed" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Watching</span>
<span class="description">Be notified of all conversations.</span>
<span class="hidden-select-button-text" data-menu-button-contents="">
<svg class="octicon octicon-eye" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.679 7.932c.412-.621 1.242-1.75 2.366-2.717C5.175 4.242 6.527 3.5 8 3.5c1.473 0 2.824.742 3.955 1.715 1.124.967 1.954 2.096 2.366 2.717a.119.119 0 010 .136c-.412.621-1.242 1.75-2.366 2.717C10.825 11.758 9.473 12.5 8 12.5c-1.473 0-2.824-.742-3.955-1.715C2.92 9.818 2.09 8.69 1.679 8.068a.119.119 0 010-.136zM8 2c-1.981 0-3.67.992-4.933 2.078C1.797 5.169.88 6.423.43 7.1a1.619 1.619 0 000 1.798c.45.678 1.367 1.932 2.637 3.024C4.329 13.008 6.019 14 8 14c1.981 0 3.67-.992 4.933-2.078 1.27-1.091 2.187-2.345 2.637-3.023a1.619 1.619 0 000-1.798c-.45-.678-1.367-1.932-2.637-3.023C11.671 2.992 9.981 2 8 2zm0 8a2 2 0 100-4 2 2 0 000 4z"></path></svg>
Unwatch
</span>
</div>
</button>
<button type="submit" name="do" value="ignore" class="select-menu-item width-full" aria-checked="false" role="menuitemradio">
<svg class="octicon octicon-check select-menu-item-icon" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg>
<div class="select-menu-item-text">
<span class="select-menu-item-heading">Ignoring</span>
<span class="description">Never be notified.</span>
<span class="hidden-select-button-text" data-menu-button-contents="">
<svg class="octicon octicon-mute" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 2.75a.75.75 0 00-1.238-.57L3.472 5H1.75A1.75 1.75 0 000 6.75v2.5C0 10.216.784 11 1.75 11h1.723l3.289 2.82A.75.75 0 008 13.25V2.75zM4.238 6.32L6.5 4.38v7.24L4.238 9.68a.75.75 0 00-.488-.18h-2a.25.25 0 01-.25-.25v-2.5a.25.25 0 01.25-.25h2a.75.75 0 00.488-.18zm7.042-1.1a.75.75 0 10-1.06 1.06L11.94 8l-1.72 1.72a.75.75 0 101.06 1.06L13 9.06l1.72 1.72a.75.75 0 101.06-1.06L14.06 8l1.72-1.72a.75.75 0 00-1.06-1.06L13 6.94l-1.72-1.72z"></path></svg>
Stop ignoring
</span>
</div>
</button>
</div>
</details-menu>
</details>
<a class="social-count js-social-count" href="https://github.com/pytorch/pytorch/watchers" aria-label="1455 users are watching this repository">
1.5k
</a>
</form>
</li>
<li>
<div class="js-toggler-container js-social-container starring-container ">
<form class="starred js-social-form" action="/pytorch/pytorch/unstar" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="Bts5b5LDPOmd7hoK86pqfXcaSTSW41Ku6dg41MvfoJ7KxzkfZLIZtaTvnI5JIhVCh298MfdpFnSAuUM+G6pywg==">
<input type="hidden" name="context" value="repository">
<button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this repository" title="Unstar pytorch/pytorch" data-hydro-click="{&quot;event_type&quot;:&quot;repository.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;UNSTAR_BUTTON&quot;,&quot;repository_id&quot;:65600975,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="937734566fcfcf63665a358b51696081548a561914140446b6e26c6b35fc104b" data-ga-click="Repository, click unstar button, action:releases#index; text:Unstar"> <svg height="16" class="octicon octicon-star-fill" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"></path></svg>
Unstar
</button> <a class="social-count js-social-count" href="https://github.com/pytorch/pytorch/stargazers" aria-label="39649 users starred this repository">
39.6k
</a>
</form>
<form class="unstarred js-social-form" action="/pytorch/pytorch/star" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="8v4EhpY02IED2y5QxKOhv5RK5umnTvI/YHgAntV/f5GEhjaqYzAjCK8FJZfLtSBA6oPoLj65Qi4Dhj0JbDZheA==">
<input type="hidden" name="context" value="repository">
<button type="submit" class="btn btn-sm btn-with-count js-toggler-target" aria-label="Unstar this repository" title="Star pytorch/pytorch" data-hydro-click="{&quot;event_type&quot;:&quot;repository.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;STAR_BUTTON&quot;,&quot;repository_id&quot;:65600975,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="9a7f039530934b22c65118f5a90cc3ab0ff5a8f482d729da182642fc6909b645" data-ga-click="Repository, click star button, action:releases#index; text:Star"> <svg height="16" class="octicon octicon-star" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path></svg>
Star
</button> <a class="social-count js-social-count" href="https://github.com/pytorch/pytorch/stargazers" aria-label="39649 users starred this repository">
39.6k
</a>
</form> </div>
</li>
<li>
<div class="float-left">
<details class="details-reset details-overlay details-overlay-dark ">
<summary class="btn btn-sm btn-with-count" title="Fork your own copy of pytorch/pytorch to your account" data-hydro-click="{&quot;event_type&quot;:&quot;repository.click&quot;,&quot;payload&quot;:{&quot;target&quot;:&quot;FORK_BUTTON&quot;,&quot;repository_id&quot;:65600975,&quot;originating_url&quot;:&quot;https://github.com/pytorch/pytorch/releases&quot;,&quot;user_id&quot;:2189930}}" data-hydro-click-hmac="9646ca24c40d508fa509f6addc0c8bf9efbdab2df43d06b479c35617ddf1eddd" data-ga-click="Repository, show fork modal, action:releases#index; text:Fork" role="button">
<svg class="octicon octicon-repo-forked" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path></svg>
Fork
</summary>
<details-dialog class="Box d-flex flex-column anim-fade-in fast Box--overlay" src="/pytorch/pytorch/fork?fragment=1" preload="" role="dialog" aria-modal="true">
<div class="Box-header">
<button class="Box-btn-octicon btn-octicon float-right" type="button" aria-label="Close dialog" data-close-dialog="">
<svg height="16" class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<h3 class="Box-title">Fork pytorch</h3>
</div>
<div class="text-center overflow-auto">
<include-fragment>
<div class="octocat-spinner my-5" aria-label="Loading..."></div>
<p class="f5 text-gray">If this dialog fails to load, you can visit <a href="https://github.com/pytorch/pytorch/fork">the fork page</a> directly.</p>
</include-fragment>
</div>
</details-dialog>
</details>
</div>
<a href="https://github.com/pytorch/pytorch/network/members" class="social-count" aria-label="10250 users forked this repository">
10.3k
</a>
</li>
</ul>
</div>
<nav class="js-repo-nav js-sidenav-container-pjax clearfix hx_reponav reponav p-responsive d-none d-lg-block container-lg" itemscope="" itemtype="http://schema.org/BreadcrumbList" aria-label="Repository" data-pjax="#js-repo-pjax-container">
<ul class="list-style-none">
<li itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a class="js-selected-navigation-item selected reponav-item" itemprop="url" data-ga-click="Repository, Navigation click, Code tab" data-hotkey="g c" aria-current="page" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages repo_deployments /pytorch/pytorch" href="https://github.com/pytorch/pytorch">
<div class="d-inline"><svg class="octicon octicon-code" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"></path></svg></div>
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
</a> </li>
<li itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" data-ga-click="Repository, Navigation click, Issues tab" data-hotkey="g i" class="js-selected-navigation-item reponav-item" data-selected-links="repo_issues repo_labels repo_milestones /pytorch/pytorch/issues" href="https://github.com/pytorch/pytorch/issues">
<div class="d-inline"><svg class="octicon octicon-issue-opened" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"></path></svg></div>
<span itemprop="name">Issues</span>
<span class="Counter">4,487</span>
<meta itemprop="position" content="2">
</a> </li>
<li itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a data-hotkey="g p" data-skip-pjax="true" itemprop="url" data-ga-click="Repository, Navigation click, Pull requests tab" class="js-selected-navigation-item reponav-item" data-selected-links="repo_pulls checks /pytorch/pytorch/pulls" href="https://github.com/pytorch/pytorch/pulls">
<div class="d-inline"><svg class="octicon octicon-git-pull-request" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></path></svg></div>
<span itemprop="name">Pull requests</span>
<span class="Counter">1,537</span>
<meta itemprop="position" content="4">
</a> </li>
<li itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement" class="position-relative float-left ">
<a data-hotkey="g w" data-skip-pjax="true" data-ga-click="Repository, Navigation click, Actions tab" class="js-selected-navigation-item reponav-item" data-selected-links="repo_actions /pytorch/pytorch/actions" href="https://github.com/pytorch/pytorch/actions">
<div class="d-inline"><svg class="octicon octicon-play" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z"></path></svg></div>
Actions
</a>
</li>
<li>
<a data-hotkey="g b" data-ga-click="Repository, Navigation click, Projects tab" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /pytorch/pytorch/projects" href="https://github.com/pytorch/pytorch/projects">
<div class="d-inline"><svg class="octicon octicon-project" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg></div>
Projects
<span class="Counter">9</span>
</a> </li>
<li>
<a data-ga-click="Repository, Navigation click, Wikis tab" class="js-selected-navigation-item reponav-item" data-hotkey="g w" data-selected-links="repo_wiki /pytorch/pytorch/wiki" href="https://github.com/pytorch/pytorch/wiki">
<div class="d-inline"><svg class="octicon octicon-book" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M0 1.75A.75.75 0 01.75 1h4.253c1.227 0 2.317.59 3 1.501A3.744 3.744 0 0111.006 1h4.245a.75.75 0 01.75.75v10.5a.75.75 0 01-.75.75h-4.507a2.25 2.25 0 00-1.591.659l-.622.621a.75.75 0 01-1.06 0l-.622-.621A2.25 2.25 0 005.258 13H.75a.75.75 0 01-.75-.75V1.75zm8.755 3a2.25 2.25 0 012.25-2.25H14.5v9h-3.757c-.71 0-1.4.201-1.992.572l.004-7.322zm-1.504 7.324l.004-5.073-.002-2.253A2.25 2.25 0 005.003 2.5H1.5v9h3.757a3.75 3.75 0 011.994.574z"></path></svg></div>
Wiki
</a> </li>
<li>
<a data-skip-pjax="true" data-ga-click="Repository, Navigation click, Security tab" class="js-selected-navigation-item reponav-item" data-selected-links="security overview alerts policy token_scanning code_scanning /pytorch/pytorch/security" href="https://github.com/pytorch/pytorch/security">
<div class="d-inline"><svg class="octicon octicon-shield" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.467.133a1.75 1.75 0 011.066 0l5.25 1.68A1.75 1.75 0 0115 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.7 1.7 0 01-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 011.217-1.667l5.25-1.68zm.61 1.429a.25.25 0 00-.153 0l-5.25 1.68a.25.25 0 00-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.2.2 0 00.154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.25.25 0 00-.174-.237l-5.25-1.68zM9 10.5a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.75a.75.75 0 10-1.5 0v3a.75.75 0 001.5 0v-3z"></path></svg></div>
Security
<span class="Counter js-security-tab-count" data-url="/pytorch/pytorch/security/overall-count">0</span>
</a> </li>
<li>
<a data-ga-click="Repository, Navigation click, Insights tab" class="js-selected-navigation-item reponav-item" data-selected-links="repo_graphs repo_contributors dependency_graph dependabot_updates pulse people /pytorch/pytorch/pulse" href="https://github.com/pytorch/pytorch/pulse">
<div class="d-inline"><svg class="octicon octicon-graph" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 1.75a.75.75 0 00-1.5 0v12.5c0 .414.336.75.75.75h14.5a.75.75 0 000-1.5H1.5V1.75zm14.28 2.53a.75.75 0 00-1.06-1.06L10 7.94 7.53 5.47a.75.75 0 00-1.06 0L3.22 8.72a.75.75 0 001.06 1.06L7 7.06l2.47 2.47a.75.75 0 001.06 0l5.25-5.25z"></path></svg></div>
Insights
</a> </li>
</ul>
</nav>
<div class="reponav-wrapper reponav-small d-lg-none">
<nav class="reponav js-reponav text-center no-wrap" itemscope="" itemtype="http://schema.org/BreadcrumbList">
<span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a class="js-selected-navigation-item selected reponav-item" itemprop="url" aria-current="page" data-selected-links="repo_source repo_downloads repo_commits repo_releases repo_tags repo_branches repo_packages repo_deployments /pytorch/pytorch" href="https://github.com/pytorch/pytorch">
<span itemprop="name">Code</span>
<meta itemprop="position" content="1">
</a> </span>
<span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_issues repo_labels repo_milestones /pytorch/pytorch/issues" href="https://github.com/pytorch/pytorch/issues">
<span itemprop="name">Issues</span>
<span class="Counter">4,487</span>
<meta itemprop="position" content="2">
</a> </span>
<span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_pulls checks /pytorch/pytorch/pulls" href="https://github.com/pytorch/pytorch/pulls">
<span itemprop="name">Pull requests</span>
<span class="Counter">1,537</span>
<meta itemprop="position" content="4">
</a> </span>
<span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_projects new_repo_project repo_project /pytorch/pytorch/projects" href="https://github.com/pytorch/pytorch/projects">
<span itemprop="name">Projects</span>
<span class="Counter">9</span>
<meta itemprop="position" content="5">
</a> </span>
<span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_actions /pytorch/pytorch/actions" href="https://github.com/pytorch/pytorch/actions">
<span itemprop="name">Actions</span>
<meta itemprop="position" content="6">
</a> </span>
<span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="repo_wiki /pytorch/pytorch/wiki" href="https://github.com/pytorch/pytorch/wiki">
<span itemprop="name">Wiki</span>
<meta itemprop="position" content="7">
</a> </span>
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="security overview alerts policy token_scanning code_scanning /pytorch/pytorch/security" href="https://github.com/pytorch/pytorch/security">
<span itemprop="name">Security</span>
<span class="Counter js-security-deferred-tab-count">0</span>
<meta itemprop="position" content="8">
</a>
<a class="js-selected-navigation-item reponav-item" data-selected-links="pulse /pytorch/pytorch/pulse" href="https://github.com/pytorch/pytorch/pulse">
Pulse
</a>
<span itemscope="" itemtype="http://schema.org/ListItem" itemprop="itemListElement">
<a itemprop="url" class="js-selected-navigation-item reponav-item" data-selected-links="community /pytorch/pytorch/community" href="https://github.com/pytorch/pytorch/community">
Community
</a> </span>
</nav>
</div>
</div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="container-lg clearfix new-discussion-timeline p-responsive">
<div class="repository-content ">
<div class="subnav">
<div class="d-flex flex-md-row flex-justify-between flex-md-items-center">
<div class="subnav-links float-left" role="navigation">
<a class="js-selected-navigation-item selected subnav-item" aria-current="page" data-selected-links="repo_releases /pytorch/pytorch/releases" href="https://github.com/pytorch/pytorch/releases">Releases</a>
<a class="js-selected-navigation-item subnav-item" data-selected-links="repo_tags /pytorch/pytorch/tags" href="https://github.com/pytorch/pytorch/tags">Tags</a>
</div>
</div>
</div>
<div class="position-relative border-top clearfix">
<div class="release-entry">
<div class="release pt-2 pt-md-0 pb-3 pb-md-0 clearfix label-latest">
<div class="d-none d-md-block flex-wrap flex-items-center col-12 col-md-3 col-lg-2 px-md-3 pb-1 pb-md-4 pt-md-4 float-left text-md-right v-align-top">
<div class="flex-auto flex-self-start">
<span class="flex-shrink-0 Label Label--outline mb-md-2 mr-2 mr-md-0 Label--outline-green">
<a class="border-0 Label--outline-green" href="https://github.com/pytorch/pytorch/releases/latest">Latest release</a>
</span>
</div>
<ul class="d-none d-md-block mt-2 list-style-none">
<li class="d-block mb-1">
<a href="https://github.com/pytorch/pytorch/tree/v1.5.1" class="muted-link css-truncate" title="v1.5.1">
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
<span class="css-truncate-target" style="max-width: 125px">v1.5.1</span>
</a>
</li>
<li class="d-block mb-1">
<a href="https://github.com/pytorch/pytorch/commit/3c31d73c875d9a4a6ea8a843b9a0d1b19fbe36f3" class="muted-link">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
<code>3c31d73</code>
</a>
</li>
<li class="d-block mb-1">
<details class="dropdown dropdown-signed-commit details-reset details-overlay js-dropdown-details d-inline-block ml-1">
<summary class="signed-commit-badge signed-commit-badge-medium verified" title="Commit signature">
Verified
</summary>
<div class="anim-scale-in" style="position: relative; z-index: 200;">
<div class="dropdown-menu dropdown-menu-s py-0 text-gray-dark text-left">
<div class="signed-commit-header TableObject">
<div class="TableObject-item">
<svg height="32" class="octicon octicon-verified mr-2" viewBox="0 0 24 24" version="1.1" width="32" aria-hidden="true"><path d="M17.03 9.78a.75.75 0 00-1.06-1.06l-5.47 5.47-2.47-2.47a.75.75 0 00-1.06 1.06l3 3a.75.75 0 001.06 0l6-6z"></path><path fill-rule="evenodd" d="M14.136 1.2a3.61 3.61 0 00-4.272 0L8.489 2.21a2.11 2.11 0 01-.929.384l-1.686.259a3.61 3.61 0 00-3.021 3.02L2.594 7.56a2.11 2.11 0 01-.384.929L1.2 9.864a3.61 3.61 0 000 4.272l1.01 1.375c.2.274.333.593.384.929l.259 1.686a3.61 3.61 0 003.02 3.021l1.687.259c.336.051.655.183.929.384l1.375 1.01a3.61 3.61 0 004.272 0l1.375-1.01a2.11 2.11 0 01.929-.384l1.686-.259a3.61 3.61 0 003.021-3.02l.259-1.687a2.11 2.11 0 01.384-.929l1.01-1.375a3.61 3.61 0 000-4.272l-1.01-1.375a2.11 2.11 0 01-.384-.929l-.259-1.686a3.61 3.61 0 00-3.02-3.021l-1.687-.259a2.11 2.11 0 01-.929-.384L14.136 1.2zm-3.384 1.209a2.11 2.11 0 012.496 0l1.376 1.01a3.61 3.61 0 001.589.658l1.686.258a2.11 2.11 0 011.765 1.766l.26 1.686a3.61 3.61 0 00.657 1.59l1.01 1.375a2.11 2.11 0 010 2.496l-1.01 1.376a3.61 3.61 0 00-.658 1.589l-.258 1.686a2.11 2.11 0 01-1.766 1.765l-1.686.26a3.61 3.61 0 00-1.59.657l-1.375 1.01a2.11 2.11 0 01-2.496 0l-1.376-1.01a3.61 3.61 0 00-1.589-.658l-1.686-.258a2.11 2.11 0 01-1.766-1.766l-.258-1.686a3.61 3.61 0 00-.658-1.59l-1.01-1.375a2.11 2.11 0 010-2.496l1.01-1.376a3.61 3.61 0 00.658-1.589l.258-1.686a2.11 2.11 0 011.766-1.766l1.686-.258a3.61 3.61 0 001.59-.658l1.375-1.01z"></path></svg>
</div>
<div class="TableObject-item--primary">
This commit was created on GitHub.com and signed with a <strong class="signed-commit-verified-label">verified signature</strong> using GitHubs key.
</div>
</div>
<div class="signed-commit-footer">
<span class="d-block">GPG key ID: <span class="text-gray">4AEE18F83AFDEB23</span></span>
<a href="https://help.github.com/articles/signing-commits-with-gpg/">Learn about signing commits</a>
</div>
</div>
</div>
</details>
</li>
<li class="mt-3">
<details class="details-reset details-overlay select-menu" id="tag-select-menu-ec3598ce-b566-11ea-8c25-82fd8cb4a635">
<summary class="btn btn-sm select-menu-button text-md-left" title="Compare" aria-haspopup="menu" role="button">
<i>Compare</i>
</summary>
<details-menu class="select-menu-modal position-absolute text-md-left" style="z-index: 99;" role="menu">
<div class="select-menu-header">
<span class="select-menu-title">Choose a tag to compare</span>
</div>
<div class="select-menu-filters">
<remote-input class="select-menu-text-filter" src="/pytorch/pytorch/compare/tag-list?range=v1.5.1&amp;tag_name=v1.5.1&amp;type=base" aria-owns="tags-menu-ec3598ce-b566-11ea-8c25-82fd8cb4a635">
<input type="text" class="form-control" aria-label="Find a tag" placeholder="Find a tag" autofocus="" autocomplete="off" spellcheck="false">
</remote-input>
</div>
<div class="select-menu-list" id="tags-menu-ec3598ce-b566-11ea-8c25-82fd8cb4a635">
<div class="p-2">Search for a tag</div>
</div>
</details-menu>
</details>
</li>
</ul>
</div><!-- /.meta -->
<div class="col-12 col-md-9 col-lg-10 px-md-3 py-md-4 release-main-section commit open float-left">
<div class="release-header">
<div class="d-flex flex-items-start">
<div class="f1 flex-auto min-width-0 text-normal">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.5.1">Bug Fix release</a>
</div>
<span class="d-md-none flex-shrink-0 ml-2 mt-2 mt-md-0 Label Label--outline Label--outline-green">
<a class="border-0 Label--outline-green" href="https://github.com/pytorch/pytorch/releases/latest">Latest release</a>
</span>
</div>
<ul class="d-flex d-md-none flex-items-center mb-1 list-style-none">
<li class="d-block mr-2">
<a href="https://github.com/pytorch/pytorch/tree/v1.5.1" class="muted-link css-truncate" title="v1.5.1">
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
<span class="css-truncate-target" style="max-width: 125px">v1.5.1</span>
</a>
</li>
<li class="d-block mr-2 flex-auto">
<a href="https://github.com/pytorch/pytorch/commit/3c31d73c875d9a4a6ea8a843b9a0d1b19fbe36f3" class="muted-link">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
<code>3c31d73</code>
</a>
</li>
<li>
<details class="details-reset details-overlay select-menu" id="tag-select-menu-ec35bad4-b566-11ea-8adb-3bcfa30353b1">
<summary class="btn btn-sm select-menu-button text-md-left" title="Compare" aria-haspopup="menu" role="button">
<i>Compare</i>
</summary>
<details-menu class="select-menu-modal position-absolute text-md-left" style="z-index: 99;" role="menu">
<div class="select-menu-header">
<span class="select-menu-title">Choose a tag to compare</span>
</div>
<div class="select-menu-filters">
<remote-input class="select-menu-text-filter" src="/pytorch/pytorch/compare/tag-list?range=v1.5.1&amp;tag_name=v1.5.1&amp;type=base" aria-owns="tags-menu-ec35bad4-b566-11ea-8adb-3bcfa30353b1">
<input type="text" class="form-control" aria-label="Find a tag" placeholder="Find a tag" autofocus="" autocomplete="off" spellcheck="false">
</remote-input>
</div>
<div class="select-menu-list" id="tags-menu-ec35bad4-b566-11ea-8adb-3bcfa30353b1">
<div class="p-2">Search for a tag</div>
</div>
</details-menu>
</details>
</li>
<li>
<details class="dropdown dropdown-signed-commit details-reset details-overlay js-dropdown-details d-inline-block ml-1">
<summary class="signed-commit-badge signed-commit-badge-small verified" title="Commit signature">
Verified
</summary>
<div class="anim-scale-in" style="position: relative; z-index: 200;">
<div class="dropdown-menu dropdown-menu-sw py-0 text-gray-dark text-left">
<div class="signed-commit-header TableObject">
<div class="TableObject-item">
<svg height="32" class="octicon octicon-verified mr-2" viewBox="0 0 24 24" version="1.1" width="32" aria-hidden="true"><path d="M17.03 9.78a.75.75 0 00-1.06-1.06l-5.47 5.47-2.47-2.47a.75.75 0 00-1.06 1.06l3 3a.75.75 0 001.06 0l6-6z"></path><path fill-rule="evenodd" d="M14.136 1.2a3.61 3.61 0 00-4.272 0L8.489 2.21a2.11 2.11 0 01-.929.384l-1.686.259a3.61 3.61 0 00-3.021 3.02L2.594 7.56a2.11 2.11 0 01-.384.929L1.2 9.864a3.61 3.61 0 000 4.272l1.01 1.375c.2.274.333.593.384.929l.259 1.686a3.61 3.61 0 003.02 3.021l1.687.259c.336.051.655.183.929.384l1.375 1.01a3.61 3.61 0 004.272 0l1.375-1.01a2.11 2.11 0 01.929-.384l1.686-.259a3.61 3.61 0 003.021-3.02l.259-1.687a2.11 2.11 0 01.384-.929l1.01-1.375a3.61 3.61 0 000-4.272l-1.01-1.375a2.11 2.11 0 01-.384-.929l-.259-1.686a3.61 3.61 0 00-3.02-3.021l-1.687-.259a2.11 2.11 0 01-.929-.384L14.136 1.2zm-3.384 1.209a2.11 2.11 0 012.496 0l1.376 1.01a3.61 3.61 0 001.589.658l1.686.258a2.11 2.11 0 011.765 1.766l.26 1.686a3.61 3.61 0 00.657 1.59l1.01 1.375a2.11 2.11 0 010 2.496l-1.01 1.376a3.61 3.61 0 00-.658 1.589l-.258 1.686a2.11 2.11 0 01-1.766 1.765l-1.686.26a3.61 3.61 0 00-1.59.657l-1.375 1.01a2.11 2.11 0 01-2.496 0l-1.376-1.01a3.61 3.61 0 00-1.589-.658l-1.686-.258a2.11 2.11 0 01-1.766-1.766l-.258-1.686a3.61 3.61 0 00-.658-1.59l-1.01-1.375a2.11 2.11 0 010-2.496l1.01-1.376a3.61 3.61 0 00.658-1.589l.258-1.686a2.11 2.11 0 011.766-1.766l1.686-.258a3.61 3.61 0 001.59-.658l1.375-1.01z"></path></svg>
</div>
<div class="TableObject-item--primary">
This commit was created on GitHub.com and signed with a <strong class="signed-commit-verified-label">verified signature</strong> using GitHubs key.
</div>
</div>
<div class="signed-commit-footer">
<span class="d-block">GPG key ID: <span class="text-gray">4AEE18F83AFDEB23</span></span>
<a href="https://help.github.com/articles/signing-commits-with-gpg/">Learn about signing commits</a>
</div>
</div>
</div>
</details>
</li>
</ul>
<p class="f5 text-gray mt-2 mt-md-1 mb-2 mb-md-4">
<a class="d-inline-block" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519"><img class="avatar avatar-user" src="releases_files/5652049.jpeg" alt="@zou3519" width="20" height="20"></a>
<a class="text-bold text-gray" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">zou3519</a>
released this
<relative-time datetime="2020-06-18T16:43:46Z" class="no-wrap" title="Jun 18, 2020, 6:43 PM GMT+2">5 days ago</relative-time>
·
<a href="https://github.com/pytorch/pytorch/compare/v1.5.1...master">
2865 commits</a>
to master
since this release
</p>
</div>
<div class="markdown-body">
<h1>PyTorch 1.5.1 Release Notes</h1>
<ul>
<li>Backwards Incompatible Changes</li>
<li>Known Issues and Workarounds</li>
<li>Critical Fixes</li>
<li>Crashes and Error Fixes</li>
<li>Other Fixes</li>
</ul>
<h1>Backwards Incompatible Changes</h1>
<h3>Autograd: Operations that return integer-type tensors now always returns tensors that dont require grad (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="612176471" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37789" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/37789/hovercard" href="https://github.com/pytorch/pytorch/pull/37789">#37789</a>).</h3>
<p>This most notably affects <code>torch.argmin</code>, <code>torch.argmax</code>, and <code>torch.argsort</code>.
This change is BC-Breaking because previously one could obtain an
integer-type tensor that requires grad in 1.5.0. However, said tensors
were not usable by autograd; calling <code>.backward()</code> on them resulted in an error, so most users are likely to not have been relying on this behavior.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.5.0</th><th>Version 1.5.1</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>, <span class="pl-s1">requires_grad</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">argmax</span>(<span class="pl-s1">tensor</span>).<span class="pl-s1">requires_grad</span>
<span class="pl-c1">True</span>
</pre></div></sub></td><td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>, <span class="pl-s1">requires_grad</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">argmax</span>(<span class="pl-s1">tensor</span>).<span class="pl-s1">requires_grad</span>
<span class="pl-c1">False</span>
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h1>Known Issues and Workarounds</h1>
<h3>When using multiprocessing, PyTorch 1.5.1 and 1.5.0 may error out
with complaints about incompatibility between MKL and libgomp (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="607895757" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37377" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/37377/hovercard" href="https://github.com/pytorch/pytorch/issues/37377">#37377</a>)</h3>
<p>You may see error messages like the following when using the <code>torch.multiprocessing</code> package. This bug has primarily affected users with AMD CPUs.</p>
<pre><code>`Error: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library.
Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.`
</code></pre>
<p>You can get rid of the error and the error message by setting the environment <code>MKL_THREADING_LAYER=GNU</code>. This can be done either by including the following in your python code:</p>
<pre><code>import os
os.environ['MKL_THREADING_LAYER'] = 'GNU'
</code></pre>
<p>or by specifying the environment variable when running your script:</p>
<pre><code>MKL_THREADING_LAYER=GNU python my_script.py
</code></pre>
<p>To learn more about what triggers this bug and other workarounds if the above isnt working, please <a href="https://github.com/pytorch/pytorch/issues/37377#issuecomment-629610327" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/37377/hovercard">read this comment on the issue</a>.</p>
<h1>Critical Fixes</h1>
<h3><a href="https://pytorch.org/docs/stable/torch.html#torch.multinomial" rel="nofollow"><code>torch.multinomial</code>:</a> Fixed a bug where CUDA <code>multinomial</code> generated the same sequence over and over again with a shift of 4. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="614324506" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38046" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38046/hovercard" href="https://github.com/pytorch/pytorch/pull/38046">#38046</a>)</h3>
<h3><a href="https://pytorch.org/docs/stable/nn.html#conv2d" rel="nofollow"><code>nn.Conv2d</code></a>: Fixed a bug where circular padding applied padding across the wrong dimension (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="612903601" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37881" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/37881/hovercard" href="https://github.com/pytorch/pytorch/pull/37881">#37881</a>)</h3>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.5.0</th><th>Version 1.5.1</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">circular</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Conv2d</span>(<span class="pl-c1">6</span>, <span class="pl-c1">1</span>, (<span class="pl-c1">3</span>, <span class="pl-c1">3</span>), <span class="pl-s1">padding</span><span class="pl-c1">=</span>(<span class="pl-c1">0</span>, <span class="pl-c1">1</span>), <span class="pl-s1">padding_mode</span><span class="pl-c1">=</span><span class="pl-s">'circular'</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">circular</span>(<span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">1</span>, <span class="pl-c1">6</span>, <span class="pl-c1">10</span>, <span class="pl-c1">10</span>)).<span class="pl-s1">shape</span>
<span class="pl-c"># Notice the padding is incorrectly on the H dimension, not the W dimension.</span>
<span class="pl-s1">torch</span>.<span class="pl-v">Size</span>([<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">10</span>, <span class="pl-c1">8</span>])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>, <span class="pl-s1">requires_grad</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">other</span> <span class="pl-c1">=</span> <span class="pl-s1">tensor</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">LeakyReLU</span>(<span class="pl-c1">0</span>, <span class="pl-s1">inplace</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)(<span class="pl-s1">other</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span>.<span class="pl-en">sum</span>().<span class="pl-en">backward</span>()
<span class="pl-s1">torch</span>.<span class="pl-v">Size</span>([<span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">8</span>, <span class="pl-c1">10</span>])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3>Fixed bug where asserts in CUDA kernels were mistakingly disabled, leading to many silent kernel errors. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="623515934" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38943" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38943/hovercard" href="https://github.com/pytorch/pytorch/pull/38943">#38943</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="625349578" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39047" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39047/hovercard" href="https://github.com/pytorch/pytorch/pull/39047">#39047</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="626980560" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39218" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39218/hovercard" href="https://github.com/pytorch/pytorch/pull/39218">#39218</a>)</h3>
<h3><a href="https://pytorch.org/docs/stable/torch.html#torch.gather" rel="nofollow"><code>torch.gather</code></a>, <a href="https://pytorch.org/docs/stable/torch.html#torch.scatter" rel="nofollow"><code>torch.scatter</code></a>: added checks for illegal input dtypes that caused silently incorrect behaviors (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="614209545" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38025" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38025/hovercard" href="https://github.com/pytorch/pytorch/pull/38025">#38025</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="620213360" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38646" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38646/hovercard" href="https://github.com/pytorch/pytorch/pull/38646">#38646</a>)</h3>
<h3><a href="https://pytorch.org/docs/stable/torch.html#torch.argmin" rel="nofollow"><code>torch.argmin</code></a>, <a href="https://pytorch.org/docs/stable/torch.html?highlight=argmax#torch.argmax" rel="nofollow"><code>torch.argmax</code></a>: Fixed silently incorrect result for inputs with more than 2^32 elements (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="626925816" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39212" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39212/hovercard" href="https://github.com/pytorch/pytorch/pull/39212">#39212</a>)</h3>
<h3>C++ Custom Operators: fixed a bug where custom operators stopped working with autograd and ignored the <code>requires_grad=True</code> flag. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="607783672" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37355" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/37355/hovercard" href="https://github.com/pytorch/pytorch/pull/37355">#37355</a>)</h3>
<h2>Crashes and Error Fixes</h2>
<h3>Fixed CUDA reduction operations on inputs with more than 2^32 elements (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="612109174" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37788" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/37788/hovercard" href="https://github.com/pytorch/pytorch/pull/37788">#37788</a>)</h3>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.5.0</th><th>Version 1.5.1</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s">`torch.zeros(5, 14400, 14400, device='cuda').sum(0)`</span>
<span class="pl-s">`RuntimeError: sub_iter.strides(0)[0] == 0 INTERNAL ASSERT FAILED at /pytorch/aten/src/ATen/native/cuda/Reduce.cuh:706, please report a bug to PyTorch.`</span> </pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">5</span>, <span class="pl-c1">14400</span>, <span class="pl-c1">14400</span>, <span class="pl-s1">device</span><span class="pl-c1">=</span><span class="pl-s">'cuda'</span>).<span class="pl-en">sum</span>(<span class="pl-c1">0</span>)
<span class="pl-c"># No problem</span>
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3>Fixed pickling of PyTorch operators (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="614262182" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38033" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38033/hovercard" href="https://github.com/pytorch/pytorch/pull/38033">#38033</a>)</h3>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.5.0</th><th>Version 1.5.1</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s">`pickle.dumps(torch.tanh)`</span>
<span class="pl-v">PicklingError</span>: <span class="pl-v">Can</span><span class="pl-s">'t pickle : it'</span><span class="pl-s1">s</span> <span class="pl-c1">not</span> <span class="pl-s1">the</span> <span class="pl-s1">same</span> <span class="pl-s1">object</span> <span class="pl-k">as</span> <span class="pl-s1">torch</span>.<span class="pl-s1">_C</span>.<span class="pl-s1">_VariableFunctions</span>
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">pickle</span>.<span class="pl-en">dumps</span>(<span class="pl-s1">torch</span>.<span class="pl-s1">tanh</span>)
<span class="pl-c"># No problem</span>
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><a href="https://pytorch.org/docs/stable/nn.html?highlight=leaky#torch.nn.LeakyReLU" rel="nofollow"><code>nn.LeakyReLU</code></a>: Fixed a bug where using autograd with in-place <code>nn.LeakyReLu</code> with a slope of 0 incorrectly errored out. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="608573624" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37453" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/37453/hovercard" href="https://github.com/pytorch/pytorch/pull/37453">#37453</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="609523550" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37559" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/37559/hovercard" href="https://github.com/pytorch/pytorch/pull/37559">#37559</a>)</h3>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.5.0</th><th>Version 1.5.1</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>, <span class="pl-s1">requires_grad</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">other</span> <span class="pl-c1">=</span> <span class="pl-s1">tensor</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">LeakyReLU</span>(<span class="pl-c1">0</span>, <span class="pl-s1">inplace</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)(<span class="pl-s1">other</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span>.<span class="pl-en">sum</span>().<span class="pl-en">backward</span>()
<span class="pl-v">RuntimeError</span>: <span class="pl-v">In</span><span class="pl-c1">-</span><span class="pl-s1">place</span> <span class="pl-s1">leakyReLu</span> <span class="pl-s1">backward</span> <span class="pl-s1">calculation</span> <span class="pl-c1">is</span> <span class="pl-s1">triggered</span> <span class="pl-k">with</span> <span class="pl-s1">a</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">positive</span> <span class="pl-s1">slope</span> <span class="pl-s1">which</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-s1">supported</span>. <span class="pl-v">This</span> <span class="pl-c1">is</span> <span class="pl-s1">caused</span> <span class="pl-s1">by</span> <span class="pl-s1">calling</span> <span class="pl-c1">in</span><span class="pl-c1">-</span><span class="pl-s1">place</span> <span class="pl-s1">forward</span> <span class="pl-s1">function</span> <span class="pl-k">with</span> <span class="pl-s1">a</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">positive</span> <span class="pl-s1">slope</span>, <span class="pl-s1">please</span> <span class="pl-s1">call</span> <span class="pl-s1">out</span><span class="pl-c1">-</span><span class="pl-s1">of</span><span class="pl-c1">-</span><span class="pl-s1">place</span> <span class="pl-s1">version</span> <span class="pl-s1">instead</span>.
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>, <span class="pl-s1">requires_grad</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">other</span> <span class="pl-c1">=</span> <span class="pl-s1">tensor</span> <span class="pl-c1">+</span> <span class="pl-c1">1</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">LeakyReLU</span>(<span class="pl-c1">0</span>, <span class="pl-s1">inplace</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)(<span class="pl-s1">other</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span>.<span class="pl-en">sum</span>().<span class="pl-en">backward</span>()
<span class="pl-c"># No error</span>
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><a href="https://pytorch.org/docs/stable/torch.html#torch.as_strided" rel="nofollow"><code>torch.as_strided</code></a> : Fixed crash when passed <code>sizes</code> and <code>strides</code> of different lengths. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="627701316" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39301" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39301/hovercard" href="https://github.com/pytorch/pytorch/pull/39301">#39301</a>)</h3>
<h3><a href="https://pytorch.org/docs/stable/nn.html#torch.nn.SyncBatchNorm.convert_sync_batchnorm" rel="nofollow"><code>nn.SyncBatchNorm.convert_sync_batchnorm</code></a>: Fixed bug where it did not respect the devices of the original BatchNorm module, resulting in device mismatch errors (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="628645081" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39344" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39344/hovercard" href="https://github.com/pytorch/pytorch/pull/39344">#39344</a>)</h3>
<h3><a href="https://pytorch.org/docs/stable/nn.html#torch.nn.utils.clip_grad_norm_" rel="nofollow"><code>nn.utils.clip_grad_norm_</code></a>: Fixed ability to operate on tensors on different devices (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="619561674" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38615" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38615/hovercard" href="https://github.com/pytorch/pytorch/pull/38615">#38615</a>)</h3>
<h3><a href="https://pytorch.org/docs/stable/torch.html#torch.min" rel="nofollow"><code>torch.min</code></a>, <a href="https://pytorch.org/docs/stable/torch.html#torch.max" rel="nofollow"><code>torch.max</code></a>: added check for illegal output dtypes (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="622196802" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38850" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38850/hovercard" href="https://github.com/pytorch/pytorch/pull/38850">#38850</a>)</h3>
<h3>MacOS: Fixed <code>import torch</code> error (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="603452265" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36941" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/36941/hovercard" href="https://github.com/pytorch/pytorch/issues/36941">#36941</a>).</h3>
<h3>C++ Extensions: fixed compilation error when building with older versions of nvcc (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="606200118" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37221" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/37221/hovercard" href="https://github.com/pytorch/pytorch/pull/37221">#37221</a>)</h3>
<p>This bug mainly affected users of ubuntu 16.04. Were certain it affected the following configurations:</p>
<ul>
<li>ubuntu 16.04 + cuda 9.2 + gcc 5</li>
<li>ubuntu 16.04 + cuda 9.2 + gcc 7</li>
<li>ubuntu 16.04 + cuda 10.0 + gcc 5</li>
</ul>
<h3>C++ Extensions: fixed ability to compile with paths that include spaces (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="622281251" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38860" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38860/hovercard" href="https://github.com/pytorch/pytorch/pull/38860">#38860</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="620411897" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38670" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38670/hovercard" href="https://github.com/pytorch/pytorch/pull/38670">#38670</a>)</h3>
<h3>C++ Extensions: fixed ability to compile with relative <code>include_dirs</code> for ahead-of-time compilation (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="616155670" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38264" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38264/hovercard" href="https://github.com/pytorch/pytorch/pull/38264">#38264</a>)</h3>
<h1>Other Fixes</h1>
<h3><a href="https://pytorch.org/docs/stable/nn.html#conv1d" rel="nofollow"><code>nn.Conv1d</code></a>, <a href="https://pytorch.org/docs/stable/nn.html#conv2d" rel="nofollow"><code>nn.Conv2d</code></a>, <a href="https://pytorch.org/docs/stable/nn.html#conv3d" rel="nofollow"><code>nn.Conv3d</code></a>: Fixed a bug where convolutions were using more memory than previous versions of PyTorch. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="620464528" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38674" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38674/hovercard" href="https://github.com/pytorch/pytorch/pull/38674">#38674</a>)</h3>
<h3>Fixed in-place floor division magic method (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="620599440" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38695" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38695/hovercard" href="https://github.com/pytorch/pytorch/pull/38695">#38695</a>)</h3>
<p>In 1.5.0, the in-place floor division magic method mistakingly
performed the floor division out-of-place. Weve fixed this in 1.5.1.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.5.0</th><th>Version 1.5.1</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">1</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">expected_data_ptr</span> <span class="pl-c1">=</span> <span class="pl-s1">tensor</span>.<span class="pl-en">data_ptr</span>()
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">//=</span> <span class="pl-c1">1</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span>.<span class="pl-en">data_ptr</span>() <span class="pl-c1">==</span> <span class="pl-s1">expected_data_ptr</span>
<span class="pl-c1">False</span>
</pre></div></sub></td><td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">1</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">expected_data_ptr</span> <span class="pl-c1">=</span> <span class="pl-s1">tensor</span>.<span class="pl-en">data_ptr</span>()
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">//=</span> <span class="pl-c1">1</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span>.<span class="pl-en">data_ptr</span>() <span class="pl-c1">==</span> <span class="pl-s1">expected_data_ptr</span>
<span class="pl-c1">True</span>
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3>Documentation: fixed link to java docs. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="625244917" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39039" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39039/hovercard" href="https://github.com/pytorch/pytorch/pull/39039">#39039</a>)</h3>
<h3>Quantization: Fixed weight quantization inaccuracies for LSTM (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="593555936" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/35961" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35961/hovercard" href="https://github.com/pytorch/pytorch/pull/35961">#35961</a>)</h3>
<p>Weight quantization was done incorrectly for LSTMs, the statistics
for all weights (across layers) were combined in the observer. This
meant that weights for later layers in a LSTM would use sub-optimal
scales impacting accuracy. The problem gets worse as the number of
layers increases.</p>
<h3>DistributedDataParallel: Fixed single-process multi-GPU use case (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="599103577" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36503" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36503/hovercard" href="https://github.com/pytorch/pytorch/pull/36503">#36503</a>)</h3>
<h3>RPC: Fixed future callbacks not capturing and restoring autograd context id (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="618567408" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38512" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38512/hovercard" href="https://github.com/pytorch/pytorch/pull/38512">#38512</a>)</h3>
<h3>TorchScript: Fixed support with <a href="https://pytorch.org/docs/stable/torch.html#torch.unique" rel="nofollow"><code>torch.unique</code></a> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="615006637" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38156" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38156/hovercard" href="https://github.com/pytorch/pytorch/pull/38156">#38156</a>)</h3>
<h3>ONNX: Fix <code>pow</code> operator export (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="636433693" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39791" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39791/hovercard" href="https://github.com/pytorch/pytorch/pull/39791">#39791</a>)</h3>
</div>
<details class="details-reset Details-element border-top pt-3 mt-4 mb-2 mb-md-4" open="">
<summary>
<div class="d-flex flex-items-center">
<span class="mr-2 Details-content--closed"><svg class="octicon octicon-triangle-right" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.427 4.427l3.396 3.396a.25.25 0 010 .354l-3.396 3.396A.25.25 0 016 11.396V4.604a.25.25 0 01.427-.177z"></path></svg></span>
<span class="mr-2 Details-content--open"><svg class="octicon octicon-triangle-down" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z"></path></svg></span>
<span class="text-bold">Assets</span>
<span class="ml-1 Counter">2</span>
</div>
</summary>
<div class="Box Box--condensed mt-3">
<div>
<div class="d-block py-1 py-md-2 Box-body px-2">
<a href="https://github.com/pytorch/pytorch/archive/v1.5.1.zip" rel="nofollow" class="d-flex flex-items-center">
<svg class="octicon octicon-file-zip flex-shrink-0 text-gray" width="16" height="16" viewBox="0 0 16 16" version="1.1" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
<span class="px-1 text-bold">Source code</span> (zip)
</a>
</div>
<div class="d-block py-1 py-md-2 Box-body px-2">
<a href="https://github.com/pytorch/pytorch/archive/v1.5.1.tar.gz" rel="nofollow" class="d-flex flex-items-center">
<svg class="octicon octicon-file-zip flex-shrink-0 text-gray" width="16" height="16" viewBox="0 0 16 16" version="1.1" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
<span class="px-1 text-bold">Source code</span> (tar.gz)
</a>
</div>
</div>
</div>
</details>
</div><!-- /.release-body -->
</div><!-- /.release -->
</div>
<div class="release-timeline-tags release-entry">
<div class="release-entry">
<div class="d-flex clearfix">
<span class="d-none flex-self-center float-left d-md-block col-md-3 col-lg-2 p-3 text-gray text-md-right pl-0 position-relative tag-timeline-date">
<relative-time datetime="2020-06-11T22:26:46Z" class="no-wrap" title="Jun 12, 2020, 12:26 AM GMT+2">12 days ago</relative-time>
<svg class="octicon octicon-tag pl-1 text-gray-light" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
</span>
<div class="float-left col-12 col-md-9 col-lg-10 px-md-3 py-3 position-relative release-main-section main">
<div class="commit js-details-container Details">
<div class="d-flex">
<h4 class="flex-auto min-width-0 pr-2 pb-1 commit-title">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.5.1-rc1">
<svg class="octicon octicon-tag d-md-none text-gray mr-1" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
v1.5.1-rc1
</a>
<span class="hidden-text-expander inline"><button type="button" aria-expanded="false" class="ellipsis-expander js-details-target" aria-label="Toggle commit message"></button></span>
</h4>
</div>
<div class="commit-desc">
<pre class="text-small text-gray">[ONNX] Fix pow op export [1.5.1] (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="636433693" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39791" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39791/hovercard" href="https://github.com/pytorch/pytorch/pull/39791">#39791</a>)
* [ONNX] Fix pow op export (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="614386399" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38065" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38065/hovercard" href="https://github.com/pytorch/pytorch/pull/38065">#38065</a>)
Summary:
Fix pow type cast for opset 9 and update opset 12
Pull Request <span class="issue-keyword tooltipped tooltipped-se" aria-label="This commit closes pull request #38065.">resolved</span>: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="614386399" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/38065" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/38065/hovercard" href="https://github.com/pytorch/pytorch/pull/38065">#38065</a>
Differential Revision: D21485353
Pulled By: malfet
fbshipit-source-id: 3993e835ffad07b2e6585eb5cf1cb7c8474de2ec
* Update ort-nighly version as suggested in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="634995729" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/39685" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/39685/hovercard?comment_id=641452470&amp;comment_type=issue_comment" href="https://github.com/pytorch/pytorch/pull/39685#issuecomment-641452470">#39685 (comment)</a>
* Apply changes from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="612806570" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/37846" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/37846/hovercard" href="https://github.com/pytorch/pytorch/pull/37846">#37846</a> to `test_topk_smallest_unsorted`
Co-authored-by: neginraoof &lt;neginmr@utexas.edu&gt;</pre>
</div>
<ul class="list-style-none f6">
<li class="d-inline-block d-md-none mt-1 mr-2 text-gray">
<svg class="octicon octicon-clock" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z"></path></svg>
<relative-time datetime="2020-06-11T22:26:46Z" class="no-wrap" title="Jun 12, 2020, 12:26 AM GMT+2">12 days ago</relative-time>
</li>
<li class="d-inline-block mt-1 mr-2 text-mono">
<a class="muted-link" href="https://github.com/pytorch/pytorch/commit/3c31d73c875d9a4a6ea8a843b9a0d1b19fbe36f3">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
3c31d73
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.1-rc1.zip" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
zip
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.1-rc1.tar.gz" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
tar.gz
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="release-entry">
<div class="release pt-2 pt-md-0 pb-3 pb-md-0 clearfix label-">
<div class="d-none d-md-block flex-wrap flex-items-center col-12 col-md-3 col-lg-2 px-md-3 pb-1 pb-md-4 pt-md-4 float-left text-md-right v-align-top">
<div class="flex-auto flex-self-start">
</div>
<ul class="d-none d-md-block mt-2 list-style-none">
<li class="d-block mb-1">
<a href="https://github.com/pytorch/pytorch/tree/v1.5.0" class="muted-link css-truncate" title="v1.5.0">
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
<span class="css-truncate-target" style="max-width: 125px">v1.5.0</span>
</a>
</li>
<li class="d-block mb-1">
<a href="https://github.com/pytorch/pytorch/commit/4ff3872a2099993bf7e8c588f7182f3df777205b" class="muted-link">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
<code>4ff3872</code>
</a>
</li>
<li class="d-block mb-1">
<details class="dropdown dropdown-signed-commit details-reset details-overlay js-dropdown-details d-inline-block ml-1">
<summary class="signed-commit-badge signed-commit-badge-medium verified" title="Commit signature">
Verified
</summary>
<div class="anim-scale-in" style="position: relative; z-index: 200;">
<div class="dropdown-menu dropdown-menu-s py-0 text-gray-dark text-left">
<div class="signed-commit-header TableObject">
<div class="TableObject-item">
<svg height="32" class="octicon octicon-verified mr-2" viewBox="0 0 24 24" version="1.1" width="32" aria-hidden="true"><path d="M17.03 9.78a.75.75 0 00-1.06-1.06l-5.47 5.47-2.47-2.47a.75.75 0 00-1.06 1.06l3 3a.75.75 0 001.06 0l6-6z"></path><path fill-rule="evenodd" d="M14.136 1.2a3.61 3.61 0 00-4.272 0L8.489 2.21a2.11 2.11 0 01-.929.384l-1.686.259a3.61 3.61 0 00-3.021 3.02L2.594 7.56a2.11 2.11 0 01-.384.929L1.2 9.864a3.61 3.61 0 000 4.272l1.01 1.375c.2.274.333.593.384.929l.259 1.686a3.61 3.61 0 003.02 3.021l1.687.259c.336.051.655.183.929.384l1.375 1.01a3.61 3.61 0 004.272 0l1.375-1.01a2.11 2.11 0 01.929-.384l1.686-.259a3.61 3.61 0 003.021-3.02l.259-1.687a2.11 2.11 0 01.384-.929l1.01-1.375a3.61 3.61 0 000-4.272l-1.01-1.375a2.11 2.11 0 01-.384-.929l-.259-1.686a3.61 3.61 0 00-3.02-3.021l-1.687-.259a2.11 2.11 0 01-.929-.384L14.136 1.2zm-3.384 1.209a2.11 2.11 0 012.496 0l1.376 1.01a3.61 3.61 0 001.589.658l1.686.258a2.11 2.11 0 011.765 1.766l.26 1.686a3.61 3.61 0 00.657 1.59l1.01 1.375a2.11 2.11 0 010 2.496l-1.01 1.376a3.61 3.61 0 00-.658 1.589l-.258 1.686a2.11 2.11 0 01-1.766 1.765l-1.686.26a3.61 3.61 0 00-1.59.657l-1.375 1.01a2.11 2.11 0 01-2.496 0l-1.376-1.01a3.61 3.61 0 00-1.589-.658l-1.686-.258a2.11 2.11 0 01-1.766-1.766l-.258-1.686a3.61 3.61 0 00-.658-1.59l-1.01-1.375a2.11 2.11 0 010-2.496l1.01-1.376a3.61 3.61 0 00.658-1.589l.258-1.686a2.11 2.11 0 011.766-1.766l1.686-.258a3.61 3.61 0 001.59-.658l1.375-1.01z"></path></svg>
</div>
<div class="TableObject-item--primary">
This commit was created on GitHub.com and signed with a <strong class="signed-commit-verified-label">verified signature</strong> using GitHubs key.
</div>
</div>
<div class="signed-commit-footer">
<span class="d-block">GPG key ID: <span class="text-gray">4AEE18F83AFDEB23</span></span>
<a href="https://help.github.com/articles/signing-commits-with-gpg/">Learn about signing commits</a>
</div>
</div>
</div>
</details>
</li>
<li class="mt-3">
<details class="details-reset details-overlay select-menu" id="tag-select-menu-ec38bd42-b566-11ea-8ac8-db4c4d9b1eac">
<summary class="btn btn-sm select-menu-button text-md-left" title="Compare" aria-haspopup="menu" role="button">
<i>Compare</i>
</summary>
<details-menu class="select-menu-modal position-absolute text-md-left" style="z-index: 99;" role="menu">
<div class="select-menu-header">
<span class="select-menu-title">Choose a tag to compare</span>
</div>
<div class="select-menu-filters">
<remote-input class="select-menu-text-filter" src="/pytorch/pytorch/compare/tag-list?range=v1.5.0&amp;tag_name=v1.5.0&amp;type=base" aria-owns="tags-menu-ec38bd42-b566-11ea-8ac8-db4c4d9b1eac">
<input type="text" class="form-control" aria-label="Find a tag" placeholder="Find a tag" autofocus="" autocomplete="off" spellcheck="false">
</remote-input>
</div>
<div class="select-menu-list" id="tags-menu-ec38bd42-b566-11ea-8ac8-db4c4d9b1eac">
<div class="p-2">Search for a tag</div>
</div>
</details-menu>
</details>
</li>
</ul>
</div><!-- /.meta -->
<div class="col-12 col-md-9 col-lg-10 px-md-3 py-md-4 release-main-section commit open float-left">
<div class="release-header">
<div class="d-flex flex-items-start">
<div class="f1 flex-auto min-width-0 text-normal">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.5.0">Stable
C++ Frontend, Distributed RPC framework, and more. New experimental
higher-level autograd API, Channels Last memory format, and more.</a>
</div>
</div>
<ul class="d-flex d-md-none flex-items-center mb-1 list-style-none">
<li class="d-block mr-2">
<a href="https://github.com/pytorch/pytorch/tree/v1.5.0" class="muted-link css-truncate" title="v1.5.0">
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
<span class="css-truncate-target" style="max-width: 125px">v1.5.0</span>
</a>
</li>
<li class="d-block mr-2 flex-auto">
<a href="https://github.com/pytorch/pytorch/commit/4ff3872a2099993bf7e8c588f7182f3df777205b" class="muted-link">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
<code>4ff3872</code>
</a>
</li>
<li>
<details class="details-reset details-overlay select-menu" id="tag-select-menu-ec38d430-b566-11ea-8858-378e073acf1f">
<summary class="btn btn-sm select-menu-button text-md-left" title="Compare" aria-haspopup="menu" role="button">
<i>Compare</i>
</summary>
<details-menu class="select-menu-modal position-absolute text-md-left" style="z-index: 99;" role="menu">
<div class="select-menu-header">
<span class="select-menu-title">Choose a tag to compare</span>
</div>
<div class="select-menu-filters">
<remote-input class="select-menu-text-filter" src="/pytorch/pytorch/compare/tag-list?range=v1.5.0&amp;tag_name=v1.5.0&amp;type=base" aria-owns="tags-menu-ec38d430-b566-11ea-8858-378e073acf1f">
<input type="text" class="form-control" aria-label="Find a tag" placeholder="Find a tag" autofocus="" autocomplete="off" spellcheck="false">
</remote-input>
</div>
<div class="select-menu-list" id="tags-menu-ec38d430-b566-11ea-8858-378e073acf1f">
<div class="p-2">Search for a tag</div>
</div>
</details-menu>
</details>
</li>
<li>
<details class="dropdown dropdown-signed-commit details-reset details-overlay js-dropdown-details d-inline-block ml-1">
<summary class="signed-commit-badge signed-commit-badge-small verified" title="Commit signature">
Verified
</summary>
<div class="anim-scale-in" style="position: relative; z-index: 200;">
<div class="dropdown-menu dropdown-menu-sw py-0 text-gray-dark text-left">
<div class="signed-commit-header TableObject">
<div class="TableObject-item">
<svg height="32" class="octicon octicon-verified mr-2" viewBox="0 0 24 24" version="1.1" width="32" aria-hidden="true"><path d="M17.03 9.78a.75.75 0 00-1.06-1.06l-5.47 5.47-2.47-2.47a.75.75 0 00-1.06 1.06l3 3a.75.75 0 001.06 0l6-6z"></path><path fill-rule="evenodd" d="M14.136 1.2a3.61 3.61 0 00-4.272 0L8.489 2.21a2.11 2.11 0 01-.929.384l-1.686.259a3.61 3.61 0 00-3.021 3.02L2.594 7.56a2.11 2.11 0 01-.384.929L1.2 9.864a3.61 3.61 0 000 4.272l1.01 1.375c.2.274.333.593.384.929l.259 1.686a3.61 3.61 0 003.02 3.021l1.687.259c.336.051.655.183.929.384l1.375 1.01a3.61 3.61 0 004.272 0l1.375-1.01a2.11 2.11 0 01.929-.384l1.686-.259a3.61 3.61 0 003.021-3.02l.259-1.687a2.11 2.11 0 01.384-.929l1.01-1.375a3.61 3.61 0 000-4.272l-1.01-1.375a2.11 2.11 0 01-.384-.929l-.259-1.686a3.61 3.61 0 00-3.02-3.021l-1.687-.259a2.11 2.11 0 01-.929-.384L14.136 1.2zm-3.384 1.209a2.11 2.11 0 012.496 0l1.376 1.01a3.61 3.61 0 001.589.658l1.686.258a2.11 2.11 0 011.765 1.766l.26 1.686a3.61 3.61 0 00.657 1.59l1.01 1.375a2.11 2.11 0 010 2.496l-1.01 1.376a3.61 3.61 0 00-.658 1.589l-.258 1.686a2.11 2.11 0 01-1.766 1.765l-1.686.26a3.61 3.61 0 00-1.59.657l-1.375 1.01a2.11 2.11 0 01-2.496 0l-1.376-1.01a3.61 3.61 0 00-1.589-.658l-1.686-.258a2.11 2.11 0 01-1.766-1.766l-.258-1.686a3.61 3.61 0 00-.658-1.59l-1.01-1.375a2.11 2.11 0 010-2.496l1.01-1.376a3.61 3.61 0 00.658-1.589l.258-1.686a2.11 2.11 0 011.766-1.766l1.686-.258a3.61 3.61 0 001.59-.658l1.375-1.01z"></path></svg>
</div>
<div class="TableObject-item--primary">
This commit was created on GitHub.com and signed with a <strong class="signed-commit-verified-label">verified signature</strong> using GitHubs key.
</div>
</div>
<div class="signed-commit-footer">
<span class="d-block">GPG key ID: <span class="text-gray">4AEE18F83AFDEB23</span></span>
<a href="https://help.github.com/articles/signing-commits-with-gpg/">Learn about signing commits</a>
</div>
</div>
</div>
</details>
</li>
</ul>
<p class="f5 text-gray mt-2 mt-md-1 mb-2 mb-md-4">
<a class="d-inline-block" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519"><img class="avatar avatar-user" src="releases_files/5652049.jpeg" alt="@zou3519" width="20" height="20"></a>
<a class="text-bold text-gray" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">zou3519</a>
released this
<relative-time datetime="2020-04-21T16:26:30Z" class="no-wrap" title="Apr 21, 2020, 6:26 PM GMT+2">on Apr 21</relative-time>
·
<a href="https://github.com/pytorch/pytorch/compare/v1.5.0...master">
2865 commits</a>
to master
since this release
</p>
</div>
<div class="markdown-body">
<h1>PyTorch 1.5.0 Release Notes</h1>
<ul>
<li>Highlights</li>
<li>Known Issues</li>
<li>Backwards Incompatible Changes
<ul>
<li>Python</li>
<li>C++ API</li>
<li>JIT</li>
<li>Quantization</li>
<li>RPC</li>
</ul>
</li>
<li>New Features</li>
<li>Improvements</li>
<li>Bug Fixes</li>
<li>Performance</li>
<li>Documentation</li>
<li>Deprecations
<ul>
<li>Python</li>
<li>C++ API</li>
</ul>
</li>
<li>Miscellaneous</li>
</ul>
<h1>Highlights</h1>
<p>This release includes several major new API additions and
improvements. These include new APIs for autograd allowing for easy
computation of hessians and jacobians, a significant update to the C++
frontend, channels last memory format for more performant computer
vision models, a stable release of the distributed RPC framework used
for model parallel training, and a new API that allows for the creation
of Custom C++ Classes that was inspired by PyBind. Additionally <code>torch_xla</code> 1.5 is now available and tested with the PyTorch 1.5 release providing a mature Cloud TPU experience.</p>
<h3>C++ Frontend API [Now Stable]</h3>
<p>The C++ frontend API is now at parity with Python and the features
overall has been moved to stable. (previously tagged as experimental).
Some of the major highlights include:</p>
<ul>
<li>C++ torch::nn module/functional are now at ~100% parity with Python
API, with appropriate documentation. Now users can easily translate
their model from Python API to C++ API, making the model authoring
experience much smoother.</li>
<li>C++ optimizers now behave identically to the Python API. In the
past, optimizers in C++ had deviated from the Python equivalent: C++
optimizers couldnt take parameter groups as input while the Python ones
could. Also step function implementations were not exactly the same.
With the 1.5 release, C++ optimizers will always behave the same as the
Python equivalent.</li>
<li>New C++ tensor multi-dim indexing API which looks and behaves the
similar to the Python API. The previous workaround was to use a
combination of <code>narrow</code> / <code>select</code> / <code>index_select</code> / <code>masked_select</code>, which is clunky and error-prone compared to the Python APIs elegant <code>tensor[:, 0, ..., mask]</code> syntax. With the 1.5 release users can use <code>tensor.index({Slice(), 0, "...", mask})</code> to achieve the same result.</li>
</ul>
<h3>Channels last memory format for Computer Vision models [Experimental]</h3>
<p>Channels Last memory format is an alternative way of ordering NCHW
tensors in memory while preserving the NCHW semantic dimensions
ordering. Channels Last tensors are ordered in memory in such a way that
channels become the densest dimension (aka storing images
pixel-per-pixel).</p>
<p>Channels Last memory format unlocks the ability to use performance
efficient convolution algorithms and hardware (NVidias Tensor Cores,
FBGEMM, QNNPACK). Additionally it was designed to automatically
propagate through the operators, which allows easy switching between
memory layouts.</p>
<p>Learn more <a href="https://github.com/pytorch/pytorch/wiki/Writing-memory-format-aware-operators">here</a> on how to write memory format aware operators.</p>
<h3>Custom C++ Classes [Experimental]</h3>
<p>This release adds a new API for binding custom C++ classes into
TorchScript and Python simultaneously. This API is almost identical in
syntax to <a href="https://pybind11.readthedocs.io/en/stable/" rel="nofollow">pybind11</a>.
It allows users to expose their C++ class and its methods to the
TorchScript type system and runtime system such that they can
instantiate and manipulate arbitrary C++ objects from TorchScript and
Python. An example C++ binding:</p>
<pre><code>template &lt;class T&gt;
struct MyStackClass : torch::CustomClassHolder {
std::vector&lt;T&gt; stack_;
MyStackClass(std::vector&lt;T&gt; init) : stack_(std::move(init)) {}
void push(T x) {
stack_.push_back(x);
}
T pop() {
auto val = stack_.back();
stack_.pop_back();
return val;
}
};
static auto testStack =
torch::class_&lt;MyStackClass&lt;std::string&gt;&gt;("myclasses", "MyStackClass")
.def(torch::init&lt;std::vector&lt;std::string&gt;&gt;())
.def("push", &amp;MyStackClass&lt;std::string&gt;::push)
.def("pop", &amp;MyStackClass&lt;std::string&gt;::pop)
.def("size", [](const c10::intrusive_ptr&lt;MyStackClass&gt;&amp; self) {
return self-&gt;stack_.size();
});
</code></pre>
<p>Which exposes a class you can use in Python and TorchScript like so:</p>
<pre><code>@torch.jit.script
def do_stacks(s : torch.classes.myclasses.MyStackClass):
s2 = torch.classes.myclasses.MyStackClass(["hi", "mom"])
print(s2.pop()) # "mom"
s2.push("foobar")
return s2 # ["hi", "foobar"]
</code></pre>
<p>You can try it out in the tutorial <a href="https://pytorch.org/tutorials/advanced/torch_script_custom_classes.html" rel="nofollow">here</a>.</p>
<h3>Distributed RPC framework APIs [Now Stable]</h3>
<p>The <code>torch.distributed.rpc</code> package aims at supporting a wide range of distributed training paradigms that do not fit into <code>DistributedDataParallel</code>.
Examples include parameter server training, distributed model
parallelism, and distributed pipeline parallelism. Features in the <code>torch.distributed.rpc</code> package can be categorized into four main sets of APIs.</p>
<ul>
<li>The <strong>RPC</strong> API allows running a function on a
specified destination worker with given arguments and fetches the return
value or creates a distributed reference to the return value.</li>
<li>The <strong>RRef</strong> (Remote REFerence) serves as a reference
to an object on another worker. A worker holding an RRef can explicitly
request copies of the object, and it can also share the light-weight
RRef with other workers without worrying about reference counting. This
is especially useful when multiple workers need to repeatedly access
different versions of the same remote object.</li>
<li>With <strong>Distributed Autograd</strong>, applications can
automatically compute gradients even if a model is split on multiple
workers using RPC. This is achieved by stitching together local autograd
graphs at RPC boundaries in the forward pass and reaching out to
participants to transparently launch local autograd in the backward
pass.</li>
<li>The <strong>Distributed Optimizer</strong> uses gradients computed by Distributed Autograd to update model parameters. Its constructor takes a local optimizer (e.g., <code>SGD</code>, <code>Adagrad</code>, etc.) and a list of parameter RRefs, and its <code>step()</code> function automatically uses the local optimizer to update parameters on all distinct RRef owner workers.</li>
</ul>
<p>Learn more <a href="https://pytorch.org/docs/stable/rpc.html" rel="nofollow">here</a>.</p>
<h3><strong>torch_xla 1.5 now available</strong></h3>
<p><a href="http://pytorch.org/xla/" rel="nofollow">torch_xla</a> is a Python package that uses the <a href="https://www.tensorflow.org/xla" rel="nofollow">XLA linear algebra compiler</a> to accelerate the <a href="https://pytorch.org/" rel="nofollow">PyTorch deep learning framework</a> on <a href="https://cloud.google.com/tpu/" rel="nofollow">Cloud TPUs</a> and <a href="https://cloud.google.com/tpu/docs/tutorials/pytorch-pod" rel="nofollow">Cloud TPU Pods</a>.
torch_xla aims to give PyTorch users the ability to do everything they
can do on GPUs on Cloud TPUs as well while minimizing changes to the
user experience. This release of <a href="http://pytorch.org/xla/" rel="nofollow">torch_xla</a>
is aligned and tested with PyTorch 1.5 to reduce friction for
developers and to provide a stable and mature PyTorch/XLA stack for
training models using Cloud TPU hardware. You can <a href="https://medium.com/pytorch/get-started-with-pytorch-cloud-tpus-and-colab-a24757b8f7fc" rel="nofollow">try it for free</a> in your browser on an 8-core Cloud TPU device with <a href="https://colab.research.google.com/" rel="nofollow">Google Colab</a>, and you can use it at a much larger scale <a href="https://cloud.google.com/gcp" rel="nofollow">on Google Cloud</a>.</p>
<p>See the full torch_xla release notes <a href="https://github.com/pytorch/xla/releases">here</a> and the full docs <a href="https://pytorch.org/xla/" rel="nofollow">here</a>.</p>
<h3><strong>New High level autograd API [Experimental]</strong></h3>
<p>PyTorch 1.5 brings new functions including jacobian, hessian, jvp, vjp, hvp and vhp to the <code>torch.autograd.functional.*</code> submodule. This feature builds on the current API and allow the user to easily perform these functions.</p>
<p>See the full docs <a href="https://pytorch.org/docs/stable/autograd.html#functional-higher-level-api" rel="nofollow">here</a>.</p>
<h3>Python 2 no longer supported</h3>
<p>For PyTorch 1.5.0 we will no longer support Python 2, specifically
version 2.7. Going forward support for Python will be limited to Python
3, specifically Python 3.5, 3.6, 3.7 and 3.8 (first enabled in PyTorch
1.4.0).</p>
<h1>Known Issues</h1>
<h3><code>torch.nn.parallel.DistributedDataParallel</code> does not work in Single-Process Multi-GPU mode.</h3>
<p><code>DistributedDataParallel</code> (DDP) used to support two modes</p>
<ol>
<li>Single-Process Multi-GPU (SPMG): In this mode, each DDP process replicates the input <code>module</code> to all specified devices and trains on all <code>module</code> replicas. This mode is enabled when application passes in a <code>device_ids</code> argument that contains multiple devices. Or if <code>device_ids</code> is not presented, DDP will try to use all available devices.</li>
<li>Multi-Process Single-GPU (MPSG): This is the <strong>recommended</strong> mode, as it is faster than SPMG. In this mode, each DDP process directly works on the provided <code>module</code> without creating additional replicas. This mode is enabled when <code>device_ids</code> only contains a single device or if there is only one visible device (e.g., by setting <code>CUDA_VISIBLE_DEVICES</code>).</li>
</ol>
<p>A recent change (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="572399471" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/33907" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33907/hovercard" href="https://github.com/pytorch/pytorch/pull/33907">#33907</a>) in <code>torch.nn.parallel.replicate</code>
breaks DDPs assumption on replicated modules and leads to failures in
the SPMG mode. However, since SPMG is known to be slower due to GIL
contention and additional overhead caused by scattering input and
gathering output, we are planning to retire this mode in future releases
and make MPSG the only supported mode in DDP. The code below shows an
example of the recommended way to construct DDP.</p>
<pre><code>import torch
from torch.nn.parallel import DistributedDataParallel as DDP
# use "cuda:1" as the target device
target_device = 1
local_model = torch.nn.Linear(2, 2).to(target_device)
ddp_model = DDP(local_model, device_ids=[target_device])
</code></pre>
<p>See <a href="https://github.com/pytorch/pytorch/issues/36268" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/36268/hovercard">#36268</a> for more discussion.</p>
<h3><code>Tensor.exponential_(0)</code> used to return <code>Inf</code>, now it incorrectly returns <code>0</code></h3>
<p>Previously in 1.4, <code>x.exponential_(0)</code> gives a tensor full of <code>inf</code>. On 1.5.0, it wrongly gives a tensor full of zeros.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>).<span class="pl-en">exponential_</span>(<span class="pl-c1">0</span>)
<span class="pl-en">tensor</span>([<span class="pl-s1">inf</span>, <span class="pl-s1">inf</span>, <span class="pl-s1">inf</span>])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>).<span class="pl-en">exponential_</span>(<span class="pl-c1">0</span>)
<span class="pl-c"># This is wrong!</span>
<span class="pl-en">tensor</span>([<span class="pl-c1">0.</span>, <span class="pl-c1">0.</span>, <span class="pl-c1">0.</span>])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<p>See <a href="https://github.com/pytorch/pytorch/issues/36798" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/36798/hovercard">#36798</a> for more details</p>
<h1>Backwards Incompatible Changes</h1>
<h2>Python</h2>
<h3><code>Tensor.clone</code>, <code>Tensor.to</code>, <code>Tensor.empty_like</code>, and similar functions preserve stride information instead of returning contiguous tensors</h3>
<p><code>clone</code>, <code>to</code>, <code>type</code>, <code>cuda</code>, <code>cpu</code>, <code>byte</code>, <code>char</code>, <code>double</code>, <code>bool</code>, <code>half</code>, <code>int</code>, <code>long</code>, <code>short</code>, <code>float</code>, <code>bfloat16</code>, <code>empty_like</code>, <code>full_like</code>, <code>ones_like</code>, <code>zeros_like</code>, <code>rand_like</code>, <code>randn_like</code>, <code>randint_like</code> operators now propagate memory format (roughly, the strides) of the input tensor to the output tensor.</p>
<p>Since PyTorch operators generally support non-contiguous tensors,
this should have no functional effect on most PyTorch programs.</p>
<p>The most common incompatibility with Python programs is with the <code>view</code>
operator, which has specific stride requirements. If these requirements
are no longer met as a result of this change, you will get an error
message indicating that you should use reshape instead, i.e.
"RuntimeError: view size is not compatible with input tensor's size and
stride (at least one dimension spans across two contiguous subspaces).
Use .reshape(...) instead."</p>
<p>Another possible exception incompatibility is if you have a (usually)
C++ operator implementation that works directly on memory (i.e. calls
data_ptr and relies on the strides being contiguous).</p>
<p>In the following example, we go through the implementation of a simple <code>clone</code> operation and see how it needs to change between versions.</p>
<pre><code># Version 1.4.0
Tensor simple_clone(const Tensor&amp; input) {
TORCH_CHECK(input.dim() == 1);
auto output = at::empty_like(input);
auto input_stride = input.strides()[0];
auto* output_ptr = output.data_ptr&lt;float&gt;();
auto* input_ptr = input.data_ptr&lt;float&gt;();
// Before 1.5.0, the result of `empty_like` is always contiguous.
for (int64_t idx = 0; idx &lt; input.size(); idx++) {
output[idx] = input[idx * input_stride]
}
}
</code></pre>
<pre><code># Version 1.5.0
Tensor simple_clone(const Tensor&amp; input) {
TORCH_CHECK(input.dim() == 1);
// From 1.5.0 on, the result of `empty_like` may not be contiguous.
auto output = at::empty_like(input);
// As a result, we need to keep track of the output stride.
auto input_stride = input.strides()[0];
auto output_stride = output.strides()[0];
auto* output_ptr = output.data_ptr&lt;float&gt;();
auto* input_ptr = input.data_ptr&lt;float&gt;();
for (int64_t idx = 0; idx &lt; input.size(); idx++) {
output[idx * output_stride] = input[idx * input_stride]
}
}
</code></pre>
<h3>The inferred dtype of np.float_, np.float64 scalars in tensor
constructors (e.g. torch.tensor(...), torch.as_tensor(...) is now
torch.float64 instead of the default dtype (usually torch.float32). (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528999599" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/30486" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30486/hovercard" href="https://github.com/pytorch/pytorch/pull/30486">#30486</a> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528999599" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/30486" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30486/hovercard" href="https://github.com/pytorch/pytorch/pull/30486">#30486</a>))</h3>
<p>Please explicitly pass in the desired dtype when constructing tensors with NumPy float64 scalars to get the old behavior.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c"># Old behavior: return torch.float32 tensor (by default)</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-s1">np</span>.<span class="pl-en">float64</span>(<span class="pl-c1">0</span>))
<span class="pl-en">tensor</span>(<span class="pl-c1">0.</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c"># To keep the old behavior, please explicitly pass the dtype</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-s1">np</span>.<span class="pl-en">float64</span>(<span class="pl-c1">0</span>), <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">torch</span>.<span class="pl-en">get_default_dtype</span>())
<span class="pl-en">tensor</span>(<span class="pl-c1">0.</span>)
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<p>This can cause your program to execute in torch.float64, potentially
slowing down your program or can lead to errors for operators that don't
support torch.float64 or mixed-dtypes.</p>
<p>numpy integer scalars are now treated as integers for the purposes of type promotion (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528999599" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/30486" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30486/hovercard" href="https://github.com/pytorch/pytorch/pull/30486">#30486</a> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528999599" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/30486" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30486/hovercard" href="https://github.com/pytorch/pytorch/pull/30486">#30486</a>))</p>
<p>Previously, in 1.4.0, they were mistakenly treated as floats (so for
example, torch.ones(3) * np.int64(3) would return a float32 tensor. In
1.5.0, weve fixed that behavior; torch.ones(3) * np.int64(3) returns an
int32 tensor.</p>
<p>This can cause your code to fail if you performed operations between
PyTorch tensors and numpy scalars and then passed the result into an
operation that does not support integral types or mixed types. To fix
your code, please cast the resulting tensor to the desired dtype.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">3</span>) <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">int64</span>(<span class="pl-c1">3</span>)
<span class="pl-en">tensor</span>([<span class="pl-c1">3.</span>, <span class="pl-c1">3.</span>, <span class="pl-c1">3.</span>])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> (<span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">3</span>) <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">int64</span>(<span class="pl-c1">3</span>)).<span class="pl-en">float</span>()
<span class="pl-en">tensor</span>([<span class="pl-c1">3.</span>, <span class="pl-c1">3.</span>, <span class="pl-c1">3.</span>])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3>numpy integer scalars are now treated as integers for the purposes of type promotion (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528999599" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/30486" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30486/hovercard" href="https://github.com/pytorch/pytorch/pull/30486">#30486</a>)</h3>
<p>Previously, in 1.4.0, they were mistakenly treated as floats (so for example, <code>torch.ones(3) * np.int64(3)</code> would return a float32 tensor. In 1.5.0, weve fixed that behavior; <code>torch.ones(3) * np.int64(3)</code> returns an int32 tensor.</p>
<p>This can cause your code to fail if you performed operations between
PyTorch tensors and numpy scalars and then passed the result into an
operation that does not support integral types or mixed types. To fix
your code, please cast the resulting tensor to the desired dtype.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">3</span>) <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">int64</span>(<span class="pl-c1">3</span>)
<span class="pl-en">tensor</span>([<span class="pl-c1">3.</span>, <span class="pl-c1">3.</span>, <span class="pl-c1">3.</span>])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> (<span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">3</span>) <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-en">int64</span>(<span class="pl-c1">3</span>)).<span class="pl-en">float</span>()
<span class="pl-en">tensor</span>([<span class="pl-c1">3.</span>, <span class="pl-c1">3.</span>, <span class="pl-c1">3.</span>])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>torch.autograd.Function</code>: dropped support for old-style Functions (<a href="https://github.com/pytorch/pytorch/pull/33956" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33956/hovercard">#33956</a>).</h3>
<p>In previous versions of PyTorch, there were two ways to write
autograd Functions. We deprecated one of them in 1.3.0 and dropped
support for it entirely in 1.5.0. Old-style autograd Functions will no
longer work in user code.</p>
<p>These Functions be identified by not having <code>staticmethod</code> <code>forward</code> and <code>backward</code> functions (see the example below) Please see <a href="https://pytorch.org/docs/stable/autograd.html#torch.autograd.Function" rel="nofollow">the current documentation</a> for how to write new-style Functions.</p>
<pre><code># Version 1.4.0
class Exp(torch.autograd.Function):
def forward(self, i):
result = i.exp()
self.save_for_backward(result)
return result
def backward(self, grad_output):
result, = self.saved_tensors
return grad_output * result
Exp()(torch.tensor(1.))
</code></pre>
<pre><code># Version 1.5.0
class Exp(torch.autograd.Function):
@staticmethod
def forward(ctx, i):
result = i.exp()
ctx.save_for_backward(result)
return result
@staticmethod
def backward(ctx, grad_output):
result, = ctx.saved_tensors
return grad_output * result
Exp.apply(torch.tensor(1.))
</code></pre>
<h3><code>torch.optim</code> optimizers changed to fix in-place checks for the changes made by the optimizer (<a href="https://github.com/pytorch/pytorch/pull/33640" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33640/hovercard">#33640</a>, <a href="https://github.com/pytorch/pytorch/pull/34211" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34211/hovercard">#34211</a>)</h3>
<p>If this causes your code to fail, there are two possible reasons:</p>
<p>Reason 1: The value of that parameter was actually saved and used and
we were computing incorrect gradients in previous versions of PyTorch.
This would result in an error message mentioning incorrect version
numbers. You should replace code that uses <code>self.my_param</code> by <code>self.my_param.clone()</code> to make sure the saved version is different from the one that is modified by the optimizer. For example:</p>
<p>Before 1.5.0, the following may have worked.</p>
<pre><code>def model(input, target, param):
return `(input * param ** 2 - target).norm()`
param = torch.randn(2, requires_grad=True)
input = torch.randn(2)
target = torch.randn(2)
sgd = optim.SGD([param], lr=0.001)
loss = model(input, target, param)
loss.backward(retain_graph=True)
sgd.step()
loss.backward()
param.grad
</code></pre>
<p>If after upgrading to 1.5.0, the above fails due to a version counter
error, then that means the gradient computed was incorrect. To remedy
this, clone <code>param</code> before using it in the model:</p>
<pre><code>def model(input, target, param):
return (input * param ** 2 - target).norm()
param = torch.randn(2, requires_grad=True)
input = torch.randn(2)
target = torch.randn(2)
sgd = optim.SGD([param], lr=0.001)
loss = model(input, target, param.clone())
loss.backward(retain_graph=True)
sgd.step()
loss.backward()
param.grad
</code></pre>
<p>Reason 2: You know what you're doing and change the values back to
the right thing before the next backward. However, you're running into
an error because the version counter cannot be decremented. Open an
issue with your particular use case and we will help you to work around
the version counter issue.</p>
<h3><code>utils.cpp_extensions</code> now use <code>ninja</code> as the default compilation backend (<a href="https://github.com/pytorch/pytorch/pull/32495" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32495/hovercard">#32495</a>)</h3>
<p><code>ninja</code> enables parallel compilation of your C++
extension, greatly speeding up compilation. This change will not break
most user code; if you do not have <code>ninja</code> installed, we fallback to the old <code>distutils</code> backend.</p>
<p>However, if you do have <code>ninja</code> installed, it is possible
that this change will cause your C++ extension build to fail by
oversubscribing your system with too many worker processes. There are
two potential workarounds to this.</p>
<p>Method 1: If a previously succeeding <code>python setup.py install</code> now fails, try setting the <code>MAX_JOBS</code> environment variable.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-shell"><pre>python setup.py install
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-shell"><pre>MAX_JOBS=2 python setup.py install
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<p>Method 2: Switch back to the old <code>distutils</code> backend inside your <code>setup.py</code></p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-s1">cmdclass</span><span class="pl-c1">=</span>{<span class="pl-s">'clean'</span>: <span class="pl-s1">clean</span>,
<span class="pl-s">'build_ext'</span>: <span class="pl-v">BuildExtension</span>},
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-s1">cmdclass</span><span class="pl-c1">=</span>{<span class="pl-s">'clean'</span>: <span class="pl-s1">clean</span>,
<span class="pl-s">'build_ext'</span>: <span class="pl-v">BuildExtension</span>.<span class="pl-en">with_options</span>(<span class="pl-s1">use_ninja</span><span class="pl-c1">=</span><span class="pl-c1">False</span>)},
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>torch.optim.Adam</code>, <code>torch.optim.SGD</code> changed to not modify gradients in-place (<a href="https://github.com/pytorch/pytorch/pull/30257" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30257/hovercard">#30257</a>)</h3>
<p>In previous versions of PyTorch, the Adam and SGD optimizers modified gradients (e.g. <code>param.grad</code>) in-place via in-place addition of <code>params.grad += weight_decay * param</code>.
To make this consistent with the behavior of other optimizers and to
prevent surprises about the behavior, weve changed them to stop
modifying gradients in-place.</p>
<p>This should not have an effect on most PyTorch programs unless they
relied on this behavior. The easiest way to replicate the old behavior
is to create a custom optimizer that implements it.</p>
<h3><code>torch.masked_select</code> now always returns a 1D tensor (<a href="https://github.com/pytorch/pytorch/pull/29923" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29923/hovercard">#29923</a>)</h3>
<p>The behavior of <code>torch.masked_select</code> when both "self" and
"mask" are 0-dimensional was changed. In previous versions of PyTorch,
this would return a 0-dimensional tensor. Now, we return a 1-dimensional
tensor to be consistent with other input sizes and our documentation.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">masked_select</span>(<span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">0</span>), <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">True</span>))
<span class="pl-en">tensor</span>(<span class="pl-c1">0</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">masked_select</span>(<span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">0</span>), <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">True</span>))
<span class="pl-en">tensor</span>([<span class="pl-c1">0</span>])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>torch.index_select</code> on a 0-d tensor now returns a 0-d tensor. (<a href="https://github.com/pytorch/pytorch/pull/30790" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30790/hovercard">#30790</a>)</h3>
<p>In previous versions of PyTorch, the output of <code>torch.index_select</code>
on a 0D input tensor produced a 1D tensor. This was inconsistent with
our documentation on it, which stated "The returned tensor has the same
number of dimensions as the original tensor (input)." Now, we return a
0D tensor.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">index_select</span>(<span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">5</span>), <span class="pl-c1">0</span>, <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>([<span class="pl-c1">0</span>]))
<span class="pl-en">tensor</span>([<span class="pl-c1">5</span>])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">index_select</span>(<span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">5</span>), <span class="pl-c1">0</span>, <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>([<span class="pl-c1">0</span>]))
<span class="pl-en">tensor</span>(<span class="pl-c1">5</span>)
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>nn.MultiLabelMarginLoss:</code> 'none' reduction on 1D tensor now returns a 0D tensor (<a href="https://github.com/pytorch/pytorch/pull/30768" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30768/hovercard">#30768</a>)</h3>
<p>In previous versions of PyTorch, the output of <code>nn.MultiLabelMarginLoss</code>
on 1D and 0D tensors incorrectly produced 1-D tensors. Now, those cases
return a 0D tensor to be consistent with the 2-D tensor case.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">nn</span>.<span class="pl-v">MultiLabelMarginLoss</span>(<span class="pl-s1">reduction</span><span class="pl-c1">=</span><span class="pl-s">'none'</span>)(<span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>), <span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">3</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">torch</span>.<span class="pl-s1">long</span>))
<span class="pl-en">tensor</span>([<span class="pl-c1">0.2959</span>])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">nn</span>.<span class="pl-v">MultiLabelMarginLoss</span>(<span class="pl-s1">reduction</span><span class="pl-c1">=</span><span class="pl-s">'none'</span>)(<span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>), <span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">3</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">torch</span>.<span class="pl-s1">long</span>))
<span class="pl-en">tensor</span>(<span class="pl-c1">0.2959</span>)
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>nn.MultiMarginLoss:</code> none' reduction on 1D target now returns a 1D tensor (<a href="https://github.com/pytorch/pytorch/pull/30826" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30826/hovercard">#30826</a>)</h3>
<p>In previous versions of PyTorch, the output of <code>nn.MultiMarginLoss</code> on a 1D <code>target</code> tensor produced a 0D output. We changed this to return a 1D <code>target</code> tensor to make it consistent with other input sizes which return an output that matches the target shape.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">nn</span>.<span class="pl-v">MultiMarginLoss</span>(<span class="pl-s1">reduction</span><span class="pl-c1">=</span><span class="pl-s">'none'</span>)(<span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>([<span class="pl-c1">1.</span>]), <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>([<span class="pl-c1">0</span>]))
<span class="pl-en">tensor</span>(<span class="pl-c1">0.</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">nn</span>.<span class="pl-v">MultiMarginLoss</span>(<span class="pl-s1">reduction</span><span class="pl-c1">=</span><span class="pl-s">'none'</span>)(<span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>([<span class="pl-c1">1.</span>]), <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>([<span class="pl-c1">0</span>]))
<span class="pl-en">tensor</span>([<span class="pl-c1">0.</span>])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>Tensor.exponential_(lambda)</code> no longer supports <code>lambda &lt; 0</code> (<a href="https://github.com/pytorch/pytorch/pull/32501" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32501/hovercard">#32501</a>)</h3>
<p><code>lambda</code>, the rate parameter of the exponential distribution, mathematically should be greater than 0. Weve disabled support <code>lambda &lt; 0</code> to be mathematically correct; most users will not have used a lambda less than zero.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">empty</span>(<span class="pl-c1">3</span>).<span class="pl-en">exponential_</span>(<span class="pl-c1">-</span><span class="pl-c1">1.5</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c"># Negative lambda not supported!</span>
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>nn.BCELoss</code>, <code>nn.functional.binary_cross_entropy</code> no longer accept inputs with the same number of elements that are not broadcastable (<a href="https://github.com/pytorch/pytorch/pull/31365" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31365/hovercard">#31365</a>)</h3>
<p>Previously, we supported accepting inputs with the same number of
elements. However, this behavior was deprecated and we removed it in
1.5.0. In order to replicate the old behavior, please explicitly <code>reshape</code> your input and target tensors to have the same shape.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">rand</span>(<span class="pl-c1">3</span>, <span class="pl-c1">3</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">target</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">9</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span>.<span class="pl-s1">functional</span>.<span class="pl-en">binary_cross_entropy</span>(<span class="pl-s1">input</span>, <span class="pl-s1">target</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">rand</span>(<span class="pl-c1">3</span>, <span class="pl-c1">3</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">target</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">9</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span>.<span class="pl-s1">functional</span>.<span class="pl-en">binary_cross_entropy</span>(<span class="pl-s1">input</span>, <span class="pl-s1">target</span>.<span class="pl-en">reshape_as</span>(<span class="pl-s1">input</span>))
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>torch.normal</code> out argument is now required to have the same size as the computed output (<a href="https://github.com/pytorch/pytorch/pull/32031" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32031/hovercard">#32031</a>)</h3>
<p>Previously, on CPU devices, <code>torch.normal(mean, std, out=out)</code> would resize <code>out</code> to the correct size. To be consistent with the CUDA implementation, weve changed it so that <code>out</code> must either already have the correct size, or be an empty tensor with size <code>[0]</code>. To work around this, please ensure that your <code>out</code> tensor has the correct size.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">normal</span>(<span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">3</span>), <span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">3</span>), <span class="pl-s1">out</span><span class="pl-c1">=</span><span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">2</span>))
<span class="pl-en">tensor</span>([ <span class="pl-c1">0.0300</span>, <span class="pl-c1">0.7830</span>, <span class="pl-c1">-</span><span class="pl-c1">1.3579</span>])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">normal</span>(<span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">3</span>), <span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">3</span>), <span class="pl-s1">out</span><span class="pl-c1">=</span><span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">2</span>))
<span class="pl-v">RuntimeError</span>: <span class="pl-s1">inconsistent</span> <span class="pl-s1">tensor</span>, <span class="pl-en">output</span> <span class="pl-s1">size</span> ([<span class="pl-c1">2</span>]) <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-s1">the</span> <span class="pl-s1">same</span> <span class="pl-k">as</span> <span class="pl-s1">broadcasted</span> <span class="pl-s1">mean</span> <span class="pl-c1">and</span> <span class="pl-s1">std</span> <span class="pl-en">size</span> (<span class="pl-c1">3</span>)
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>Tensor.geometric_</code> no longer supports integral Tensors (<a href="https://github.com/pytorch/pytorch/pull/31878" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31878/hovercard">#31878</a>)</h3>
<p>Previously, on CPU devices, <code>Tensor.geometric_</code> supported
Tensors with integral dtype. Now, it only supports floating point. We
removed support for this because it doesnt make sense for <code>geometric_</code> to operate on integral dtypes.</p>
<h3>Changed <code>torch.floor_divide</code> <code>input</code> positional argument name to <code>self</code> (<a href="https://github.com/pytorch/pytorch/pull/34552" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34552/hovercard">#34552</a>)</h3>
<p>Before PyTorch 1.5, <code>torch.floor_divide</code> took two positional arguments: <code>torch.floor_divide(input, other)</code>. Weve changed the name of the <code>input</code> argument to <code>self</code>; this will break code that called <code>torch.floor_divide</code> via keyword argument. For example:</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-s1">torch</span>.<span class="pl-en">floor_divide</span>(<span class="pl-s1">input</span><span class="pl-c1">=</span><span class="pl-s1">x</span>, <span class="pl-s1">other</span><span class="pl-c1">=</span><span class="pl-s1">y</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c"># Either of the following works.</span>
<span class="pl-s1">torch</span>.<span class="pl-en">floor_divide</span>(<span class="pl-s1">self</span><span class="pl-c1">=</span><span class="pl-s1">x</span>, <span class="pl-s1">other</span><span class="pl-c1">=</span><span class="pl-s1">y</span>)
<span class="pl-s1">torch</span>.<span class="pl-en">floor_divide</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>)
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h2>C++ API</h2>
<h3>RNN / GRU / LSTM layers (<a href="https://github.com/pytorch/pytorch/pull/34322" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34322/hovercard">#34322</a>)</h3>
<ul>
<li>Instead of returning <code>RNNOutput</code>, RNN / GRU <code>forward</code> method now returns <code>std::tuple&lt;Tensor, Tensor&gt;</code>, and LSTM <code>forward</code> method now returns <code>std::tuple&lt;Tensor, std::tuple&lt;Tensor, Tensor&gt;&gt;</code>, matching Python API.</li>
<li>LSTM forward methods hidden state parameter now has type <code>torch::optional&lt;std::tuple&lt;Tensor, Tensor&gt;&gt;</code>, matching Python API.</li>
<li>RNN / LSTM / GRU layers now have <code>forward_with_packed_input</code> method which accepts <code>PackedSequence</code> as input and optionally hidden state, matching the <code>forward(PackedSequence, ...)</code> variant in Python API.</li>
<li>RNN / LSTM / GRU layers no longer have these fields: <code>w_ih</code> / <code>w_hh</code> / <code>b_ih</code> / <code>b_hh</code>. Instead, to access the weights and biases of the gates, users should do e.g. <code>rnn-&gt;named_parameters()["weight_ih_l0"]</code>, which mirrors the Python API <code>rnn.weight_ih_l0</code>.</li>
<li>In <code>RNNOptions</code>
<ul>
<li><code>tanh()</code> / <code>relu()</code> / <code>activation</code> are removed. Instead, <code>nonlinearity</code> is added which takes either <code>torch::kTanh</code> or <code>torch::kReLU</code></li>
<li><code>layers</code> is renamed to <code>num_layers</code></li>
<li><code>with_bias</code> is renamed to <code>bias</code></li>
</ul>
</li>
<li>In <code>LSTMOptions</code>
<ul>
<li><code>layers</code> is renamed to <code>num_layers</code></li>
<li><code>with_bias</code> is renamed to <code>bias</code></li>
</ul>
</li>
<li>In <code>GRUOptions</code>
<ul>
<li><code>layers</code> is renamed to <code>num_layers</code></li>
<li><code>with_bias</code> is renamed to <code>bias</code></li>
</ul>
</li>
</ul>
<h3>Upsample layer / F::interpolate function (<a href="https://github.com/pytorch/pytorch/pull/35025" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35025/hovercard">#35025</a>)</h3>
<ul>
<li>There are changes to <code>UpsampleOptions</code> and <code>InterpolateFuncOptions</code>:
<ul>
<li><code>size</code> is changed from <code>std::vector&lt;int64_t&gt;</code> to <code>c10::optional&lt;std::vector&lt;int64_t&gt;&gt;</code>. If you want to pass a list of <code>int64_t</code> to this argument, you must pass it as <code>std::vector&lt;int64_t&gt;</code>.</li>
<li><code>scale_factor</code> is changed from <code>std::vector&lt;double&gt;</code> to <code>c10::optional&lt;std::vector&lt;double&gt;&gt;</code>. If you want to pass a list of <code>double</code> to this argument, you must pass it as <code>std::vector&lt;double&gt;</code>.</li>
</ul>
</li>
<li>F::multilabel_margin_loss / F::multilabel_soft_margin_loss functions (<a href="https://github.com/pytorch/pytorch/pull/35163" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35163/hovercard">#35163</a>)</li>
<li><code>torch::nn::functional::MultiLabelMarginLossFuncOptions</code> is renamed to <code>torch::nn::functional::MultilabelMarginLossFuncOptions</code></li>
<li><code>torch::nn::functional::MultiLabelSoftMarginLossFuncOptions</code> is renamed to <code>torch::nn::functional::MultilabelSoftMarginLossFuncOptions</code></li>
<li>The deprecated <code>torch::nn::BatchNorm</code> is removed in favor of <code>torch::nn::BatchNorm{1,2,3}d</code></li>
<li>The deprecated <code>torch::nn::FeatureDropout</code> is removed in favor of <code>torch::nn::Dropout{2,3}d</code></li>
<li>The deprecated <code>torch::nn::modules_ordered_dict</code> is removed. User should do <code>Sequential sequential({{"m1", MyModule(1)}, {"m2", MyModule(2)}})</code> instead.</li>
<li>The deprecated <code>torch::nn::init::Nonlinearity</code> is removed, in favor of these enums: <code>torch::kLinear </code>/ <code>torch::kConv1D</code> / <code>torch::kConv2D</code> / <code>torch::kConv3D</code> / <code>torch::kConvTranspose1D</code> / <code>torch::kConvTranspose2D</code> / <code>torch::kConvTranspose3D</code> / <code>torch::kSigmoid</code> / <code>torch::kTanh</code> / <code>torch::kReLU</code> / <code>torch::kLeakyReLU</code></li>
<li>The deprecated <code>torch::nn::init::FanMode</code> is removed, in favor of these enums: <code>torch::kFanIn</code> / <code>torch::kFanOut</code></li>
</ul>
<h3>Optimizers</h3>
<ul>
<li><code>Optimizer::step</code> now accepts closure function as optional input and returns a tensor, and <code>LossClosureOptimizer</code> is removed (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="581847100" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/34790" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34790/hovercard" href="https://github.com/pytorch/pytorch/pull/34790">#34790</a>) (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="583849769" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/34957" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34957/hovercard" href="https://github.com/pytorch/pytorch/pull/34957">#34957</a>). If you had a custom optimizer class defined as:</li>
</ul>
<pre><code>struct MyOptimizer : Optimizer {
using Optimizer::Optimizer;
void step() override {...}
};
</code></pre>
<pre><code>* you would need to update your optimizer class definition as follows:
</code></pre>
<pre><code>struct MyOptimizer : Optimizer {
using Optimizer::Optimizer;
torch::Tensor step(LossClosure closure = nullptr) override {
...
// return `torch::Tensor()` if `closure` is nullptr
// (i.e. we are not computing the loss)
return torch::Tensor();
}
};
</code></pre>
<ul>
<li>Adagrad (<a href="https://github.com/pytorch/pytorch/pull/29335" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29335/hovercard">#29335</a>)
<ul>
<li>In <code>AdagradOptions</code>, <code>learning_rate</code> is renamed to <code>lr</code>.</li>
<li>In <code>Adagrad</code>, <code>sum_buffers</code> and <code>step_buffers</code>
are now removed, and parameter state should be accessed by calling the
accessors on the parameters corresponding state object. For example:</li>
</ul>
</li>
</ul>
<pre><code>auto&amp; param_state = static_cast&lt;AdagradParamState&amp;&gt;(
*optimizer.state()[c10::guts::to_string(parameter.unsafeGetTensorImpl())]);
// Use the following to access parameter state:
//
// param_state.sum()
// param_state.step()
</code></pre>
<ul>
<li>SGD (<a href="https://github.com/pytorch/pytorch/pull/32592" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32592/hovercard">#32592</a>)
<ul>
<li>In <code>SGDOptions</code>, <code>learning_rate</code> is renamed to <code>lr</code>.</li>
<li>In <code>SGD</code>, <code>momentum_buffers</code> is now removed,
and parameter state should be accessed by calling the accessors on the
parameters corresponding state object. For example:</li>
</ul>
</li>
</ul>
<pre><code>auto&amp; param_state = static_cast&lt;SGDParamState&amp;&gt;(
*optimizer.state()[c10::guts::to_string(parameter.unsafeGetTensorImpl())]);
// Use the following to access parameter state:
//
// param_state.momentum_buffer()
</code></pre>
<ul>
<li>Adam (<a href="https://github.com/pytorch/pytorch/pull/33730" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33730/hovercard">#33730</a>)
<ul>
<li>In <code>AdamOptions</code>:
<ul>
<li><code>learning_rate</code> is renamed to <code>lr</code></li>
<li><code>beta1</code> and <code>beta2</code> are replaced by a tuple <code>betas</code></li>
</ul>
</li>
<li>In <code>Adam</code>, <code>step_buffers</code>, <code>exp_average_buffers</code>, <code>exp_average_sq_buffers</code> and <code>max_exp_average_sq_buffers</code>
are now removed, and parameter state should be accessed by calling the
accessors on the parameters corresponding state object. For example:</li>
</ul>
</li>
</ul>
<pre><code>auto&amp; param_state = static_cast&lt;AdamParamState&amp;&gt;(
*optimizer.state()[c10::guts::to_string(parameter.unsafeGetTensorImpl())]);
// Use the following to access parameter state:
//
// param_state.step()
// param_state.exp_avg()
// param_state.exp_avg_sq()
// param_state.max_exp_avg_sq()
</code></pre>
<ul>
<li>RMSprop (<a href="https://github.com/pytorch/pytorch/pull/33450" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33450/hovercard">#33450</a>)
<ul>
<li>In <code>RMSpropOptions</code>:
<ul>
<li><code>learning_rate</code> is renamed to <code>lr</code></li>
</ul>
</li>
<li>In <code>RMSprop</code>, <code>square_average_buffers</code>, <code>momentum_buffers</code> and <code>grad_average_buffers</code>
are now removed, and parameter state should be accessed by calling the
accessors on the parameters corresponding state object. For example:</li>
</ul>
</li>
</ul>
<pre><code>auto&amp; param_state = static_cast&lt;RMSpropParamState&amp;&gt;(
*optimizer.state()[c10::guts::to_string(parameter.unsafeGetTensorImpl())]);
// Use the following to access parameter state:
//
// param_state.square_avg()
// param_state.momentum_buffer()
// param_state.grad_avg()
</code></pre>
<ul>
<li>
<p>LBFGS (<a href="https://github.com/pytorch/pytorch/pull/34564" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34564/hovercard">#34564</a>) (<a href="https://github.com/pytorch/pytorch/pull/34957" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34957/hovercard">#34957</a>)</p>
<ul>
<li>In <code>LBFGSOptions</code>:
<ul>
<li><code>learning_rate</code> is renamed to <code>lr</code></li>
<li><code>max_eval</code>s type is changed from <code>int64_t</code> to <code>c10::optional&lt;int64_t&gt;</code></li>
<li><code>tolerance_grads type</code> is changed from <code>float</code> to <code>double</code></li>
<li><code>tolerance_change type</code> is changed from <code>float</code> to <code>double</code></li>
<li><code>history_size type</code> is changed from <code>size_t</code> to <code>int64_t</code></li>
</ul>
</li>
<li>In <code>LBFGS</code>, <code>d</code>, <code>H_diag</code>, <code>prev_flat_grad</code>, <code>t</code>, <code>prev_loss</code>, <code>ro</code>, <code>al</code>, <code>old_dirs</code>, <code>old_stps</code>, <code>func_evals</code> and <code>state_n_iter</code>
are now removed, and parameter state should be accessed by calling the
accessors on the parameters corresponding state object. For example:</li>
</ul>
</li>
</ul>
<pre><code>auto&amp; param_state = static_cast&lt;LBFGSParamState&amp;&gt;(
*optimizer.state()[c10::guts::to_string(parameter.unsafeGetTensorImpl())]);
// Use the following to access parameter state:
//
// param_state.d()
// param_state.H_diag()
// param_state.prev_flat_grad()
// param_state.t()
// param_state.prev_loss()
// param_state.ro()
// param_state.al()
// param_state.old_dirs()
// param_state.old_stps()
// param_state.func_evals()
// param_state.n_iter()
</code></pre>
<h3>Removed <code>AutoGIL/AutoNoGIL</code> in favor of <code>pybind11::gil_scoped_*</code> functions (#<a href="https://github.com/pytorch/pytorch/pull/34301" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34301/hovercard">34301</a>)</h3>
<p>If your code released or acquired the GIL via AutoNoGIL or AutoGIL, please change the invocations to <code>pybind11::gil_scoped_release</code> or <code>pybind11::gil_scoped_release</code>, respectively.</p>
<h3>Others</h3>
<ul>
<li><code>torch::tensor(floating-point values)</code> will always produce tensor of default dtype, and <code>torch::tensor(integer values)</code> will always produce tensor of <code>torch::kLong</code> dtype, matching Python API behavior (<a href="https://github.com/pytorch/pytorch/pull/32367" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32367/hovercard">#32367</a>).</li>
<li><code>torch::Tensor::base()</code> is renamed to <code>torch::Tensor::_base()</code> , matching Python API. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="564992741" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/33316" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33316/hovercard" href="https://github.com/pytorch/pytorch/pull/33316">#33316</a>)</li>
<li>Renamed TensorTypeId to DispatchKey (<a href="https://github.com/pytorch/pytorch/pull/32154" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32154/hovercard">#32154</a>)</li>
<li>Throw an error if nbytes is called on a sparse tensor. (<a href="https://github.com/pytorch/pytorch/pull/33897" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33897/hovercard">#33897</a>)</li>
</ul>
<h2>JIT</h2>
<h3>Simple Executor Is Now On By Default</h3>
<p>The simple executor skips the number of fusion-related passes and
analyses that are very time-consuming. Disabling these optimizations
fixes pathologically long compilation times. The users that rely on GPU
fusion to have their desired performance profile, should turn on the
profiling executor. We provide C++ and python API to enable the
profiling executor:</p>
<ul>
<li>in python, call <code>torch._C._jit_set_profiling_mode(True)</code> before you call your model for the first time.</li>
<li>in C++, include <code>#include &lt;torch/csrc/jit/runtime/graph_executor.h&gt;</code> and set <code>getProfilingMode() = true</code> before you invoke your model for the first time.</li>
</ul>
<h2>Quantization</h2>
<h3><strong>Remove qconfig_dict in top level eager mode quantization API</strong> (<a href="https://github.com/pytorch/pytorch/pull/31972" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31972/hovercard">#31972</a>).</h3>
<p>In eager mode quantization, one needs to manually insert quant and
dequant stubs in a model to specify where activations are quantized.
Having a qconfig_dict that specifies the quantization configuration for
each module is not useful as one needs to manually modify the model with
quant/dequant stubs. The new API makes it explicit that the model needs
to be manually modified for quantization.</p>
<pre><code># previously qconfig_dict was an optional argument to prepare
def prepare(model, qconfig_dict=None, inplace=False):
# now replaced with
def prepare(model, inplace=False):
</code></pre>
<h2>RPC</h2>
<h3>Functional API for Distributed Autograd and Distributed Optimizer</h3>
<p>More specifically, callers must pass <code>context_id</code> to <code>torch.distributed.autograd.backward()</code> and <code>torch.distributed.optim.step()</code>. (<a href="https://github.com/pytorch/pytorch/pull/33711" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33711/hovercard">#33711</a>)</p>
<pre><code># Before
import torch.distributed.autograd as dist_autograd
import torch.distributed.rpc as rpc
from torch import optim
from torch.distributed.optim import DistributedOptimizer
with dist_autograd.context() as context_id:
# Forward pass.
rref1 = rpc.remote("worker1", torch.add, args=(torch.ones(2), 3))
rref2 = rpc.remote("worker1", torch.add, args=(torch.ones(2), 1))
loss = rref1.to_here() + rref2.to_here()
# Backward pass.
dist_autograd.backward([loss.sum()])
# Optimizer.
dist_optim = DistributedOptimizer(
optim.SGD,
[rref1, rref2],
lr=0.05,
)
</code></pre>
<pre><code># After
import torch.distributed.autograd as dist_autograd
import torch.distributed.rpc as rpc
from torch import optim
from torch.distributed.optim import DistributedOptimizer
with dist_autograd.context() as context_id:
# Forward pass.
rref1 = rpc.remote("worker1", torch.add, args=(torch.ones(2), 3))
rref2 = rpc.remote("worker1", torch.add, args=(torch.ones(2), 1))
loss = rref1.to_here() + rref2.to_here()
# Backward pass.
dist_autograd.backward(context_id, [loss.sum()])
# Optimizer.
dist_optim = DistributedOptimizer(
optim.SGD,
[rref1, rref2],
lr=0.05,
)
dist_optim.step(context_id)
</code></pre>
<h3>Disallow sending CUDA tensors over RPC</h3>
<p>The motivation is to prevent potential invalid device errors when the
number of devices on the sender and the receiver does not match.
However applications, can always move CUDA tensors to CPU before sending
(<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="568703487" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/33604" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33604/hovercard" href="https://github.com/pytorch/pytorch/pull/33604">#33604</a>).</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.4.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-k">import</span> <span class="pl-s1">torch</span>
<span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">distributed</span>.<span class="pl-s1">rpc</span> <span class="pl-k">as</span> <span class="pl-s1">rpc</span>
<span class="pl-s1">rpc</span>.<span class="pl-en">init_rpc</span>(<span class="pl-s">"worker0"</span>, <span class="pl-s1">rank</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">world_size</span><span class="pl-c1">=</span><span class="pl-c1">2</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">2</span>, <span class="pl-s1">device</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)
<span class="pl-s1">ret</span> <span class="pl-c1">=</span> <span class="pl-s1">rpc</span>.<span class="pl-en">rpc_sync</span>(<span class="pl-s">"worker1"</span>, <span class="pl-s1">torch</span>.<span class="pl-s1">add</span>, <span class="pl-s1">args</span><span class="pl-c1">=</span>(<span class="pl-s1">x</span>, <span class="pl-c1">3</span>))
<span class="pl-s1">rpc</span>.<span class="pl-en">shutdown</span>()
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-k">import</span> <span class="pl-s1">torch</span>
<span class="pl-k">import</span> <span class="pl-s1">torch</span>.<span class="pl-s1">distributed</span>.<span class="pl-s1">rpc</span> <span class="pl-k">as</span> <span class="pl-s1">rpc</span>
<span class="pl-s1">rpc</span>.<span class="pl-en">init_rpc</span>(<span class="pl-s">"worker0"</span>, <span class="pl-s1">rank</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">world_size</span><span class="pl-c1">=</span><span class="pl-c1">2</span>)
<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">2</span>, <span class="pl-s1">device</span><span class="pl-c1">=</span><span class="pl-c1">0</span>)
<span class="pl-s1">ret</span> <span class="pl-c1">=</span> <span class="pl-s1">rpc</span>.<span class="pl-en">rpc_sync</span>(<span class="pl-s">"worker1"</span>, <span class="pl-s1">torch</span>.<span class="pl-s1">add</span>, <span class="pl-s1">args</span><span class="pl-c1">=</span>(<span class="pl-s1">x</span>.<span class="pl-en">cpu</span>(), <span class="pl-c1">3</span>))
<span class="pl-s1">rpc</span>.<span class="pl-en">shutdown</span>()
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h1>New Features</h1>
<h2>Python</h2>
<h3>Added new functional autograd API (<a href="https://github.com/pytorch/pytorch/pull/34066" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34066/hovercard">#34066</a>)</h3>
<ul>
<li>See Highlights for more details</li>
</ul>
<h3>New <code>__torch_function__</code> API Override Mechanism (<a href="https://github.com/pytorch/pytorch/pull/30730" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30730/hovercard">#30730</a>, <a href="https://github.com/pytorch/pytorch/pull/32194" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32194/hovercard">#32194</a>, <a href="https://github.com/pytorch/pytorch/pull/32799" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32799/hovercard">#32799</a>, <a href="https://github.com/pytorch/pytorch/pull/34240" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34240/hovercard">#34240</a>, <a href="https://github.com/pytorch/pytorch/pull/34303" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34303/hovercard">#34303</a>).</h3>
<p>We introduced <code>__torch_function__</code>, an API override mechanism for subclassing <code>torch.Tensor</code> in Python. This is useful for creating custom objects that implement the <code>torch.*</code> APIs. These currently support overriding most <code>torch.*</code>, and <code>torch.nn.functional</code> APIs; weve also planned future support for subclassing <code>torch.Tensor</code> (see tracking issue <a href="https://github.com/pytorch/pytorch/issues/22402" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/22402/hovercard">#22402</a>).</p>
<h2>New Operators</h2>
<ul>
<li><code>torch.logical_and</code> and <code>torch.logical_or</code> operations added (<a href="https://github.com/pytorch/pytorch/pull/30521" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30521/hovercard">#30521</a>).</li>
<li><code>torch.square</code> added (<a href="https://github.com/pytorch/pytorch/pull/30719" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30719/hovercard">#30719</a>).</li>
<li><code>torch.bitwise_and</code> added (<a href="https://github.com/pytorch/pytorch/pull/31104" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31104/hovercard">#31104</a>).</li>
<li><code>torch.cummax</code>, <code>torch.cummin</code> added (<a href="https://github.com/pytorch/pytorch/pull/32169" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32169/hovercard">#32169</a>, <a href="https://github.com/pytorch/pytorch/pull/32238" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32238/hovercard">#32238</a>, <a href="https://github.com/pytorch/pytorch/pull/32537" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32537/hovercard">#32537</a>, <a href="https://github.com/pytorch/pytorch/pull/33492" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33492/hovercard">#33492</a>).</li>
<li><code>torch.floor_divide</code> , <code>Tensor.floor_divide</code> added (<a href="https://github.com/pytorch/pytorch/pull/30493" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30493/hovercard">#30493</a>, <a href="https://github.com/pytorch/pytorch/pull/34552" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34552/hovercard">#34552</a>).</li>
<li><code>torch.true_divide</code> , <code>Tensor.true_divide</code> added, analogous to Python 's, and NumPy's (true) division (<a href="https://github.com/pytorch/pytorch/pull/34236" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34236/hovercard">#34236</a>, <a href="https://github.com/pytorch/pytorch/pull/34794" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34794/hovercard">#34794</a>)</li>
<li><code>nn.functional.hardsigmoid</code> added(<a href="https://github.com/pytorch/pytorch/pull/34545" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34545/hovercard">#34545</a>).</li>
<li>Added PCA and SVD for low-rank matrices (<code>torch.pca_lowrank</code>, <code>torch.svd_lowrank</code>), <code>torch.lobpcg</code> for positive-defined generalized eigenvalue problem (<a href="https://github.com/pytorch/pytorch/pull/34721" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34721/hovercard">#34721</a>).</li>
</ul>
<h2>Distributions</h2>
<ul>
<li><code>distributions.von_mises</code> added (<a href="https://github.com/pytorch/pytorch/pull/33418" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33418/hovercard">#33418</a>).</li>
<li><code>distributions.mixture_same_family</code> : Added support for mixture distributions (<a href="https://github.com/pytorch/pytorch/pull/22742" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/22742/hovercard">#22742</a>, <a href="https://github.com/pytorch/pytorch/pull/33408" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33408/hovercard">#33408</a>).</li>
<li><code>distributions.transforms.TanhTransform</code> added(<a href="https://github.com/pytorch/pytorch/pull/19785" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/19785/hovercard">#19785</a>).</li>
<li><code>distributions.continuous_bernoulli</code> added (<a href="https://github.com/pytorch/pytorch/pull/34619" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34619/hovercard">#34619</a>).</li>
</ul>
<h2>C++ API</h2>
<ul>
<li>NN modules / functionals
<ul>
<li><code>torch::nn::MultiheadAttention</code> (<a href="https://github.com/pytorch/pytorch/pull/27309" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27309/hovercard">#27309</a>)</li>
<li><code>torch::nn::RNNCell</code> / <code>LSTMCell</code> / <code>GRUCell</code> (<a href="https://github.com/pytorch/pytorch/pull/34400" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34400/hovercard">#34400</a>)</li>
<li><code>torch::nn::AdaptiveLogSoftmaxWithLoss</code> (<a href="https://github.com/pytorch/pytorch/pull/29076" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29076/hovercard">#29076</a>).</li>
<li><code>torch::nn::utils::rnn::PackedSequence</code> / <code>pack_padded_sequence</code> / <code>pad_packed_sequence</code> / <code>pack_sequence</code> / <code>pad_sequence</code> (<a href="https://github.com/pytorch/pytorch/pull/32387" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32387/hovercard">#32387</a>, <a href="https://github.com/pytorch/pytorch/pull/33652" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33652/hovercard">#33652</a>, <a href="https://github.com/pytorch/pytorch/pull/34185" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34185/hovercard">#34185</a>)</li>
</ul>
</li>
<li>C++ tensor indexing (<a href="https://github.com/pytorch/pytorch/pull/30424" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30424/hovercard">#30424</a>, <a href="https://github.com/pytorch/pytorch/pull/32841" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32841/hovercard">#32841</a>, <a href="https://github.com/pytorch/pytorch/pull/30427" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30427/hovercard">#30427</a>, <a href="https://github.com/pytorch/pytorch/pull/34255" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34255/hovercard">#34255</a>)
<ul>
<li>Please see docs: <a href="https://pytorch.org/cppdocs/notes/tensor_indexing.html" rel="nofollow">https://pytorch.org/cppdocs/notes/tensor_indexing.html</a></li>
</ul>
</li>
<li>Operators
<ul>
<li>C++ API parity: <code>isinf</code> (<a href="https://github.com/pytorch/pytorch/pull/31099" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31099/hovercard">#31099</a>).</li>
</ul>
</li>
<li>Autograd
<ul>
<li>Add <code>at::Tensor::retain_grad</code> API (<a href="https://github.com/pytorch/pytorch/pull/33349" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33349/hovercard">#33349</a>).</li>
</ul>
</li>
<li>C++ extensions
<ul>
<li>Add option to use ninja to compile ahead-of-time <code>cpp_extensions</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="553683326" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/32495" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32495/hovercard" href="https://github.com/pytorch/pytorch/pull/32495">#32495</a>, <a href="https://github.com/pytorch/pytorch/pull/33084" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33084/hovercard">#33084</a>)</li>
<li>Added support for Pytorch C++ extensions to use HIP (<a href="https://github.com/pytorch/pytorch/pull/32669" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32669/hovercard">#32669</a>).</li>
</ul>
</li>
</ul>
<h2>Distributed</h2>
<ul>
<li>Allows Python application to create subclass of C++ <code>c10d.Store</code> using pybind11 trampoline class <a href="https://github.com/pytorch/pytorch/pull/30415" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30415/hovercard">#30415</a>.</li>
</ul>
<h2>Mobile</h2>
<ul>
<li>Loading module from android asset (<a href="https://github.com/pytorch/pytorch/pull/30378" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30378/hovercard">#30378</a>).</li>
<li>Torchscript print to logcat (<a href="https://github.com/pytorch/pytorch/pull/31456" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31456/hovercard">#31456</a>).</li>
</ul>
<h2>Quantization</h2>
<ul>
<li>qnnpack TanH (<a href="https://github.com/pytorch/pytorch/pull/31013" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31013/hovercard">#31013</a>).</li>
<li>Adding quantized clamp kernel (<a href="https://github.com/pytorch/pytorch/pull/30541" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30541/hovercard">#30541</a>).</li>
<li>Quantized H Tangent function (<a href="https://github.com/pytorch/pytorch/pull/31031" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31031/hovercard">#31031</a>).</li>
<li>QNNPACK: Add support for dynamic quantization. (<a href="https://github.com/pytorch/pytorch/pull/31896" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31896/hovercard">#31896</a>).</li>
<li>Add operator support for dynamic quant on mobile (<a href="https://github.com/pytorch/pytorch/pull/32479" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32479/hovercard">#32479</a>).</li>
<li>Adding native qconcat (<a href="https://github.com/pytorch/pytorch/pull/32252" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32252/hovercard">#32252</a>).</li>
<li>FP16 dynamic quantized Linear (<a href="https://github.com/pytorch/pytorch/pull/32331" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32331/hovercard">#32331</a>).</li>
<li>Add support for Dynamic LSTM quantization on Mobile (<a href="https://github.com/pytorch/pytorch/pull/32757" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32757/hovercard">#32757</a>).</li>
<li>Quantized sigmoid function (<a href="https://github.com/pytorch/pytorch/pull/31851" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31851/hovercard">#31851</a>).</li>
<li>Quantized leaky relu (<a href="https://github.com/pytorch/pytorch/pull/33004" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33004/hovercard">#33004</a>).</li>
<li>Add a quantized batch_norm operator (<a href="https://github.com/pytorch/pytorch/pull/33080" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33080/hovercard">#33080</a>).</li>
<li>Add Quantized BatchNorm2d module (<a href="https://github.com/pytorch/pytorch/pull/33109" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33109/hovercard">#33109</a>).</li>
<li>Add the 3d avg pool for video related model (<a href="https://github.com/pytorch/pytorch/pull/33339" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33339/hovercard">#33339</a>).</li>
<li>Add quantized_hardtanh (<a href="https://github.com/pytorch/pytorch/pull/34097" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34097/hovercard">#34097</a>).</li>
<li>Add quantized ELU activation (<a href="https://github.com/pytorch/pytorch/pull/34267" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34267/hovercard">#34267</a>).</li>
<li>Add the 3d upsample quantized op for video model (<a href="https://github.com/pytorch/pytorch/pull/34594" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34594/hovercard">#34594</a>).</li>
<li>Add the quantized batch_norm3d and also batch_norm3d fused with relu operators (<a href="https://github.com/pytorch/pytorch/pull/34702" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34702/hovercard">#34702</a>).</li>
<li>Add quantized implementation of hard sigmoid (<a href="https://github.com/pytorch/pytorch/pull/34607" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34607/hovercard">#34607</a>).</li>
</ul>
<h2>RPC</h2>
<ul>
<li>[Experimental] Enable autograd profiler to work with RPC (<a href="https://github.com/pytorch/pytorch/pull/31381" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31381/hovercard">#31381</a>, <a href="https://github.com/pytorch/pytorch/pull/34398" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34398/hovercard">#34398</a>, <a href="https://github.com/pytorch/pytorch/pull/30677" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30677/hovercard">#30677</a>, <a href="https://github.com/pytorch/pytorch/pull/31346" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31346/hovercard">#31346</a>, <a href="https://github.com/pytorch/pytorch/pull/31380" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31380/hovercard">#31380</a>).</li>
<li>[Experimental] Allow calling remote TorchScript functions using RPC (<a href="https://github.com/pytorch/pytorch/pull/32466" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32466/hovercard">#32466</a>, <a href="https://github.com/pytorch/pytorch/pull/33190" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33190/hovercard">#33190</a>, <a href="https://github.com/pytorch/pytorch/pull/32990" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32990/hovercard">#32990</a>, <a href="https://github.com/pytorch/pytorch/pull/32959" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32959/hovercard">#32959</a>, <a href="https://github.com/pytorch/pytorch/pull/33526" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33526/hovercard">#33526</a>, <a href="https://github.com/pytorch/pytorch/pull/33992" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33992/hovercard">#33992</a>, <a href="https://github.com/pytorch/pytorch/pull/33582" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33582/hovercard">#33582</a>, <a href="https://github.com/pytorch/pytorch/pull/32197" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32197/hovercard">#32197</a>, <a href="https://github.com/pytorch/pytorch/pull/33329" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33329/hovercard">#33329</a>, <a href="https://github.com/pytorch/pytorch/pull/34183" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34183/hovercard">#34183</a>).</li>
</ul>
<h1>Improvements</h1>
<h2>AMD/ROCm</h2>
<ul>
<li><code>nn.RNN</code>: Ensure MIOpen is called on same stream as operator (<a href="https://github.com/pytorch/pytorch/pull/30672" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30672/hovercard">#30672</a>)</li>
<li>Fixed asserts in CUDA kernels (<a href="https://github.com/pytorch/pytorch/pull/31276" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31276/hovercard">#31276</a>, <a href="https://github.com/pytorch/pytorch/pull/31297" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31297/hovercard">#31297</a>).</li>
<li>Enable BFloat16 support for convolutions (<a href="https://github.com/pytorch/pytorch/pull/30948" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30948/hovercard">#30948</a>).</li>
<li>Abstract atomic add calls (<a href="https://github.com/pytorch/pytorch/pull/31992" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31992/hovercard">#31992</a>).</li>
<li>Install complete set of headers for ROCm build (<a href="https://github.com/pytorch/pytorch/pull/32076" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32076/hovercard">#32076</a>).</li>
<li>Adjust <code>elementwise_kernel</code> settings on ROCm (<a href="https://github.com/pytorch/pytorch/pull/32609" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32609/hovercard">#32609</a>).</li>
<li><code>nn.BatchNorm{1,2,3}d</code>: Use <code>C10_WARP_SIZE</code> to fix functionality on HIP vs CUDA for gradient computation (<a href="https://github.com/pytorch/pytorch/pull/33098" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33098/hovercard">#33098</a>).</li>
<li>Enabled Bfloat16 type for activation functions and <code>batch_norm</code> (<a href="https://github.com/pytorch/pytorch/pull/32065" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32065/hovercard">#32065</a>).</li>
<li>Added ability to enable/disable MIOpen at runtime (<a href="https://github.com/pytorch/pytorch/pull/33118" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33118/hovercard">#33118</a>).</li>
<li>Enable BFloat16 type for pooling ops (<a href="https://github.com/pytorch/pytorch/pull/34166" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34166/hovercard">#34166</a>).</li>
<li><code>torch.pdist</code>: improved precision by enabling double <code>__shfl_down</code> (<a href="https://github.com/pytorch/pytorch/pull/34103" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34103/hovercard">#34103</a>).</li>
<li>Enabled BFloat16 type for loss functions and few misc ops required for resnet50 (<a href="https://github.com/pytorch/pytorch/pull/34469" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34469/hovercard">#34469</a>).</li>
<li>Enabled BFloat16 type for EmbeddingBag, Index, and Sigmoid ops (<a href="https://github.com/pytorch/pytorch/pull/34630" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34630/hovercard">#34630</a>).</li>
<li>Enabled 3D batch norms through MIOpen (<a href="https://github.com/pytorch/pytorch/pull/33262" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33262/hovercard">#33262</a>).</li>
<li>Enabled 3D convolutions through ROCm (<a href="https://github.com/pytorch/pytorch/pull/33067" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33067/hovercard">#33067</a>).</li>
<li><code>nn.RNN</code>: Check if weights need to be flattened (<a href="https://github.com/pytorch/pytorch/pull/34265" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34265/hovercard">#34265</a>).</li>
</ul>
<h2>C++ API</h2>
<ul>
<li>NN modules / functionals
<ul>
<li>Allow skipping default arguments in module's forward method when module is used in <code>torch::nn::Sequential</code> (<a href="https://github.com/pytorch/pytorch/pull/33027" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33027/hovercard">#33027</a>) (<a href="https://github.com/pytorch/pytorch/pull/33718" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33718/hovercard">#33718</a>)</li>
<li>Make <code>torch::nn::Sequential::push_back(AnyModule)</code> methods public (<a href="https://github.com/pytorch/pytorch/pull/34208" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34208/hovercard">#34208</a>).</li>
<li>Refactor RNN / GRU / LSTM layers to match Python API (<a href="https://github.com/pytorch/pytorch/pull/34322" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34322/hovercard">#34322</a>).</li>
<li>For <code>Conv{1,2,3}d</code>, <code>padding_mode</code> now accepts <code>torch::kZeros</code> / <code>torch::kReflect</code> / <code>torch::kReplicate</code> / <code>torch::kCircular</code>, matching Python API behavior. (<a href="https://github.com/pytorch/pytorch/pull/35023" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35023/hovercard">#35023</a>)</li>
<li>Fix <code>F::interpolate</code> and <code>torch::nn::Upsample</code> implementation to match Python API behavior (<a href="https://github.com/pytorch/pytorch/pull/35025" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35025/hovercard">#35025</a>) (<a href="https://github.com/pytorch/pytorch/pull/36274" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36274/hovercard">#36274</a>)</li>
<li>Renaming: MultiLabelMarginLossFuncOptions -&gt;
MultilabelMarginLossFuncOptions, MultiLabelSoftMarginLossFuncOptions
-&gt; MultilabelSoftMarginLossFuncOptions (<a href="https://github.com/pytorch/pytorch/pull/35163" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35163/hovercard">#35163</a>)</li>
</ul>
</li>
<li>Optimizers
<ul>
<li>All existing optimizers in the C++ API (Adagrad / SGD / Adam /
RMSprop / LBFGS) have the following changes to achieve parity with the
Python API: (<a href="https://github.com/pytorch/pytorch/pull/29335" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29335/hovercard">#29335</a>) (<a href="https://github.com/pytorch/pytorch/pull/30739" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30739/hovercard">#30739</a>) (<a href="https://github.com/pytorch/pytorch/pull/32592" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32592/hovercard">#32592</a>) (<a href="https://github.com/pytorch/pytorch/pull/33730" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33730/hovercard">#33730</a>) (<a href="https://github.com/pytorch/pytorch/pull/33450" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33450/hovercard">#33450</a>) (<a href="https://github.com/pytorch/pytorch/pull/34790" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34790/hovercard">#34790</a>) (<a href="https://github.com/pytorch/pytorch/pull/34564" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34564/hovercard">#34564</a>) (<a href="https://github.com/pytorch/pytorch/pull/34957" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34957/hovercard">#34957</a>) (<a href="https://github.com/pytorch/pytorch/pull/35001" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35001/hovercard">#35001</a>) (<a href="https://github.com/pytorch/pytorch/pull/36033" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36033/hovercard">#36033</a>) (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="596762209" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36245" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36245/hovercard" href="https://github.com/pytorch/pytorch/pull/36245">#36245</a>)
<ul>
<li>step function implementation is changed to behave the same as Python equivalent</li>
<li>Constructor now accepts <code>std::vector&lt;OptimizerParamGroup&gt;</code> as input</li>
<li><code>optimizer.add_param_group(...)</code> can be used to add parameter group to an existing optimizer</li>
<li><code>optimizer.state()</code> should be used to access parameter state</li>
</ul>
</li>
</ul>
</li>
<li>autograd
<ul>
<li>Renamed <code>at::Tensor::base()</code> to <code>_base()</code>, matching Python API (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="564992741" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/33316" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33316/hovercard" href="https://github.com/pytorch/pytorch/pull/33316">#33316</a>)</li>
</ul>
</li>
</ul>
<h2>Distributed</h2>
<ul>
<li>Allow TCPStore to pick a port to bind to (<a href="https://github.com/pytorch/pytorch/pull/31674" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31674/hovercard">#31674</a>).</li>
<li>Enhance NCCL watchdog to actively abort communicators for timed out ops (<a href="https://github.com/pytorch/pytorch/pull/32338" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32338/hovercard">#32338</a>).</li>
<li>Adding DDP Design Note (<a href="https://github.com/pytorch/pytorch/pull/32158" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32158/hovercard">#32158</a>).</li>
<li>Recommend using DDP over DataParallel (<a href="https://github.com/pytorch/pytorch/pull/35063/files">#35063</a>)</li>
</ul>
<h2>Distributions</h2>
<ul>
<li><code>distributions.independent</code>: added explicit string representation (<a href="https://github.com/pytorch/pytorch/pull/33676" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33676/hovercard">#33676</a>).</li>
<li><code>categorical.sample</code>: Reduced memory overhead (<a href="https://github.com/pytorch/pytorch/pull/34900" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34900/hovercard">#34900</a>).</li>
<li><code>distributions.MultivariateNormal</code>: improved numeric stability and performance (<a href="https://github.com/pytorch/pytorch/pull/32092" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32092/hovercard">#32092</a>).</li>
</ul>
<h2>Mobile</h2>
<ul>
<li>Add module level qpl logging. (<a href="https://github.com/pytorch/pytorch/pull/30906" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30906/hovercard">#30906</a>).</li>
<li>Expose setNumThreads to android api (<a href="https://github.com/pytorch/pytorch/pull/31033" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31033/hovercard">#31033</a>).</li>
<li>remove unused SparseCPUType from mobile build (<a href="https://github.com/pytorch/pytorch/pull/33517" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33517/hovercard">#33517</a>).</li>
<li>make sure mobile build work with dynamic dispatch (<a href="https://github.com/pytorch/pytorch/pull/34038" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34038/hovercard">#34038</a>).</li>
<li>support for custom mobile build with dynamic dispatch (<a href="https://github.com/pytorch/pytorch/pull/34055" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34055/hovercard">#34055</a>).</li>
<li>Add watchOS support (<a href="https://github.com/pytorch/pytorch/pull/33318" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33318/hovercard">#33318</a>).</li>
<li>speed_benchmark_torch switch to log latency from dataset level to row level (<a href="https://github.com/pytorch/pytorch/pull/34598" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34598/hovercard">#34598</a>).</li>
</ul>
<h2>ONNX</h2>
<h3><strong><strong>Exporting More Torch Operators to ONNX</strong></strong></h3>
<p>In PyTorch 1.5, we have added support for 10 additional operators and
also enhanced support for another set of 10+ existing operators. We
have also added support for exporting large models (&gt; 2GB) to ONNX.
Additionally, we have made enhancements and optimizations to the export
of ScriptModules and will continue to do that in the next release. We
have also made improvements to the custom op export experience.</p>
<ul>
<li>Export dynamic unbind, split and getitem (<a href="https://github.com/pytorch/pytorch/pull/29136" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29136/hovercard">#29136</a>).</li>
<li>Export torch.new_zeros (<a href="https://github.com/pytorch/pytorch/pull/34077" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34077/hovercard">#34077</a>).</li>
<li>Export Im2col (<a href="https://github.com/pytorch/pytorch/pull/30972" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30972/hovercard">#30972</a>).</li>
<li>Export bitwise_not for bool (<a href="https://github.com/pytorch/pytorch/pull/28439" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28439/hovercard">#28439</a>).</li>
<li>Export logsoftmax with dim != -1 (<a href="https://github.com/pytorch/pytorch/pull/30433" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30433/hovercard">#30433</a>).</li>
<li>Export einsum (<a href="https://github.com/pytorch/pytorch/pull/32716" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32716/hovercard">#32716</a>).</li>
<li>Export aten::copy_ and aten::index_put to ONNX opset 11 (<a href="https://github.com/pytorch/pytorch/pull/26941" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26941/hovercard">#26941</a>).</li>
<li>Export floor_divide (<a href="https://github.com/pytorch/pytorch/pull/31081" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31081/hovercard">#31081</a>).</li>
<li>Export one_hot (<a href="https://github.com/pytorch/pytorch/pull/34454" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34454/hovercard">#34454</a>).</li>
<li>Export torch.take (<a href="https://github.com/pytorch/pytorch/pull/33061" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33061/hovercard">#33061</a>).</li>
<li>Export bool type index mask (<a href="https://github.com/pytorch/pytorch/pull/32445" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32445/hovercard">#32445</a>).</li>
<li>Export split with list of sizes (<a href="https://github.com/pytorch/pytorch/pull/33161" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33161/hovercard">#33161</a>).</li>
<li>Export scalar tensor for split (<a href="https://github.com/pytorch/pytorch/pull/32493" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32493/hovercard">#32493</a>).</li>
<li>Export flatten to accept negative indices in opset 11 (<a href="https://github.com/pytorch/pytorch/pull/30751" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30751/hovercard">#30751</a>).</li>
<li>Export sort with negative axes (<a href="https://github.com/pytorch/pytorch/pull/31971" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31971/hovercard">#31971</a>).</li>
<li>Export Interpolate to support scale (<a href="https://github.com/pytorch/pytorch/pull/28324" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28324/hovercard">#28324</a>, <a href="https://github.com/pytorch/pytorch/pull/31526" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31526/hovercard">#31526</a>, <a href="https://github.com/pytorch/pytorch/pull/32554" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32554/hovercard">#32554</a>).</li>
<li>Export quantized concat (<a href="https://github.com/pytorch/pytorch/pull/30887" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30887/hovercard">#30887</a>).</li>
</ul>
<h3><strong><strong>Enhancing the Support for ScriptModule</strong></strong></h3>
<ul>
<li>Fixed access to element in size tensor for scripting (<a href="https://github.com/pytorch/pytorch/pull/32652" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32652/hovercard">#32652</a>).</li>
<li>Export Conv in TorchScript module (<a href="https://github.com/pytorch/pytorch/pull/30618" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30618/hovercard">#30618</a>).</li>
<li>Export Dim operation in TorchScript module (<a href="https://github.com/pytorch/pytorch/pull/31928" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31928/hovercard">#31928</a>).</li>
<li>Export randnlike in TorchScript module (<a href="https://github.com/pytorch/pytorch/pull/32830" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32830/hovercard">#32830</a>).</li>
<li>Partially support tensor lists in loop/concat/stack (<a href="https://github.com/pytorch/pytorch/pull/30126" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30126/hovercard">#30126</a>)</li>
</ul>
<h3><strong><strong>Enhancing Existing Export Logic</strong></strong></h3>
<ul>
<li>Updating ONNX checker logic. (<a href="https://github.com/pytorch/pytorch/pull/33522" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33522/hovercard">#33522</a>).</li>
<li>Adding ONNX large model export support in exporter (<a href="https://github.com/pytorch/pytorch/pull/33062" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33062/hovercard">#33062</a>).</li>
<li>Extend op registration (<a href="https://github.com/pytorch/pytorch/pull/32943" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32943/hovercard">#32943</a>).</li>
<li>Support op registration if name starts with underscore (<a href="https://github.com/pytorch/pytorch/pull/32017" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32017/hovercard">#32017</a>).</li>
</ul>
<h3><strong><strong>Optimizing Exported ONNX Graph</strong></strong></h3>
<ul>
<li>Try exporting ONNX with force_outplace=False (<a href="https://github.com/pytorch/pytorch/pull/29466" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29466/hovercard">#29466</a>).</li>
<li>Enable constant folding (<a href="https://github.com/pytorch/pytorch/pull/29834" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29834/hovercard">#29834</a>).</li>
<li>Added cons folding for ONNX mul, div, sqrt ops (<a href="https://github.com/pytorch/pytorch/pull/32077" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32077/hovercard">#32077</a>).</li>
<li>Enable constant folding for Reshape (<a href="https://github.com/pytorch/pytorch/pull/31054" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31054/hovercard">#31054</a>).</li>
</ul>
<h3><strong><strong>Adding Utility Functions and Refactoring</strong></strong></h3>
<ul>
<li>Added ONNX model checker to ONNX export (<a href="https://github.com/pytorch/pytorch/pull/32298" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32298/hovercard">#32298</a>).</li>
<li>Export custom ops (<a href="https://github.com/pytorch/pytorch/pull/29752" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29752/hovercard">#29752</a>).</li>
<li>Upgrade exported ONNX IR version to 6 (<a href="https://github.com/pytorch/pytorch/pull/31025" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31025/hovercard">#31025</a>).</li>
<li>Provide names for operator nodes in ONNX exported graph (<a href="https://github.com/pytorch/pytorch/pull/27342" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27342/hovercard">#27342</a>).</li>
<li>Update ONNX landing page since 1.3 (<a href="https://github.com/pytorch/pytorch/pull/32805" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32805/hovercard">#32805</a>).</li>
<li>Turn ONNX_ML into a proper build option (<a href="https://github.com/pytorch/pytorch/pull/33424" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33424/hovercard">#33424</a>).</li>
</ul>
<h2>Operator Benchmark</h2>
<ul>
<li>Added small input shapes to test operator overhead (<a href="https://github.com/pytorch/pytorch/pull/30617" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30617/hovercard">#30617</a>).</li>
<li>Added <code>binary_test</code> to benchmark binary ops (<a href="https://github.com/pytorch/pytorch/pull/31326" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31326/hovercard">#31326</a>).</li>
<li>Added <code>Tensor.copy_</code> operator (<a href="https://github.com/pytorch/pytorch/pull/31327" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31327/hovercard">#31327</a>).</li>
<li>Removed option to wipe cache because it did not help with variance (<a href="https://github.com/pytorch/pytorch/pull/31334" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31334/hovercard">#31334</a>).</li>
<li>Added <code>torch.diag</code> (<a href="https://github.com/pytorch/pytorch/pull/32597" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32597/hovercard">#32597</a>).</li>
</ul>
<h2>Quantization</h2>
<ul>
<li>Guard against copying from quantized Tensor to non-quantized Tensor (<a href="https://github.com/pytorch/pytorch/pull/29660" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29660/hovercard">#29660</a>).</li>
<li>Add assert for min, max, qmin, qmax for ChooseQuantizationParams (<a href="https://github.com/pytorch/pytorch/pull/32739" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32739/hovercard">#32739</a>).</li>
<li>Support broadcast for quantized mul kernel (<a href="https://github.com/pytorch/pytorch/pull/30442" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30442/hovercard">#30442</a>).</li>
<li>Make FakeQuant use <code>REGISTER_DISPATCH</code> (<a href="https://github.com/pytorch/pytorch/pull/33682" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33682/hovercard">#33682</a>).</li>
<li>Set alias analysis kind to <code>FROM_SCHEMA</code> for qadd, qmul, qclamp, qconcat (<a href="https://github.com/pytorch/pytorch/pull/33359" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33359/hovercard">#33359</a>).</li>
<li>Migrate <code>fake_quant_slice</code> to TensorIterator (<a href="https://github.com/pytorch/pytorch/pull/33744" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33744/hovercard">#33744</a>).</li>
<li>Parallelize quantize and dequantize (<a href="https://github.com/pytorch/pytorch/pull/33765" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33765/hovercard">#33765</a>).</li>
<li>Make FP16 RNN use new prepack op (<a href="https://github.com/pytorch/pytorch/pull/34339" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34339/hovercard">#34339</a>).</li>
<li>Refactor QAT Conv module for better extensibility (<a href="https://github.com/pytorch/pytorch/pull/30362" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30362/hovercard">#30362</a>).</li>
<li>Use non-inplace for insert observer pass (<a href="https://github.com/pytorch/pytorch/pull/34190" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34190/hovercard">#34190</a>).</li>
</ul>
<h2>RPC</h2>
<ul>
<li>Add default arguments for <code>init_method</code> (<a href="https://github.com/pytorch/pytorch/pull/30208" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30208/hovercard">#30208</a>).</li>
<li>By default ignore RRef leaks during shutdown (<a href="https://github.com/pytorch/pytorch/pull/30217" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30217/hovercard">#30217</a>).</li>
<li>Robustify <code>rpc_agent</code> handlers with generic Future (<a href="https://github.com/pytorch/pytorch/pull/31224" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31224/hovercard">#31224</a>).</li>
<li>Fix error message in incorrect <code>rref.localValue()</code> call (<a href="https://github.com/pytorch/pytorch/pull/31199" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31199/hovercard">#31199</a>).</li>
<li>Add <code>RpcAgent::getWorkerInfos()</code> API to return all <code>WorkInfo</code>s in the group (<a href="https://github.com/pytorch/pytorch/pull/30241" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30241/hovercard">#30241</a>).</li>
<li>Add local shutdown to process group agent (<a href="https://github.com/pytorch/pytorch/pull/30330" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30330/hovercard">#30330</a>).</li>
<li>Add <code>RRef.str()</code> API to return a string representation of the RRef (<a href="https://github.com/pytorch/pytorch/pull/30609" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30609/hovercard">#30609</a>).</li>
<li>Adding Debug Info for RRef Context (<a href="https://github.com/pytorch/pytorch/pull/30610" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30610/hovercard">#30610</a>).</li>
<li>Add <code>get_metrics</code> and <code>get_debug_info</code> to RPC agent (<a href="https://github.com/pytorch/pytorch/pull/30833" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30833/hovercard">#30833</a>).</li>
<li>Adding debugging metrics to process group agent (<a href="https://github.com/pytorch/pytorch/pull/30884" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30884/hovercard">#30884</a>).</li>
<li>Add glue code to collect debug info from all components (<a href="https://github.com/pytorch/pytorch/pull/30888" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30888/hovercard">#30888</a>).</li>
<li>Make RRef leak detection always print a warning log (<a href="https://github.com/pytorch/pytorch/pull/31922" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31922/hovercard">#31922</a>).</li>
<li>Allow multiple backward passes to accumulate gradients. (<a href="https://github.com/pytorch/pytorch/pull/32506" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32506/hovercard">#32506</a>).</li>
<li>Allow RRef local creation with IValue objects (<a href="https://github.com/pytorch/pytorch/pull/33263" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33263/hovercard">#33263</a>).</li>
<li>Improve ProcessGroup <code>RpcBackendOptions</code> Constructor API (<a href="https://github.com/pytorch/pytorch/pull/34081" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34081/hovercard">#34081</a>).</li>
<li>Enhanced Error Reporting in Dist Autograd/RPC (<a href="https://github.com/pytorch/pytorch/pull/34179" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34179/hovercard">#34179</a>).</li>
<li>Delete all user forks tracked in <code>RRefContext</code> before graceful shutdown (<a href="https://github.com/pytorch/pytorch/pull/31893" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31893/hovercard">#31893</a>).</li>
<li>Best-effort Error Detection for Using Deleted UserRRefs (<a href="https://github.com/pytorch/pytorch/pull/34673" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34673/hovercard">#34673</a>).</li>
<li>Don't run user function until all UserRRefs in the args are confirmed (<a href="https://github.com/pytorch/pytorch/pull/34497" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34497/hovercard">#34497</a>).</li>
<li>Support using self as the destination in <code>rpc.remote</code> for builtin operators (<a href="https://github.com/pytorch/pytorch/pull/34931" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34931/hovercard">#34931</a>).</li>
<li>Add debug info API for distributed autograd. (<a href="https://github.com/pytorch/pytorch/pull/30642" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30642/hovercard">#30642</a>).</li>
<li>Propagate errors in <code>clearAndWaitForOutstandingRpcsAsync</code>. (<a href="https://github.com/pytorch/pytorch/pull/32952" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32952/hovercard">#32952</a>).</li>
</ul>
<h2>Type Hints</h2>
<ul>
<li>DataLoader <code>default_collate</code> type hint added (<a href="https://github.com/pytorch/pytorch/pull/28935" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28935/hovercard">#28935</a>).</li>
<li><code>Tensor.rsub, Tensor.rpow, Tensor.rtruediv, Tensor.map_</code> type hints were added (<a href="https://github.com/pytorch/pytorch/pull/30576" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30576/hovercard">#30576</a>).</li>
<li><code>torch.optim</code>: added more missing type hints (<a href="https://github.com/pytorch/pytorch/pull/31130" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31130/hovercard">#31130</a>).</li>
<li><code>nn.functional.grid_sample</code>, <code>nn.functional.affine_grid</code>: added missing align_corners annotation (<a href="https://github.com/pytorch/pytorch/pull/32492" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32492/hovercard">#32492</a>).</li>
<li><code>torch.nn.Parameter</code> constructor type hint was fixed (<a href="https://github.com/pytorch/pytorch/pull/32617" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32617/hovercard">#32617</a>).</li>
<li><code>nn.MultiheadAttention</code>, <code>nn.Transformer</code>: added type hints (<a href="https://github.com/pytorch/pytorch/pull/28396" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28396/hovercard">#28396</a>).</li>
<li><code>torch.optim.LambdaLR</code> constructor type hint was fixed (<a href="https://github.com/pytorch/pytorch/pull/33271" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33271/hovercard">#33271</a>).</li>
<li><code>torch.optim</code>: added missing default value for <code>LRScheduler.step()</code> (<a href="https://github.com/pytorch/pytorch/pull/32411" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32411/hovercard">#32411</a>).</li>
<li>Make type of <code>Tensor.type()</code> more specific (<a href="https://github.com/pytorch/pytorch/pull/32353" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32353/hovercard">#32353</a>).</li>
<li><code>torch.optim.optimizer.Optimizer</code> type hints were fixed (<a href="https://github.com/pytorch/pytorch/pull/32900" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32900/hovercard">#32900</a>).</li>
<li><code>optim.AdamW</code> type hints were fixed (<a href="https://github.com/pytorch/pytorch/pull/34299" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34299/hovercard">#34299</a>).</li>
<li><code>torch.utils.data.Sampler</code> subclasses type hints were added (<a href="https://github.com/pytorch/pytorch/pull/33679" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33679/hovercard">#33679</a>).</li>
<li><code>nn.Sequential</code>, <code>nn.ModuleList</code>, <code>nn.ParameterList</code>, <code>nn.ParameterDict</code> type hints were fixed (<a href="https://github.com/pytorch/pytorch/pull/33686" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33686/hovercard">#33686</a>).</li>
<li><code>Tensor.bfloat16()</code> type hint was added (<a href="https://github.com/pytorch/pytorch/pull/33747" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33747/hovercard">#33747</a>).</li>
<li>Binary operator type hints were fixed (<a href="https://github.com/pytorch/pytorch/pull/33748" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33748/hovercard">#33748</a>).</li>
<li><code>torch.bfloat16</code>, <code>nn.Module.training</code>, <code>Tensor.cuda</code>, and 10s of other type hints added (<a href="https://github.com/pytorch/pytorch/pull/33762" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33762/hovercard">#33762</a>).</li>
<li><code>torch.add</code> type hint was fixed(<a href="https://github.com/pytorch/pytorch/pull/33935" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33935/hovercard">#33935</a>).</li>
<li><code>Tensor.shape</code> type hint was fixed (<a href="https://github.com/pytorch/pytorch/pull/34595" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34595/hovercard">#34595</a>).</li>
<li>Fixed <code>utils.data</code> imports (<a href="https://github.com/pytorch/pytorch/pull/33543" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33543/hovercard">#33543</a>).</li>
<li><code>Tensor.__radd__</code> type hint was fixed (<a href="https://github.com/pytorch/pytorch/pull/35231" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35231/hovercard">#35231</a>)</li>
</ul>
<h2>Other</h2>
<ul>
<li><code>autograd.detect_anomaly</code>: added support for Sparse Tensors (<a href="https://github.com/pytorch/pytorch/pull/29803" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29803/hovercard">#29803</a>).</li>
<li><code>autograd.detect_anomaly</code>: Error messages now print the current Node name (<a href="https://github.com/pytorch/pytorch/pull/33875" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33875/hovercard">#33875</a>).</li>
<li><code>autograd.profiler</code>: added better error message when crashing while profiling multi-worker DataLoader (<a href="https://github.com/pytorch/pytorch/pull/31473" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31473/hovercard">#31473</a>).</li>
<li><code>autograd.profiler</code> Enable using <code>torch.autograd.profiler.record_function</code> as decorator (<a href="https://github.com/pytorch/pytorch/pull/30861" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30861/hovercard">#30861</a>).</li>
<li><code>autograd.profiler</code> Speed up <code>export_chrome_trace</code> by up to 4x (<a href="https://github.com/pytorch/pytorch/pull/30724" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30724/hovercard">#30724</a>).</li>
<li><code>torch.autograd</code>: added better error message when attempting to fork (<a href="https://github.com/pytorch/pytorch/pull/33885" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33885/hovercard">#33885</a>).</li>
<li><code>torch.cuda.memory.caching_allocator_alloc</code>, <code>torch.cuda.memory.caching_allocator_delete</code> exposed in Python API (<a href="https://github.com/pytorch/pytorch/pull/33860" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33860/hovercard">#33860</a>).</li>
<li><code>torch.roll</code>: added bool tensor support (<a href="https://github.com/pytorch/pytorch/pull/31194" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31194/hovercard">#31194</a>).</li>
<li><code>torch.flip</code>: added support for bool tensors (<a href="https://github.com/pytorch/pytorch/pull/31267" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31267/hovercard">#31267</a>).</li>
<li><code>torch.equal</code>: added support for bfloat16 CPU scalar types (<a href="https://github.com/pytorch/pytorch/pull/30817" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30817/hovercard">#30817</a>).</li>
<li><code>torch.save</code>, <code>torch.load</code>: added error message for minimum dill version support (<a href="https://github.com/pytorch/pytorch/pull/30985" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30985/hovercard">#30985</a>).</li>
<li><code>torch.diagonal</code>: added named tensor support(<a href="https://github.com/pytorch/pytorch/pull/30193" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30193/hovercard">#30193</a>).</li>
<li><code>torch.linspace</code>: added support for integral types on CPU (<a href="https://github.com/pytorch/pytorch/pull/32218" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32218/hovercard">#32218</a>).</li>
<li><code>torch.eig</code>: Added autograd support in the case where eigenvalues are real (<a href="https://github.com/pytorch/pytorch/pull/33090" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33090/hovercard">#33090</a>).</li>
<li><code>torch.mvlgamma</code>: improved error message (<a href="https://github.com/pytorch/pytorch/pull/32665" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32665/hovercard">#32665</a>).</li>
<li><code>torch.no_grad</code>, <code>torch.enable_grad</code>: added support for decorating generator functions (<a href="https://github.com/pytorch/pytorch/pull/31792" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31792/hovercard">#31792</a>).</li>
<li><code>torch.narrow</code>: added Tensor overload for <code>start</code> (<a href="https://github.com/pytorch/pytorch/pull/34317" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34317/hovercard">#34317</a>).</li>
<li><code>Tensor.random_</code>: enabled support for half on CPU (<a href="https://github.com/pytorch/pytorch/pull/34030" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34030/hovercard">#34030</a>).</li>
<li><code>Tensor.grad</code>: added warnings when accessing it if it won't be populated for known reasons (<a href="https://github.com/pytorch/pytorch/pull/30531" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30531/hovercard">#30531</a>).</li>
<li><code>torch.cuda.comm.gather</code>: improved error message (<a href="https://github.com/pytorch/pytorch/pull/27456" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27456/hovercard">#27456</a>).</li>
<li><code>nn.functional.max_pool{1,2,3}d</code>: added named tensor support (<a href="https://github.com/pytorch/pytorch/pull/31669" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31669/hovercard">#31669</a>).</li>
<li><code>nn.Module.load_state_dict</code>: Include the contents of the exception in error messages (<a href="https://github.com/pytorch/pytorch/pull/32693" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32693/hovercard">#32693</a>).</li>
<li><code>nn.MultiheadAttention</code>: add support for 3D attention mask (<a href="https://github.com/pytorch/pytorch/pull/31996" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31996/hovercard">#31996</a>).</li>
<li><code>nn.MSELoss</code> : Added performance warning for using CPU Half (<a href="https://github.com/pytorch/pytorch/pull/33021" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33021/hovercard">#33021</a>).</li>
<li><code>nn.ModuleList</code>, <code>nn.ParameterDict</code>, <code>nn.ParameterDict</code>: added more descriptive error messages when attempting to call these like Modules (<a href="https://github.com/pytorch/pytorch/pull/29991" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29991/hovercard">#29991</a>).</li>
<li><code>nn.init.dirac_</code>: Added <code>groups</code> option for compatibility with initializing group convolutions (<a href="https://github.com/pytorch/pytorch/pull/32825" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32825/hovercard">#32825</a>).</li>
<li>Added error message to indicate that reduction operations are not supported for dim &gt;= 64 (<a href="https://github.com/pytorch/pytorch/pull/31476" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31476/hovercard">#31476</a>).</li>
<li>Type Promotion: added supports for sparse tensors and arithmetic operations (<a href="https://github.com/pytorch/pytorch/pull/30429" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30429/hovercard">#30429</a>).</li>
<li>Enabled indexing for bfloat16 tensors (<a href="https://github.com/pytorch/pytorch/pull/31692" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31692/hovercard">#31692</a>).</li>
<li>Add 64-bit indexing support for CUDA Tensors (<a href="https://github.com/pytorch/pytorch/pull/33405" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33405/hovercard">#33405</a>).</li>
<li>Added warning when converting a read-only NumPy array to <code>torch.Tensor</code> (<a href="https://github.com/pytorch/pytorch/pull/33615" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33615/hovercard">#33615</a>).</li>
<li>Set rpath for JNI library on Mac (<a href="https://github.com/pytorch/pytorch/pull/32247" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32247/hovercard">#32247</a>).</li>
<li>Updated MAGMA to 2.5.2 for Windows (<a href="https://github.com/pytorch/pytorch/pull/30513" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30513/hovercard">#30513</a>, <a href="https://github.com/pytorch/pytorch/pull/34205" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34205/hovercard">#34205</a>).</li>
<li>Marked PyTorch incompatible with Python-3.6.0 (<a href="https://github.com/pytorch/pytorch/pull/34724" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34724/hovercard">#34724</a>).</li>
<li>Consider <code>hub_dir</code> alongside <code>TORCH_HOME</code> env variable for storing hub models (<a href="https://github.com/pytorch/pytorch/pull/32844" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32844/hovercard">#32844</a>).</li>
<li>Improved dll loading logic on Windows (<a href="https://github.com/pytorch/pytorch/pull/33856" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33856/hovercard">#33856</a>).</li>
<li>Error out if legacy <code>Tensor.new </code> is called on alternate layouts or dtypes (<a href="https://github.com/pytorch/pytorch/pull/31485" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31485/hovercard">#31485</a>).</li>
<li><code>utils.checkpoint.checkpoint_sequential</code>: Removed deprecated variadic arguments behavior (<a href="https://github.com/pytorch/pytorch/pull/25985" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25985/hovercard">#25985</a>).</li>
</ul>
<h1>Bug Fixes</h1>
<h2>C++ API</h2>
<ul>
<li>NN modules / functionals
<ul>
<li><code>output_ratio</code> for <code>FractionalMaxPool{2,3}d </code>module and <code>fractional_max_pool{2,3}d</code> functional should accept double as data type (<a href="https://github.com/pytorch/pytorch/pull/33304" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33304/hovercard">#33304</a>)</li>
<li>For <code>AdaptiveAvgPool{2,3}d </code>and <code>AdaptiveMaxPool{2,3}d</code>, <code>output_size</code> is changed to accept <code>c10::nullopt</code> in its elements, matching Python API behavior. (<a href="https://github.com/pytorch/pytorch/pull/35022" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35022/hovercard">#35022</a>)</li>
<li>Fix bug in <code>fractional_max_pool3d_with_indices</code> implementation (<a href="https://github.com/pytorch/pytorch/pull/35024" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35024/hovercard">#35024</a>)</li>
<li>Remove <code>namespace F = torch::nn::functional</code> from torch/nn/modules/batchhnorm.h, so that people don't have to use <code>F</code> to alias <code>torch::nn::functional</code> if they don't want to (<a href="https://github.com/pytorch/pytorch/pull/30684" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30684/hovercard">#30684</a>)</li>
</ul>
</li>
<li>autograd
<ul>
<li>For <code>AutogradContext</code>, <code>get_dirty()</code> is removed and <code>get_and_bump_dirty()</code> is added, and the latter always bumps the version counter of the returned tensors (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="561342654" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/33068" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33068/hovercard" href="https://github.com/pytorch/pytorch/pull/33068">#33068</a>)</li>
<li>Fix allow_unused checking for C++ API (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="573471032" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/34035" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34035/hovercard" href="https://github.com/pytorch/pytorch/pull/34035">#34035</a>)</li>
<li>Remove <code>using namespace torch::autograd</code> from <code>torch/csrc/api/include/torch/nn/modules/_functions.h</code> (<a href="https://github.com/pytorch/pytorch/pull/34423" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34423/hovercard">#34423</a>)</li>
</ul>
</li>
<li>Operators
<ul>
<li><code>torch::tensor(floating-point values)</code> will always produce tensor of default dtype, and <code>torch::tensor(integer values)</code> will always produce tensor of <code>torch::kLong</code> dtype, matching Python API behavior (<a href="https://github.com/pytorch/pytorch/pull/32367" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32367/hovercard">#32367</a>)</li>
<li>Fix <code>torch::allclose</code> to handle <code>std::numeric_limits::lowest()</code> for integral types (<a href="https://github.com/pytorch/pytorch/pull/32978" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32978/hovercard">#32978</a>)</li>
<li>Switch <code>torch::empty_like</code> to use <code>merge_in</code> to process TensorOptions (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="567761104" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/33505" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33505/hovercard" href="https://github.com/pytorch/pytorch/pull/33505">#33505</a>)</li>
</ul>
</li>
</ul>
<h2>Distributed</h2>
<ul>
<li>Allow DDP to detect globally unused parameters (<a href="https://github.com/pytorch/pytorch/pull/28883" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28883/hovercard">#28883</a>).</li>
<li>Accept url query when <code>rank</code> or <code>world_size</code> is specified in Process Group <code>init_method</code> URL (<a href="https://github.com/pytorch/pytorch/pull/32016" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32016/hovercard">#32016</a>).</li>
<li>Add ability to abort NCCL communicators from the store. (<a href="https://github.com/pytorch/pytorch/pull/32895" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32895/hovercard">#32895</a>).</li>
<li>Fix timeout support when initializing process group with TCP store (<a href="https://github.com/pytorch/pytorch/pull/33434" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33434/hovercard">#33434</a>).</li>
<li>Abort NCCL communicators before throwing operation timed out (<a href="https://github.com/pytorch/pytorch/pull/31128" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31128/hovercard">#31128</a>).</li>
<li>Fix logging for aborted communicators in ProcessGroupNCCL (<a href="https://github.com/pytorch/pytorch/pull/33147" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33147/hovercard">#33147</a>).</li>
<li>Fix handling of replica parameters in DataParallel (<a href="https://github.com/pytorch/pytorch/pull/33907" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33907/hovercard">#33907</a>).</li>
<li>Specify <code>requires_grad</code> for Parameter replica so it's not always set to True by default (<a href="https://github.com/pytorch/pytorch/pull/32356" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32356/hovercard">#32356</a>)</li>
<li>Put sparse <code>allreduce</code> results to input tensors (<a href="https://github.com/pytorch/pytorch/pull/32226" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32226/hovercard">#32226</a>)</li>
<li>Issue a warning when <code>zero_grad</code> is used in <code>DataParallel</code> (<a href="https://github.com/pytorch/pytorch/pull/33064" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33064/hovercard">#33064</a>)</li>
</ul>
<h2>JIT</h2>
<ul>
<li>TorchScript compilation fixed for (<a href="https://github.com/pytorch/pytorch/pull/33783" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33783/hovercard">#33783</a>):
<ul>
<li><code>torch.stft</code></li>
<li><code>torch.lu</code>,</li>
<li><code>torch.lu_unpack</code></li>
<li><code>torch.cdist</code></li>
<li><code>torch.norm</code></li>
</ul>
</li>
<li><code>tensor.tolist()</code> compilation now supported, requires output type annotation (<a href="https://github.com/pytorch/pytorch/pull/34554" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34554/hovercard">#33472</a>)</li>
</ul>
<pre><code>def foo(float_matrix, scalar_ten):
# type: (Tensor, Tensor) -&gt; Tuple[List[List[float]], bool]
out1 : List[List[float]] = float_matrix.tolist()
out2 = torch.jit.annotate(bool, scalar_ten.tolist())
return out1, out2
</code></pre>
<ul>
<li><code>torch.rand_like</code> and other <code>_like</code> constructors no longer require additional arguments in TorchScript</li>
<li>Compilation for <code>nn.Module</code> APIs added <a href="https://github.com/pytorch/pytorch/pull/29495" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29495/hovercard">(#29495)</a>:
<ul>
<li><code>children</code></li>
<li><code>named_children</code></li>
<li><code>modules</code></li>
<li><code>named_modules</code></li>
</ul>
</li>
<li>Support for ModuleList Indexing with Integer Literal (<a href="https://github.com/pytorch/pytorch/pull/29236/" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29236/hovercard">#29236)</a></li>
<li>Fixed flipped outputs for <code>PackedSequence</code> (<a href="https://github.com/pytorch/pytorch/pull/32955" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32955/hovercard">#32955)</a></li>
<li>Support <code>index</code> and <code>type</code> properties on <code>Device</code> (<a href="https://github.com/pytorch/pytorch/pull/32953" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32953/hovercard">#32953</a>)
<ul>
<li><code>device.index</code></li>
<li><code>device.type</code></li>
</ul>
</li>
<li>Add remaining <code>Tensor</code> properties (<a href="https://github.com/pytorch/pytorch/pull/33906" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33906/hovercard">#33906</a>)
<ul>
<li><code>tensor.ndim</code></li>
<li><code>tensor.T</code></li>
<li><code>tensor.name</code></li>
<li><code>tensor.is_leaf</code></li>
</ul>
</li>
<li>Fix augmented assignment to non-tensor attributes <a href="https://github.com/pytorch/pytorch/pull/32993" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32993/hovercard">#32993</a></li>
<li>Fixed type resolution for function arguments <a href="https://github.com/pytorch/pytorch/pull/29623" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29623/hovercard">#29623</a>
<ul>
<li>Previously we resolved types by parsing their names directly, but
now TorchScript uses the value of the type directly from Python</li>
<li>This allows types types like <code>torch.device</code> to be used</li>
</ul>
</li>
<li><code>len</code> on tuples containing different types <a href="https://github.com/pytorch/pytorch/pull/35768" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35768/hovercard">#35768</a></li>
</ul>
<h2>Mobile</h2>
<ul>
<li>Fix exception message in Java Tensor (<a href="https://github.com/pytorch/pytorch/pull/30205" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30205/hovercard">#30205</a>).</li>
<li>Fix the crashes for c++ not able to find java class through Jni (<a href="https://github.com/pytorch/pytorch/pull/30390" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30390/hovercard">#30390</a>).</li>
<li>Add @DoNotStrip to nativeNewTensor method. (<a href="https://github.com/pytorch/pytorch/pull/30472" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30472/hovercard">#30472</a>).</li>
<li>GenericDict/List type use unshapedType() (<a href="https://github.com/pytorch/pytorch/pull/30428" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30428/hovercard">#30428</a>).</li>
<li>Support tensors with a storage offset in Java (<a href="https://github.com/pytorch/pytorch/pull/31584" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31584/hovercard">#31584</a>).</li>
<li>Fix SIGABORT caused by double exception in PyTorchStreamReader when file not found. (<a href="https://github.com/pytorch/pytorch/pull/33243" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33243/hovercard">#33243</a>).</li>
<li>Fix <code>SELECTED_OP_LIST</code> file path issue (<a href="https://github.com/pytorch/pytorch/pull/33942" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33942/hovercard">#33942</a>).</li>
<li>Fix for handling batch size 0. (<a href="https://github.com/pytorch/pytorch/pull/34599" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34599/hovercard">#34599</a>).</li>
<li>fixed AutoGradMode/AutoNonVariableTypeMode uses for mobile callsites</li>
<li>Use <code>gettimeofday</code> on iOS (<a href="https://github.com/pytorch/pytorch/pull/30361" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30361/hovercard">#30361</a>).</li>
</ul>
<h2>ONNX</h2>
<ul>
<li>Fix <code>weight_norm</code> export for dim=0 (<a href="https://github.com/pytorch/pytorch/pull/31015" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31015/hovercard">#31015</a>).</li>
<li>Fix for constant folding flaky tests (<a href="https://github.com/pytorch/pytorch/pull/32546" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32546/hovercard">#32546</a>).</li>
<li>Fix export for avg_pool with default stride (<a href="https://github.com/pytorch/pytorch/pull/33017" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33017/hovercard">#33017</a>).</li>
<li>Fix ONNX CI by moving test data to aws (<a href="https://github.com/pytorch/pytorch/pull/33200" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33200/hovercard">#33200</a>).</li>
<li>Fix for random generators export (<a href="https://github.com/pytorch/pytorch/pull/33789" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33789/hovercard">#33789</a>).</li>
<li>Fix export of index_put (<a href="https://github.com/pytorch/pytorch/pull/31552" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31552/hovercard">#31552</a>).</li>
<li>Fix for expand -1 dim value (<a href="https://github.com/pytorch/pytorch/pull/34069" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34069/hovercard">#34069</a>).</li>
<li>Reduce ONNX test time on CI (<a href="https://github.com/pytorch/pytorch/pull/33242" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33242/hovercard">#33242</a>).</li>
<li>ONNX Error Message on Missing Op (<a href="https://github.com/pytorch/pytorch/pull/33593" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33593/hovercard">#33593</a>).</li>
<li>Fix exporting <code>copy_</code> with index as tensor input (<a href="https://github.com/pytorch/pytorch/pull/32801" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32801/hovercard">#32801</a>).</li>
<li>Fix for <code>rand_like</code> as well (<a href="https://github.com/pytorch/pytorch/pull/33095" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33095/hovercard">#33095</a>).</li>
<li>Added torchvision tests as part of ORT tests (<a href="https://github.com/pytorch/pytorch/pull/31835" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31835/hovercard">#31835</a>).</li>
<li>Remove non-ascii character from <code>torch/onnx/symbolic_opset11.py</code> (<a href="https://github.com/pytorch/pytorch/pull/31814" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31814/hovercard">#31814</a>).</li>
<li>Add flag to enable script tests (<a href="https://github.com/pytorch/pytorch/pull/32654" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32654/hovercard">#32654</a>).</li>
<li>Skip same tests in ONNX Python3 CI as in Python2 (<a href="https://github.com/pytorch/pytorch/pull/31827" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31827/hovercard">#31827</a>).</li>
<li>Fixed <code>torch.mm</code> export (<a href="https://github.com/pytorch/pytorch/pull/34661" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34661/hovercard">#34794</a>)</li>
<li>Fixed <code>aten::size</code> for opset 11 (<a href="https://github.com/pytorch/pytorch/pull/35984" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35984/hovercard">#35984</a>)</li>
</ul>
<h2>Quantization</h2>
<ul>
<li>Bug fix: Handle missing keys in observer state dict during load (<a href="https://github.com/pytorch/pytorch/pull/30357" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30357/hovercard">#30357</a>).</li>
<li>Fix BC for quantized linear (<a href="https://github.com/pytorch/pytorch/pull/30481" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30481/hovercard">#30481</a>).</li>
<li>Fix mapping white list to avoid attaching qconfig for DeQuantStub (<a href="https://github.com/pytorch/pytorch/pull/30636" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30636/hovercard">#30636</a>).</li>
<li>Fix default instantation of dynamic quantized LSTM (<a href="https://github.com/pytorch/pytorch/pull/31433" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31433/hovercard">#31433</a>).</li>
<li>Use default scale/zero_point in fake_quantize module instead of None (<a href="https://github.com/pytorch/pytorch/pull/32318" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32318/hovercard">#32318</a>).</li>
<li>Fix ASAN / potential segfault in quantized Tensor memory allocations. (<a href="https://github.com/pytorch/pytorch/pull/29882" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29882/hovercard">#29882</a>).</li>
<li>Don't serialize None values in observer (<a href="https://github.com/pytorch/pytorch/pull/32733" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32733/hovercard">#32733</a>).</li>
<li>Enable inplace relu fusion for training (<a href="https://github.com/pytorch/pytorch/pull/33105" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33105/hovercard">#33105</a>).</li>
<li>Bug fix in dynamic quantization kernels + better test coverage. (<a href="https://github.com/pytorch/pytorch/pull/33320" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33320/hovercard">#33320</a>).</li>
<li>Run weight_post_process for QAT (<a href="https://github.com/pytorch/pytorch/pull/33852" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33852/hovercard">#33852</a>).</li>
<li>Fix histogram observer to work with QAT on GPU (<a href="https://github.com/pytorch/pytorch/pull/34232" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34232/hovercard">#34232</a>).</li>
<li>Fix the quantized batchnorm2d (<a href="https://github.com/pytorch/pytorch/pull/34579" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34579/hovercard">#34579</a>).</li>
<li>Move QScheme ops to c10 (<a href="https://github.com/pytorch/pytorch/pull/30134" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30134/hovercard">#30134</a>).</li>
<li>Remove incorrect fp16 dynamic linear/relu op (<a href="https://github.com/pytorch/pytorch/pull/32774" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32774/hovercard">#32774</a>).</li>
</ul>
<h2>RPC</h2>
<ul>
<li>Fix serialization memory lifetime issue. (<a href="https://github.com/pytorch/pytorch/pull/30603" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30603/hovercard">#30603</a>).</li>
<li>Don't crash callee when function does not exist on it, instead return an Exception (<a href="https://github.com/pytorch/pytorch/pull/32726" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32726/hovercard">#32726</a>).</li>
<li>Throw the correct Exception on local client based on the <code>RemoteException</code> (<a href="https://github.com/pytorch/pytorch/pull/32936" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32936/hovercard">#32936</a>).</li>
<li>Attach autograd edges only for tensors requiring grad. (<a href="https://github.com/pytorch/pytorch/pull/30904" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30904/hovercard">#30904</a>).</li>
<li><code>WireSerializer</code> should check <code>has_storage()</code> (<a href="https://github.com/pytorch/pytorch/pull/34626" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34626/hovercard">#34626</a>).</li>
<li>Fixed potential deadlock in python exception handling (<a href="https://github.com/pytorch/pytorch/pull/35283/" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35283/hovercard">#35283</a>)</li>
</ul>
<h2>Other</h2>
<ul>
<li>
<p><code>torch.split</code>: Fixed incorrect gradient computation that assumed the output was not a view (<a href="https://github.com/pytorch/pytorch/pull/32044" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32044/hovercard">#32044</a>).</p>
</li>
<li>
<p>Allowed numpy integer types to be used where we accept Python integers (<a href="https://github.com/pytorch/pytorch/pull/30486" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30486/hovercard">#30486</a>).</p>
</li>
<li>
<p><code>torch.unique</code>, <code>torch.unique_consecutive</code>: fixed bug with zero-element input support (<a href="https://github.com/pytorch/pytorch/pull/31211" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31211/hovercard">#31211</a>).</p>
</li>
<li>
<p><code>Tensor.to_sparse</code>: fixed backward in the non-contiguous tensor case (<a href="https://github.com/pytorch/pytorch/pull/31223" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31223/hovercard">#31223</a>).</p>
</li>
<li>
<p><code>torch.index_put</code>: Added error checks for input tensors devices (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="537855141" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/31280" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31280/hovercard" href="https://github.com/pytorch/pytorch/pull/31280">#31280</a>) (<a href="https://github.com/pytorch/pytorch/pull/31280" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31280/hovercard">#31280</a>).</p>
</li>
<li>
<p>Ensure we switch the CUDA stream correctly in CUDA operations (<a href="https://github.com/pytorch/pytorch/pull/31537" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31537/hovercard">#31537</a>, <a href="https://github.com/pytorch/pytorch/pull/31538" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31538/hovercard">#31538</a>, <a href="https://github.com/pytorch/pytorch/pull/31541" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31541/hovercard">#31541</a>).</p>
</li>
<li>
<p><code>torch.SparseTensor</code>: ensure the legacy sparse constructor doesn't interpret Python data as tensor data. (<a href="https://github.com/pytorch/pytorch/pull/31490" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31490/hovercard">#31490</a>).</p>
</li>
<li>
<p><code>torch.argmax</code>, <code>torch.argmin</code>: Fixed incorrect behavior on large tensors (<a href="https://github.com/pytorch/pytorch/pull/33310" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33310/hovercard">#33310</a>).</p>
</li>
<li>
<p><code>torch.div</code>: Fixed to throw an error when dividing by integer zero on CPU (<a href="https://github.com/pytorch/pytorch/pull/32629" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32629/hovercard">#32629</a>).</p>
</li>
<li>
<p><code>torch.cos</code>: Fixed incorrect gradient computation caused by not properly initializing temporary vectors in avx2 code (<a href="https://github.com/pytorch/pytorch/pull/32722" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32722/hovercard">#32722</a>, <a href="https://github.com/pytorch/pytorch/pull/34281" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34281/hovercard">#34281</a>).</p>
</li>
<li>
<p><code>torch.logspace</code>: Added missing integer dtype support, fixed precision issues in floating-point implementation (<a href="https://github.com/pytorch/pytorch/pull/32744" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32744/hovercard">#32744</a>).</p>
</li>
<li>
<p><code>torch.prod</code>: Fixed behavior when passed a <code>torch.half</code> input tensor and <code>torch.float</code> output tensor (<a href="https://github.com/pytorch/pytorch/pull/32831" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32831/hovercard">#32831</a>).</p>
</li>
<li>
<p><code>torch.max</code>, <code>torch.min</code>: Fixed NaN handling (<a href="https://github.com/pytorch/pytorch/pull/32541" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32541/hovercard">#32541</a>).</p>
</li>
<li>
<p><code>torch.max</code>, <code>torch.min</code>: Added error check that operand and outputs are on the same device type (<a href="https://github.com/pytorch/pytorch/pull/32862" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32862/hovercard">#32862</a>).</p>
</li>
<li>
<p><code>torch.stack</code>: Added missing input size checks (<a href="https://github.com/pytorch/pytorch/pull/32931" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32931/hovercard">#32931</a>).</p>
</li>
<li>
<p><code>torch.add</code>: Fixed memory leak on certain platforms (<a href="https://github.com/pytorch/pytorch/pull/32478" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32478/hovercard">#32478</a>).</p>
</li>
<li>
<p><code>torch.normal</code>: Fixed shape checks (<a href="https://github.com/pytorch/pytorch/pull/33050" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33050/hovercard">#33050</a>).</p>
</li>
<li>
<p><code>torch.cumsum</code>: fixed to handle inputs with zero-sized dimensions correctly (<a href="https://github.com/pytorch/pytorch/pull/31694" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31694/hovercard">#31694</a>).</p>
</li>
<li>
<p><code>torch.device</code>: Disallow incorrectly formatted device strings (<a href="https://github.com/pytorch/pytorch/pull/29087" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29087/hovercard">#29087</a>).</p>
</li>
<li>
<p><code>torch.cat</code>: Disallow passing <code>out</code> as one of the input tensors (<a href="https://github.com/pytorch/pytorch/pull/30577" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30577/hovercard">#30577</a>).</p>
</li>
<li>
<p><code>torch.pdist</code>: Added support for large batch sizes (<a href="https://github.com/pytorch/pytorch/pull/31593" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31593/hovercard">#31593</a>).</p>
</li>
<li>
<p><code>torch.stft</code>: Fixed crash when used with <code>nn.DataParallel</code> (<a href="https://github.com/pytorch/pytorch/pull/31861" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31861/hovercard">#31861</a>).</p>
</li>
<li>
<p><code>torch.autograd</code>: Ensure the original grad mode is restored during backward (<a href="https://github.com/pytorch/pytorch/pull/31884" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31884/hovercard">#31884</a>).</p>
</li>
<li>
<p><code>torch.autograd</code>: Fixed a race condition by locking graph_task before writing leaf_streams. (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="547631220" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/31995" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31995/hovercard" href="https://github.com/pytorch/pytorch/pull/31995">#31995</a>) (<a href="https://github.com/pytorch/pytorch/pull/31995" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31995/hovercard">#31995</a>).</p>
</li>
<li>
<p><code>torch.tensordot</code>: Fixed support for negative dimensions (<a href="https://github.com/pytorch/pytorch/pull/31954" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31954/hovercard">#31954</a>).</p>
</li>
<li>
<p><code>torch.cumprod</code>: Fixed to handle inputs with zero-sized dimensions correctly (<a href="https://github.com/pytorch/pytorch/pull/32070" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32070/hovercard">#32070</a>).</p>
</li>
<li>
<p><code>torch.pow</code>: Fixed the gradient computation when the base is a Tensor or Scalar of zeros (<a href="https://github.com/pytorch/pytorch/pull/32062" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32062/hovercard">#32062</a>, <a href="https://github.com/pytorch/pytorch/pull/32063" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32063/hovercard">#32063</a>).</p>
</li>
<li>
<p><code>torch.baddbmm</code>: Fixed bug in corner case (<a href="https://github.com/pytorch/pytorch/pull/33538" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33538/hovercard">#33538</a>).</p>
</li>
<li>
<p><code>torch.where</code>: Added check for consistent devices (<a href="https://github.com/pytorch/pytorch/pull/33432" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33432/hovercard">#33432</a>).</p>
</li>
<li>
<p><code>torch.cdist</code>: Fixed gradient computation for <code>p=2</code> and large inputs (<a href="https://github.com/pytorch/pytorch/pull/31167" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31167/hovercard">#31167</a>).</p>
</li>
<li>
<p><code>torch.mv</code>: Fixed NaN handling (<a href="https://github.com/pytorch/pytorch/pull/31666" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31666/hovercard">#31666</a>).</p>
</li>
<li>
<p><code>torch.index_put</code>: Added handling for large input tensors (<a href="https://github.com/pytorch/pytorch/pull/33753" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33753/hovercard">#33753</a>).</p>
</li>
<li>
<p><code>torch.addmm</code>: Fixed incorrect output when using BLAS backend (<a href="https://github.com/pytorch/pytorch/pull/33819" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33819/hovercard">#33819</a>).</p>
</li>
<li>
<p><code>torch.topk</code> fixed double backward when input has non-finite values (<a href="https://github.com/pytorch/pytorch/pull/35253" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35253/hovercard">#35253</a>)</p>
</li>
<li>
<p><code>torch.load</code>: Avoid problematic pickle usages on Python 3.8.0 and 3.8.1 (<a href="https://github.com/pytorch/pytorch/pull/33824" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33824/hovercard">#33824</a>).</p>
</li>
<li>
<p><code>Tensor.to</code>: Fixed race condition for gradient computation that spans CUDA devices (<a href="https://github.com/pytorch/pytorch/pull/31930" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31930/hovercard">#31930</a>).</p>
</li>
<li>
<p><code>Tensor.random_</code> added check that <code>from</code> and <code>to</code> are within the Tensors dtype bounds (<a href="https://github.com/pytorch/pytorch/pull/34033" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34033/hovercard">#34033</a>).</p>
</li>
<li>
<p><code>Tensor.copy_</code>: Fixed memory overlap check and allowed outputs to be zero-strided tensors if the size is &lt;= 1 along that dimension (<a href="https://github.com/pytorch/pytorch/pull/34100" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34100/hovercard">#34100</a>).</p>
</li>
<li>
<p><code>nn.BatchNorm{1,2,3}d</code>: fixed gradient computation for empty inputs (<a href="https://github.com/pytorch/pytorch/pull/32820" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32820/hovercard">#32820</a>).</p>
</li>
<li>
<p><code>nn.BatchNorm</code>: Fixed behavior for inputs with large batch sizes (<a href="https://github.com/pytorch/pytorch/pull/32763" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32763/hovercard">#32763</a>).</p>
</li>
<li>
<p><code>nn.Conv2d</code>: Fixed 5d weight handling with MKLDNN backend (<a href="https://github.com/pytorch/pytorch/pull/34115" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34115/hovercard">#34115</a>).</p>
</li>
<li>
<p><code>nn.Conv3d</code>: Fixed unstable gradient computation (<a href="https://github.com/pytorch/pytorch/pull/34358" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34358/hovercard">#34358</a>).</p>
</li>
<li>
<p><code>nn.Conv{1,2,3}d</code>: added support for empty batch size(<a href="https://github.com/pytorch/pytorch/pull/32709" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32709/hovercard">#32709</a>).</p>
</li>
<li>
<p><code>nn.Conv{1,2,3}d</code>: fixed <code>CUDNN_STATUS_NOT_SUPPORTED</code> errors by trying multiple algorithms (<a href="https://github.com/pytorch/pytorch/pull/33073" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33073/hovercard">#33073</a>).</p>
</li>
<li>
<p><code>nn.Conv{1,2,3}d</code>: fixed padding mode support and added additional padding modes (reflection and replication) (<a href="https://github.com/pytorch/pytorch/pull/31784" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31784/hovercard">#31784</a>).</p>
</li>
<li>
<p><code>nn.Conv2d</code>, <code>nn.Conv3d</code>, <code>nn.Conv1d</code>, <code>nn.ConvTranspose2d</code>: Fixed support for batch sizes greater than 2^32 (<a href="https://github.com/pytorch/pytorch/pull/31383" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31383/hovercard">#31383</a>, <a href="https://github.com/pytorch/pytorch/pull/31379" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31379/hovercard">#31379</a>, <a href="https://github.com/pytorch/pytorch/pull/31889" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31889/hovercard">#31889</a>, <a href="https://github.com/pytorch/pytorch/pull/34407" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34407/hovercard">#34407,</a><a href="https://github.com/pytorch/pytorch/pull/31510" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31510/hovercard">#31510</a>).</p>
</li>
<li>
<p><code>nn.InstanceNorm</code>, <code>nn.GroupNorm</code>: Added error check for input with exactly one element (<a href="https://github.com/pytorch/pytorch/pull/29082" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29082/hovercard">#29082</a>).</p>
</li>
<li>
<p><code>nn.RNN</code>: Fixed moving RNNs to a device after applying weight norm (<a href="https://github.com/pytorch/pytorch/pull/32563" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32563/hovercard">#32563</a>, <a href="https://github.com/pytorch/pytorch/pull/32989" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32989/hovercard">#32989</a>).</p>
</li>
<li>
<p><code>nn.MultiLabelMarginLoss</code>: added support for 0-d tensors (<a href="https://github.com/pytorch/pytorch/pull/30765" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30765/hovercard">#30765</a>).</p>
</li>
<li>
<p><code>nn.GroupNorm</code>: added support for empty batch (<a href="https://github.com/pytorch/pytorch/pull/32401" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32401/hovercard">#32401</a>).</p>
</li>
<li>
<p><code>nn.NLLLoss</code>: fixed to support empty tensors on CUDA (<a href="https://github.com/pytorch/pytorch/pull/31491" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31491/hovercard">#31491</a>).</p>
</li>
<li>
<p><code>nn.GroupNorm</code>: corrected input size check (<a href="https://github.com/pytorch/pytorch/pull/33008" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33008/hovercard">#33008</a>)</p>
</li>
<li>
<p><code>nn.MultiLabelMarginLoss</code>: fixed memory leak on CUDA (<a href="https://github.com/pytorch/pytorch/pull/30767" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30767/hovercard">#30767</a>).</p>
</li>
<li>
<p><code>nn.MultiMarginLoss</code>: fixed error checking on CUDA for the 1D case. (<a href="https://github.com/pytorch/pytorch/pull/30825" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30825/hovercard">#30825</a>).</p>
</li>
<li>
<p><code>nn.Softmax</code>: Fixed half-&gt;float case of softmax backward (<a href="https://github.com/pytorch/pytorch/pull/30838" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30838/hovercard">#30838</a>).</p>
</li>
<li>
<p><code>nn.Softshrink</code>: Added check that lambda is no less than zero (<a href="https://github.com/pytorch/pytorch/pull/33201" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33201/hovercard">#33201</a>).</p>
</li>
<li>
<p><code>nn.functional.interpolate</code>: added support for empty batch size input for interpolate. (<a href="https://github.com/pytorch/pytorch/pull/32400" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32400/hovercard">#32400</a>).</p>
</li>
<li>
<p><code>nn.functional.pad</code>: Also return a new tensor instead of sometimes returning a view (<a href="https://github.com/pytorch/pytorch/pull/32350" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32350/hovercard">#32350</a>).</p>
</li>
<li>
<p><code>nn.functional.grid_sample</code>: Fixed gradient computation at image borders (<a href="https://github.com/pytorch/pytorch/pull/32829" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32829/hovercard">#32829</a>).</p>
</li>
<li>
<p><code>nn.functional.leaky_relu_</code>: disabled incorrect leaky_relu_ negative slope backward calculation (<a href="https://github.com/pytorch/pytorch/pull/33639" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33639/hovercard">#33639</a>).</p>
</li>
<li>
<p><code>optim.LambdaLR</code>: removed unintentional side effects (<a href="https://github.com/pytorch/pytorch/pull/32848" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32848/hovercard">#32848</a>).</p>
</li>
<li>
<p><code>optim.Adam</code>, <code>optim.AdamW</code>: Added missing <code>weight_decay</code> parameter validation (<a href="https://github.com/pytorch/pytorch/pull/33126" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33126/hovercard">#33126</a>).</p>
</li>
<li>
<p><code>optim.MultiStepLR</code>: Fix “unbound local variable” error by removing return value for <code>__exit__</code> (<a href="https://github.com/pytorch/pytorch/pull/32997" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32997/hovercard">#32997</a>).</p>
</li>
<li>
<p><code>optim.MultiStepLR</code>: Fixed broken <code>step()</code> method (<a href="https://github.com/pytorch/pytorch/pull/33356" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33356/hovercard">#33356</a>).</p>
</li>
<li>
<p><code>torch.autograd</code>: added new error message if incorrect usage would cause a deadlock (<a href="https://github.com/pytorch/pytorch/pull/32295" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32295/hovercard">#32295</a>).</p>
</li>
<li>
<p><code>torch.autograd</code>: Prohibited copying autograd engines (<a href="https://github.com/pytorch/pytorch/pull/34567" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34567/hovercard">#34567</a>).</p>
</li>
<li>
<p><code>torch.autograd</code>: Fixed incorrect handling of functions that return multiple views (<a href="https://github.com/pytorch/pytorch/pull/32790" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32790/hovercard">#32790</a>).</p>
</li>
<li>
<p><code>autograd.Function</code>: Fixed error if <code>Function</code> returned a view in a <code>torch.no_grad</code> block (<a href="https://github.com/pytorch/pytorch/pull/33896" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33896/hovercard">#33896</a>).</p>
</li>
<li>
<p><code>autograd.Function</code>: Added more error checks for incorrect behavior (<a href="https://github.com/pytorch/pytorch/pull/33069" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33069/hovercard">#33069</a>).</p>
</li>
<li>
<p><code>autograd.Function</code>: Added nice error message if missing overrides (<a href="https://github.com/pytorch/pytorch/pull/33142" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33142/hovercard">#33142</a>).</p>
</li>
<li>
<p><code>autograd.Function</code>: Fixed version check for <code>grad_fn</code> for views (<a href="https://github.com/pytorch/pytorch/pull/34145" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34145/hovercard">#34145</a>).</p>
</li>
<li>
<p><code>autograd.profiler</code>: Fix incorrect chrome trace formatting output for CUDA traces (<a href="https://github.com/pytorch/pytorch/pull/33987" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33987/hovercard">#33987</a>).</p>
</li>
<li>
<p><code>multiprocessing.util.register_after_fork</code>: fixed crash on Windows (<a href="https://github.com/pytorch/pytorch/pull/30809" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30809/hovercard">#30809</a>).</p>
</li>
<li>
<p><code>utils.data.DataLoader</code>: Fixed potential hang when exiting main process (<a href="https://github.com/pytorch/pytorch/pull/33721" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33721/hovercard">#33721</a>).</p>
</li>
<li>
<p><code>utils.tensorboard.SummaryWriter</code> fixed <code>scale_factor</code> calculation for uint8 tensor (<a href="https://github.com/pytorch/pytorch/pull/31778" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31778/hovercard">#31778</a>).</p>
</li>
<li>
<p><code>utils.tensorboard</code> Fix for when PyTorch model trace has RecursiveScriptModules (<a href="https://github.com/pytorch/pytorch/pull/30430" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30430/hovercard">#30430</a>).</p>
</li>
<li>
<p>Fixed <code>CPU_INTEL</code> flag error on Windows (<a href="https://github.com/pytorch/pytorch/pull/30564" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30564/hovercard">#30564</a>).</p>
</li>
<li>
<p>Don't use <code>RTLD_GLOBAL</code> to load <code>_C</code>, resolving a multitude of weird segfaults and crashes<br>
when PyTorch is imported along with other packages (<a href="https://github.com/pytorch/pytorch/pull/31162" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31162/hovercard">#31162</a>).</p>
</li>
<li>
<p>Fixed dll load logic for Python 3.8 on Windows (<a href="https://github.com/pytorch/pytorch/pull/32215" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32215/hovercard">#32215</a>).</p>
</li>
<li>
<p><code>quasirandom.SobolEngine</code>: Fixed crash when default tensor type is CUDA (<a href="https://github.com/pytorch/pytorch/pull/32496" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32496/hovercard">#32496</a>).</p>
</li>
<li>
<p>Fixed error message when converting NumPy array with negative strides to a <code>torch.Tensor</code> (<a href="https://github.com/pytorch/pytorch/pull/33254" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33254/hovercard">#33254</a>).</p>
</li>
<li>
<p>Fixed crash when indexing a <code>torch.Tensor</code> with a single-element array (<a href="https://github.com/pytorch/pytorch/pull/33456" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33456/hovercard">#33456</a>).</p>
</li>
<li>
<p>Fixed crash when converting CUDA tensors and non-strided tensors to NumPy arrays (<a href="https://github.com/pytorch/pytorch/pull/33612" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33612/hovercard">#33612</a>).</p>
</li>
<li>
<p>Prevented crash on exit from static destructor race on Windows (<a href="https://github.com/pytorch/pytorch/pull/33955" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33955/hovercard">#33955</a>).</p>
</li>
<li>
<p>Fixed uncaught <code>std::domain_error</code> on macOS (<a href="https://github.com/pytorch/pytorch/pull/34301" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34301/hovercard">#34301</a>).</p>
</li>
<li>
<p>Dont reset worker affinity when using operators that call into OpenMP (<a href="https://github.com/pytorch/pytorch/pull/29006" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29006/hovercard">#29006</a>).</p>
</li>
<li>
<p><code>torch.backends.mkldnn</code>: changed to be usable without import (<a href="https://github.com/pytorch/pytorch/pull/32055" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32055/hovercard">#32055</a>).</p>
</li>
</ul>
<h1>Performance</h1>
<h2>Mobile</h2>
<ul>
<li>Java Tensor hybrid, owns at::Tensor, no memcopy for java outputs. (<a href="https://github.com/pytorch/pytorch/pull/30501" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30501/hovercard">#30501</a>).</li>
<li>Tensor prep from image in native (<a href="https://github.com/pytorch/pytorch/pull/31426" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31426/hovercard">#31426</a>).</li>
<li>Pass to remove prepacking ops. (<a href="https://github.com/pytorch/pytorch/pull/34319" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34319/hovercard">#34319</a>).</li>
</ul>
<h2>Quantization</h2>
<ul>
<li>Per channel quantization performance improvement (<a href="https://github.com/pytorch/pytorch/pull/33772" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33772/hovercard">#33772</a>).</li>
<li>Speed up per-channel min-max observer (<a href="https://github.com/pytorch/pytorch/pull/34118" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34118/hovercard">#34118</a>).</li>
<li>Vectorized qmul and more methods on qint data types (<a href="https://github.com/pytorch/pytorch/pull/34376" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34376/hovercard">#34376</a>).</li>
</ul>
<h2>RPC</h2>
<ul>
<li>Improve <code>ProcessGroupAgent</code> serialization speed (<a href="https://github.com/pytorch/pytorch/pull/29785" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29785/hovercard">#29785</a>).</li>
<li>Avoid sending large unneeded data over wire in <code>ProcessGroupAgent</code>. (<a href="https://github.com/pytorch/pytorch/pull/31357" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31357/hovercard">#31357</a>).</li>
<li>Integrate async mode for autograd engine with distributed autograd. (<a href="https://github.com/pytorch/pytorch/pull/31508" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31508/hovercard">#31508</a>).</li>
<li>Make handling of <code>FORWARD_AUTOGRAD_REQ</code> in <code>request_callback_impl</code> nonblocking (<a href="https://github.com/pytorch/pytorch/pull/32476" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32476/hovercard">#32476</a>).</li>
</ul>
<h2>Other</h2>
<ul>
<li>Major multithreaded performance regression when doing operator calls resolved (<a href="https://github.com/pytorch/pytorch/pull/30333" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30333/hovercard">#30333</a>)</li>
<li>Improved performance of comparison ops on CUDA (<a href="https://github.com/pytorch/pytorch/pull/29743" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29743/hovercard">#29743</a>).</li>
<li><code>Tensor.view</code> improved performance (<a href="https://github.com/pytorch/pytorch/pull/30554" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30554/hovercard">#30554</a>).</li>
<li>Improved tensor creation overhead (<a href="https://github.com/pytorch/pytorch/pull/30452" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30452/hovercard">#30452</a>, <a href="https://github.com/pytorch/pytorch/pull/30709" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30709/hovercard">#30709</a>)</li>
<li><code>nn.SmoothL1Loss</code>: vectorized gradient computation on CPU. (<a href="https://github.com/pytorch/pytorch/pull/30046" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30046/hovercard">#30046</a>).</li>
<li><code>nn.EmbeddingBag</code>: improved performance on CPU (<a href="https://github.com/pytorch/pytorch/pull/30701" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30701/hovercard">#30701</a>, <a href="https://github.com/pytorch/pytorch/pull/27477" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27477/hovercard">#27477</a>).</li>
<li><code>nn.LayerNorm</code>: optimized with explicit vectorization using Vec256 (<a href="https://github.com/pytorch/pytorch/pull/31127" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31127/hovercard">#31127</a>).</li>
<li><code>Tensor.copy_</code>: fixed kernel speed regression introduced in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="521326231" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/29631" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29631/hovercard" href="https://github.com/pytorch/pytorch/pull/29631">#29631</a> (<a href="https://github.com/pytorch/pytorch/pull/31279" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31279/hovercard">#31279</a>).</li>
<li>Moved a number of debug asserts to not compile in release builds (<a href="https://github.com/pytorch/pytorch/pull/31240" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31240/hovercard">#31240</a>).</li>
<li><code>Tensor::has_names</code> sped up for unnamed tensors (<a href="https://github.com/pytorch/pytorch/pull/31436" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31436/hovercard">#31436</a>).</li>
<li><code>torch.index_select</code>: optimized performance on CPU (<a href="https://github.com/pytorch/pytorch/pull/30598" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30598/hovercard">#30598</a>).</li>
<li><code>nn.Conv{1,2,3}d</code>: Improved performance by refactoring <code>bias</code> handling for cuDNN backend (<a href="https://github.com/pytorch/pytorch/pull/31524" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31524/hovercard">#31524</a>).</li>
<li><code>torch.norm</code>: Optimized case where <code>p = 2</code> (<a href="https://github.com/pytorch/pytorch/pull/31903" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31903/hovercard">#31903</a>).</li>
<li><code>nn.utils.clip_grad_norm_</code>: Refactored the computation for more performance (<a href="https://github.com/pytorch/pytorch/pull/32020" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32020/hovercard">#32020</a>).</li>
<li>Made an assert on a hotpath trigger only in DEBUG mode (<a href="https://github.com/pytorch/pytorch/pull/32117" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32117/hovercard">#32117</a>).</li>
<li>First steps toward TensorIterator unrolling and vectorized load (<a href="https://github.com/pytorch/pytorch/pull/31974" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31974/hovercard">#31974</a>).</li>
<li><code>nn.functional.normalize</code>: changed to use <code>clamp_min_</code> (<a href="https://github.com/pytorch/pytorch/pull/32360" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32360/hovercard">#32360</a>).</li>
<li>Stopped refreshing numel on a stride update (<a href="https://github.com/pytorch/pytorch/pull/32116" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32116/hovercard">#32116</a>).</li>
<li><code>nn.functional.softplus</code>: vectorized operator and gradient computation on CPU (<a href="https://github.com/pytorch/pytorch/pull/32944" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32944/hovercard">#32944</a>).</li>
<li><code>torch.gather</code> regression fixed by not materializing loop vars in error message (<a href="https://github.com/pytorch/pytorch/pull/33108" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33108/hovercard">#33108</a>).</li>
<li><code>nn.ELU</code> forward and backward vectorized on CPU (<a href="https://github.com/pytorch/pytorch/pull/32985" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32985/hovercard">#32985</a>, <a href="https://github.com/pytorch/pytorch/pull/32986" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32986/hovercard">#32986</a>)</li>
<li><code>torch.cat</code>: optimized performance on CPU (<a href="https://github.com/pytorch/pytorch/pull/30806" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30806/hovercard">#30806</a>, <a href="https://github.com/pytorch/pytorch/pull/33534" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33534/hovercard">#33534</a>).</li>
<li><code>torch.conv3d</code>: optimized Unfold3d to improve performance (<a href="https://github.com/pytorch/pytorch/pull/33191" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33191/hovercard">#33191</a>).</li>
<li>Workaround performance bug and memory leak in GOMP for AMD CPUs (<a href="https://github.com/pytorch/pytorch/pull/32875" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32875/hovercard">#32875</a>).</li>
<li>Improved TensorIterator overhead (<a href="https://github.com/pytorch/pytorch/pull/33165" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33165/hovercard">#33165</a>).</li>
<li><code>torch.conv3d</code>: optimized Unfold3dAcc to improve gradient computation performance (<a href="https://github.com/pytorch/pytorch/pull/33317" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33317/hovercard">#33317</a>).</li>
<li><code>torch.roll</code> improved performance (<a href="https://github.com/pytorch/pytorch/pull/33623" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33623/hovercard">#33623</a>).</li>
<li>Bounds checking for functor execution in vectorized/unrolled kernels (<a href="https://github.com/pytorch/pytorch/pull/33642" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33642/hovercard">#33642</a>).</li>
<li><code>nn.EmbeddingBag</code>: improved performance on CUDA (<a href="https://github.com/pytorch/pytorch/pull/33589" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33589/hovercard">#33589</a>).</li>
<li>Remove unnecessary tensor copies while calling operators (<a href="https://github.com/pytorch/pytorch/pull/33732" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33732/hovercard">#33732</a>).</li>
<li>clang intrinsics targeting on Windows (<a href="https://github.com/pytorch/pytorch/pull/33958" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33958/hovercard">#33958</a>).</li>
<li><code>nn.Dropout</code>: added vectorized CUDA implementation (<a href="https://github.com/pytorch/pytorch/pull/33879" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33879/hovercard">#33879</a>).</li>
<li><code>nn.UpSampleNearest{1, 2, 3}d</code> performance on CPU optimized (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="540003476" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/31452" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31452/hovercard" href="https://github.com/pytorch/pytorch/pull/31452">#31452</a>) (<a href="https://github.com/pytorch/pytorch/pull/31452" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31452/hovercard">#31452</a>).</li>
<li>Remove <code>cudaMemcpy</code> on full memory overlap (<a href="https://github.com/pytorch/pytorch/pull/34548" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34548/hovercard">#34548</a>).</li>
<li>CUDA Loops: move address computation into policy, make <code>policy.load</code> load all arguments (<a href="https://github.com/pytorch/pytorch/pull/33720" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33720/hovercard">#33720</a>).</li>
<li><code>nn.BatchNorm{1, 2, 3}d</code> contiguous case's performance improved (<a href="https://github.com/pytorch/pytorch/pull/34530" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34530/hovercard">#34530</a>).</li>
<li>Add the build for runtime dispatch for AVX, AVX2 instruction set (<a href="https://github.com/pytorch/pytorch/pull/26125" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26125/hovercard">#26125</a>).</li>
<li><code>nn.RReLU</code> performance improved up to 5x for inference on CPU (<a href="https://github.com/pytorch/pytorch/pull/31094" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31094/hovercard">#31094</a>).</li>
<li><code>nn.LogSigmoid</code> performance improved up to 10x on CPU (<a href="https://github.com/pytorch/pytorch/pull/30958" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30958/hovercard">#30958</a>).</li>
<li><code>torch.dist</code> performance improved up to 2x (<a href="https://github.com/pytorch/pytorch/pull/29714" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29714/hovercard">#29714</a>).</li>
<li><code>torch.max</code>, <code>torch.min</code> performance improved up to 1.5x on CPU (<a href="https://github.com/pytorch/pytorch/pull/33936" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33936/hovercard">#33936</a>).</li>
<li><code>nn.GLU</code> performance improved up to 1.5X on CPU (<a href="https://github.com/pytorch/pytorch/pull/33179" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33179/hovercard">#33179</a>).</li>
<li><code>nn.LeakyReLU</code> performance improved up to 4x (<a href="https://github.com/pytorch/pytorch/pull/29899" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29899/hovercard">#29899</a>).</li>
<li><code>nn.HardTanh</code> performance improved up to 5x (<a href="https://github.com/pytorch/pytorch/pull/30152" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30152/hovercard">#30152</a>).</li>
</ul>
<h1>Documentation</h1>
<h2>Python</h2>
<ul>
<li>Added documentation for <code>nn.functional.softplus</code> (<a href="https://github.com/pytorch/pytorch/pull/30055" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30055/hovercard">#30055</a>, <a href="https://github.com/pytorch/pytorch/pull/32945" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32945/hovercard">#32945</a>).</li>
<li><code>torch.max</code>: Added warning about different, nondeterministic behavior on CPU and CUDA (<a href="https://github.com/pytorch/pytorch/pull/31115" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31115/hovercard">#31115</a>).</li>
<li>Clarified the documentation for <code>nn.NLLLoss</code> (<a href="https://github.com/pytorch/pytorch/pull/31488" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31488/hovercard">#31488</a>).</li>
<li>Exclude generated source docs from Google search indexing (<a href="https://github.com/pytorch/pytorch/pull/31484" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31484/hovercard">#31484</a>).</li>
<li><code>torch.poisson</code> docstring added to documentation (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="543009293" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/31667" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31667/hovercard" href="https://github.com/pytorch/pytorch/pull/31667">#31667</a>) (<a href="https://github.com/pytorch/pytorch/pull/31667" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31667/hovercard">#31667</a>).</li>
<li><code>torch.eq</code> fixed incorrect examples in documentation (<a href="https://github.com/pytorch/pytorch/pull/32399" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32399/hovercard">#32399</a>).</li>
<li><code>torch.load</code>: added warning regarding pickle insecurity (<a href="https://github.com/pytorch/pytorch/pull/32593" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32593/hovercard">#32593</a>).</li>
<li><code>optim.CosineAnnealingLR</code>: fixed the usage in examples (<a href="https://github.com/pytorch/pytorch/pull/31358" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31358/hovercard">#31358</a>).</li>
<li>Added doc previewing instructions (<a href="https://github.com/pytorch/pytorch/pull/31905" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31905/hovercard">#31905</a>).</li>
<li>Removed legacy <code>.data</code> usages from the <code>torch.nn</code> documentation (<a href="https://github.com/pytorch/pytorch/pull/31481" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31481/hovercard">#31481</a>).</li>
<li>Fixed description of convolution modules (<a href="https://github.com/pytorch/pytorch/pull/30079" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30079/hovercard">#30079</a>).</li>
<li><code>Tensor.t()</code>, <code>Tensor.permute()</code>, <code>Tensor.unfold()</code>, and <code>Tensor.select()</code> clarified to note that they return views (<a href="https://github.com/pytorch/pytorch/pull/32512" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32512/hovercard">#32512</a>).</li>
<li><code>torch.multiprocessing</code> Updated documentation indicating that start_method is ignored for <code>mp.spawn()</code> (<a href="https://github.com/pytorch/pytorch/pull/33070" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33070/hovercard">#33070</a>).</li>
<li>Improved CPU threading documentation (<a href="https://github.com/pytorch/pytorch/pull/33083" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33083/hovercard">#33083</a>).</li>
<li><code>nn.BCELoss</code>: documented how it avoids infinite results (<a href="https://github.com/pytorch/pytorch/pull/33160" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33160/hovercard">#33160</a>).</li>
<li><code>nn.utils.rnn.pack_padded_sequence</code>: Improved the description of <code>enforce_sorted</code> (<a href="https://github.com/pytorch/pytorch/pull/33617" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33617/hovercard">#33617</a>).</li>
<li><code>nn.utils.pad_packed_sequence</code>: doc improvement (<a href="https://github.com/pytorch/pytorch/pull/33768" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33768/hovercard">#33768</a>).</li>
<li><code>nn.LPPool{1,2}d</code> : removed nonexistent parameter (<a href="https://github.com/pytorch/pytorch/pull/33714" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33714/hovercard">#33714</a>).</li>
<li>Created a Tensor View documentation page that documents all PyTorch operations that return views (<a href="https://github.com/pytorch/pytorch/pull/32560" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32560/hovercard">#32560</a>).</li>
<li>Added grad context manager doc to top level torch module. (<a href="https://github.com/pytorch/pytorch/pull/33877" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33877/hovercard">#33877</a>).</li>
<li>Enhanced reproducibility documentation (<a href="https://github.com/pytorch/pytorch/pull/33795" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33795/hovercard">#33795</a>).</li>
<li>Numerous typo fixes (<a href="https://github.com/pytorch/pytorch/pull/30448" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30448/hovercard">#30448</a>, <a href="https://github.com/pytorch/pytorch/pull/30518" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30518/hovercard">#30518</a>, <a href="https://github.com/pytorch/pytorch/pull/30614" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30614/hovercard">#30614</a>, <a href="https://github.com/pytorch/pytorch/pull/30464" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30464/hovercard">#30464</a>, <a href="https://github.com/pytorch/pytorch/pull/30608" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30608/hovercard">#30608</a>, <a href="https://github.com/pytorch/pytorch/pull/24335" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/24335/hovercard">#24335</a>, <a href="https://github.com/pytorch/pytorch/pull/34581" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34581/hovercard">#34581</a>, <a href="https://github.com/pytorch/pytorch/pull/34624" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34624/hovercard">#34624</a>, <a href="https://github.com/pytorch/pytorch/pull/34008" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34008/hovercard">#34008</a>, <a href="https://github.com/pytorch/pytorch/pull/31395" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31395/hovercard">#31395</a>, <a href="https://github.com/pytorch/pytorch/pull/31677" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31677/hovercard">#31677</a>, <a href="https://github.com/pytorch/pytorch/pull/31617" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31617/hovercard">#31617</a>, <a href="https://github.com/pytorch/pytorch/pull/31973" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31973/hovercard">#31973</a>, <a href="https://github.com/pytorch/pytorch/pull/32068" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32068/hovercard">#32068</a>, <a href="https://github.com/pytorch/pytorch/pull/33689" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33689/hovercard">#33689</a>, <a href="https://github.com/pytorch/pytorch/pull/30385" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30385/hovercard">#30385</a>, <a href="https://github.com/pytorch/pytorch/pull/32003" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32003/hovercard">#32003</a>, <a href="https://github.com/pytorch/pytorch/pull/31682" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31682/hovercard">#31682</a>, <a href="https://github.com/pytorch/pytorch/pull/30846" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30846/hovercard">#30846</a>, <a href="https://github.com/pytorch/pytorch/pull/33478" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33478/hovercard">#33478</a>, <a href="https://github.com/pytorch/pytorch/pull/33549" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33549/hovercard">#33549</a>, <a href="https://github.com/pytorch/pytorch/pull/32307" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32307/hovercard">#32307</a>, <a href="https://github.com/pytorch/pytorch/pull/33144" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33144/hovercard">#33144</a>, <a href="https://github.com/pytorch/pytorch/pull/33805" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33805/hovercard">#33805</a>, <a href="https://github.com/pytorch/pytorch/pull/33836" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33836/hovercard">#33836</a>, <a href="https://github.com/pytorch/pytorch/pull/34053" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34053/hovercard">#34053</a>).</li>
<li>Numerous formatting and/or rendering fixes (<a href="https://github.com/pytorch/pytorch/pull/30377" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30377/hovercard">#30377</a>, <a href="https://github.com/pytorch/pytorch/pull/30779" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30779/hovercard">#30779</a>, <a href="https://github.com/pytorch/pytorch/pull/32667" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32667/hovercard">#32667</a>, <a href="https://github.com/pytorch/pytorch/pull/34027" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34027/hovercard">#34027</a>, <a href="https://github.com/pytorch/pytorch/pull/32911" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32911/hovercard">#32911</a>, <a href="https://github.com/pytorch/pytorch/pull/30814" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30814/hovercard">#30814</a>, <a href="https://github.com/pytorch/pytorch/pull/30815" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30815/hovercard">#30815</a>, <a href="https://github.com/pytorch/pytorch/pull/31760" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31760/hovercard">#31760</a>, <a href="https://github.com/pytorch/pytorch/pull/34503" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34503/hovercard">#34503</a>).</li>
</ul>
<h2>C++ API</h2>
<ul>
<li>Fix <code>at::Tensor</code> docs generation and make it accessible again at <a href="https://pytorch.org/cppdocs/api/classat_1_1_tensor.html" rel="nofollow">https://pytorch.org/cppdocs/api/classat_1_1_tensor.html</a> (<a href="https://github.com/pytorch/pytorch/pull/34467" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34467/hovercard">#34467</a>)</li>
<li>Add docs for all <code>torch::nn modules</code> and functionals (<a href="https://github.com/pytorch/pytorch/pull/34522" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34522/hovercard">#34522</a>) (<a href="https://github.com/pytorch/pytorch/pull/34688" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34688/hovercard">#34688</a>) (<a href="https://github.com/pytorch/pytorch/pull/34752" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34752/hovercard">#34752</a>)</li>
<li>Improve C++ autograd and tensor indexing docs (<a href="https://github.com/pytorch/pytorch/pull/35919" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35919/hovercard">#35919</a>)</li>
<li>Fix example in <code>torch::nn::ModuleList</code> docs (<a href="https://github.com/pytorch/pytorch/pull/34463" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34463/hovercard">#34463</a>)</li>
</ul>
<h2>RPC</h2>
<ul>
<li>Reorganize RPC API doc and add introduction (<a href="https://github.com/pytorch/pytorch/pull/30491" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30491/hovercard">#30491</a>, <a href="https://github.com/pytorch/pytorch/pull/35109" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35109/hovercard">#35109</a>).</li>
<li>Make doc source format consistent in <code>rpc/init.cpp</code> (<a href="https://github.com/pytorch/pytorch/pull/30515" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30515/hovercard">#30515</a>).</li>
<li>Add examples to RRef doc (<a href="https://github.com/pytorch/pytorch/pull/30516" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30516/hovercard">#30516</a>).</li>
<li>Add more details to explain <code>rpc_backend_options</code> arg in <code>init_rpc</code> (<a href="https://github.com/pytorch/pytorch/pull/30855" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30855/hovercard">#30855</a>).</li>
<li>Fix examples in API doc (<a href="https://github.com/pytorch/pytorch/pull/30856" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30856/hovercard">#30856</a>).</li>
<li>Fix examples in RRef API doc (<a href="https://github.com/pytorch/pytorch/pull/30857" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30857/hovercard">#30857</a>).</li>
<li>Document WorkerInfo and <code>RpcBackendOptions</code> structures in RPC docs. (<a href="https://github.com/pytorch/pytorch/pull/31077" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31077/hovercard">#31077</a>).</li>
<li>Explain RPC behavior when using Tensor as arg or return value (<a href="https://github.com/pytorch/pytorch/pull/31968" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31968/hovercard">#31968</a>).</li>
<li>Update RPC docs to reflect correct use of dist_autograd backwards and dist_optim <code>step() </code>(<a href="https://github.com/pytorch/pytorch/pull/34670" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34670/hovercard">#34670</a>).</li>
<li>Minor doc tweak to use mp.spawn in example (<a href="https://github.com/pytorch/pytorch/pull/30381" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30381/hovercard">#30381</a>).</li>
<li>Update distributed autograd note (<a href="https://github.com/pytorch/pytorch/pull/34657" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34657/hovercard">#34657</a>).</li>
</ul>
<h2>Mobile</h2>
<ul>
<li>Add info about transitive dependencies in case of using local aars (<a href="https://github.com/pytorch/pytorch/pull/30128" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30128/hovercard">#30128</a>).</li>
<li>Update Docs for building PyTorch for Android. (<a href="https://github.com/pytorch/pytorch/pull/32578" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32578/hovercard">#32578</a>).</li>
<li>Javadoc changes (<a href="https://github.com/pytorch/pytorch/pull/31956" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31956/hovercard">#31956</a>).</li>
</ul>
<h2>Quantization</h2>
<ul>
<li>Updates to quantization documentation (<a href="https://github.com/pytorch/pytorch/pull/30288" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30288/hovercard">#30288</a>).</li>
<li>Fix docs so that the example works (<a href="https://github.com/pytorch/pytorch/pull/30120" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30120/hovercard">#30120</a>).</li>
<li>Add the explicit per-tensor/per-channel quant info when we print the module (<a href="https://github.com/pytorch/pytorch/pull/30591" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30591/hovercard">#30591</a>).</li>
<li>Fixed typos in quantization docs / docstrings (<a href="https://github.com/pytorch/pytorch/pull/34182" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34182/hovercard">#34182</a>).</li>
<li>Docs entry for the <code>is_quantized</code> (<a href="https://github.com/pytorch/pytorch/pull/32075" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32075/hovercard">#32075</a>).</li>
</ul>
<h1>Deprecations</h1>
<h2>Python</h2>
<h3>How to figure out which line in your code is raising a warning</h3>
<p>Attempting to use deprecated behavior will raise warnings.
Unfortunately, sometimes it is not entirely obvious what line of code
the warning corresponds to, especially if the the warning comes from our
C++ backend. For example, with a file named <code>foo.py</code> with the following contents,</p>
<pre><code>import torch
# This is newly deprecated behavior, see the next section
torch.tensor(1) / torch.tensor(2)
</code></pre>
<p>running it doesnt give us the location of the warning:</p>
<pre><code>&gt; python foo.py
../aten/src/ATen/native/BinaryOps.cpp:81: UserWarning: Integer division of tensors using div or / is deprecated, and in a future release div will perform true
division as in Python 3. Use true_divide or floor_divide (// in Python) instead.
</code></pre>
<p>We can use the <code>warnings</code> module to tell us where the warning is by asking it to treat warnings as errors:</p>
<pre><code>import torch
import warnings
warnings.filterwarnings('error', message='Integer division')
# This is newly deprecated behavior, see the next section
torch.tensor(1) / torch.tensor(2)
</code></pre>
<p>Running the file now tells us exactly where the warning is:</p>
<pre><code>&gt; python foo.py
Traceback (most recent call last):
File "foo.py", line 5, in &lt;module&gt;
torch.tensor(1) / torch.tensor(2)
UserWarning: Integer division of tensors using div or / is deprecated, and in a future release div will perform true division as in Python 3. Use true_divide
or floor_divide (// in Python) instead.
</code></pre>
<h3>Deprecated <code>torch.div</code> and <code>torch.addcdiv</code> integer floor division behavior (<a href="https://github.com/pytorch/pytorch/pull/34570" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34570/hovercard">#34570</a>)</h3>
<p>In 1.5.0 and older PyTorch releases <code>torch.div</code> and the <code>/</code> operator perform integer floor division. In a future PyTorch release, torch.div (including the <code>/</code> operator) will perform "true" division as in Python3 and NumPy.</p>
<p>To floor divide integer tensors, please use <code>torch.floor_divide</code> instead.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Before</th><th>After</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">3</span>) <span class="pl-c1">/</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">2</span>)
..<span class="pl-c1">/</span><span class="pl-s1">aten</span><span class="pl-c1">/</span><span class="pl-s1">src</span><span class="pl-c1">/</span><span class="pl-v">ATen</span><span class="pl-c1">/</span><span class="pl-s1">native</span><span class="pl-c1">/</span><span class="pl-v">BinaryOps</span>.<span class="pl-s1">cpp</span>:<span class="pl-c1">81</span>: <span class="pl-v">UserWarning</span>: <span class="pl-v">Integer</span> <span class="pl-s1">division</span> <span class="pl-s1">of</span> <span class="pl-s1">tensors</span> <span class="pl-s1">using</span> <span class="pl-s1">div</span> <span class="pl-c1">or</span><span class="pl-s1"></span> <span class="pl-c1">/</span> <span class="pl-s1">is</span> <span class="pl-s1">deprecated</span>, <span class="pl-s1">and</span> <span class="pl-c1">in</span> <span class="pl-s1">a</span> <span class="pl-s1">future</span> <span class="pl-s1">release</span> <span class="pl-s1">div</span> <span class="pl-s1">will</span> <span class="pl-s1">perform</span> <span class="pl-s1">true</span> <span class="pl-s1">division</span> <span class="pl-k">as</span> <span class="pl-c1">in</span> <span class="pl-v">Python</span> <span class="pl-c1">3.</span> <span class="pl-v">Use</span> <span class="pl-s1">true_divide</span> <span class="pl-c1">or</span> <span class="pl-s1">floor_divide</span> (<span class="pl-c1">//</span> <span class="pl-s1">in</span> <span class="pl-v">Python</span>) <span class="pl-s1">instead</span>.
<span class="pl-en">tensor</span>(<span class="pl-c1">1</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-v">NB</span>: <span class="pl-s1">the</span> <span class="pl-s1">following</span> <span class="pl-c1">is</span> <span class="pl-s1">equivalent</span> <span class="pl-s1">to</span> `<span class="pl-s1">torch</span>.<span class="pl-en">floor_divide</span>(<span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">3</span>), <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">2</span>))
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">3</span>) <span class="pl-c1">//</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">2</span>)
<span class="pl-en">tensor</span>(<span class="pl-c1">1</span>)
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<p>The fix for <code>torch.addcdiv</code> is similar.</p>
<p align="center">
</p><table align="center">
<tbody><tr><th>Before</th><th>After</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">0</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">1</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">other</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">3</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">addcdiv</span>(<span class="pl-s1">input</span>, <span class="pl-s1">tensor</span>, <span class="pl-s1">other</span>, <span class="pl-s1">value</span><span class="pl-c1">=</span><span class="pl-s1">value</span>)
..<span class="pl-c1">/</span><span class="pl-s1">aten</span><span class="pl-c1">/</span><span class="pl-s1">src</span><span class="pl-c1">/</span><span class="pl-v">ATen</span><span class="pl-c1">/</span><span class="pl-s1">native</span><span class="pl-c1">/</span><span class="pl-v">PointwiseOps</span>.<span class="pl-s1">cpp</span>:<span class="pl-c1">81</span>: <span class="pl-v">UserWarning</span>: <span class="pl-v">Integer</span> <span class="pl-s1">division</span> <span class="pl-k">with</span> <span class="pl-s1">addcdiv</span> <span class="pl-c1">is</span> <span class="pl-s1">deprecated</span>, <span class="pl-s1">and</span> <span class="pl-c1">in</span> <span class="pl-s1">a</span> <span class="pl-s1">future</span> <span class="pl-s1">release</span> <span class="pl-s1">addcdiv</span> <span class="pl-s1">will</span> <span class="pl-s1">perform</span> <span class="pl-s1">a</span> <span class="pl-s1">true</span> <span class="pl-s1">division</span> <span class="pl-s1">of</span> <span class="pl-s1">tensor1</span> <span class="pl-c1">and</span> <span class="pl-s1">tensor2</span>. <span class="pl-v">The</span> <span class="pl-s1">current</span> <span class="pl-s1">addcdiv</span> <span class="pl-s1">behavior</span> <span class="pl-s1">can</span> <span class="pl-s1">be</span> <span class="pl-s1">replicated</span> <span class="pl-s1">using</span> <span class="pl-s1">floor_divide</span> <span class="pl-k">for</span> <span class="pl-s1">integral</span> <span class="pl-en">inputs</span> (<span class="pl-s1">self</span> <span class="pl-c1">+</span> <span class="pl-s1">value</span> <span class="pl-c1">*</span> <span class="pl-s1">tensor1</span> <span class="pl-c1">//</span> <span class="pl-s1">tensor2</span>) <span class="pl-c1">and</span> <span class="pl-en">division</span> <span class="pl-k">for</span> <span class="pl-s1">float</span> <span class="pl-s1">inputs</span> (<span class="pl-s1">self</span> <span class="pl-c1">+</span> <span class="pl-s1">value</span> <span class="pl-c1">*</span> <span class="pl-s1">tensor1</span> <span class="pl-c1">/</span> <span class="pl-s1">tensor2</span>). <span class="pl-v">The</span> <span class="pl-s1">new</span> <span class="pl-s1">addcdiv</span> <span class="pl-s1">behavior</span> <span class="pl-s1">can</span> <span class="pl-s1">be</span> <span class="pl-s1">implemented</span> <span class="pl-k">with</span> <span class="pl-s1">true_divide</span> (<span class="pl-s1">self</span> <span class="pl-c1">+</span> <span class="pl-s1">value</span> <span class="pl-c1">*</span> <span class="pl-s1">torch</span>.<span class="pl-en">true_divide</span>(<span class="pl-s1">tensor1</span>, <span class="pl-s1">tensor2</span>).
<span class="pl-en">tensor</span>(<span class="pl-c1">0</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">0</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">1</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">other</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">3</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> (<span class="pl-s1">input</span> <span class="pl-c1">+</span> <span class="pl-s1">torch</span>.<span class="pl-en">floor_divide</span>(<span class="pl-s1">value</span> <span class="pl-c1">*</span> <span class="pl-s1">tensor</span>, <span class="pl-s1">other</span>))
<span class="pl-en">tensor</span>(<span class="pl-c1">0</span>)
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3>Deprecated <code>torch.full</code> returning float tensors if no dtype is specified (<a href="https://github.com/pytorch/pytorch/pull/34709" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/34709/hovercard">#34709</a>).</h3>
<p>In a future PyTorch release, <code>torch.full</code> will infer its
dtype from its fill value when the optional dtype and out parameters are
unspecified, matching NumPy's inference for <code>numpy.full</code>. For example, <code>torch.full(size, 1)</code> will return a tensor of <code>torch.long</code> dtype, unlike today where it returns a tensor of <code>torch.float</code> dtype.</p>
<h3>Deprecated <code>torch.nn.modules.conv._ConvTransposeMixin</code> (<a href="https://github.com/pytorch/pytorch/pull/31784" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31784/hovercard">#31784</a>).</h3>
<p>This is an internal-facing class that is not a part of our public
API. Weve refactored some PyTorch internals to work without it and will
remove it in a future release.</p>
<h3>Deprecated positional args in multiple <code>torch</code> function signatures (<a href="https://github.com/pytorch/pytorch/pull/32009" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32009/hovercard">#32009</a>, <a href="https://github.com/pytorch/pytorch/pull/33428" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33428/hovercard">#33428</a>)</h3>
<p>Below please find a list of deprecated signatures and what to change them to.</p>
<ul>
<li><code>torch.add(self: Tensor, alpha: Scalar, other: Tensor)</code>, <code>torch.sub(self: Tensor, alpha: Scalar, other: Tensor)</code> please use <code>alpha</code> as a keyword-only arg instead of positional args</li>
<li><code>torch.addbmm(beta: Scalar, self: Tensor, alpha: Scalar, batch1: Tensor, batch2: Tensor)</code>: please use <code>alpha</code> and <code>beta</code> as keyword only args instead of positional args.</li>
<li><code>torch.addcdiv(self: Tensor, value: Scalar, tensor1: Tensor, tensor2: Tensor)</code>, <code>torch.addmdiv(self: Tensor, value: Scalar, tensor1: Tensor, tensor2: Tensor)</code>: please use <code>value</code> as a keyword-only arg</li>
<li><code>torch.addmm(beta: Scalar, self: Tensor, alpha: Scalar, mat1: Tensor, mat2: Tensor)</code>, <code>torch.sspaddmm(beta: Scalar, self: Tensor, alpha: Scalar, mat1: Tensor, mat2: Tensor)</code> please use <code>alpha</code> and <code>beta</code> as keyword only args instead of positional args.</li>
<li><code>torch.addmv(beta: Scalar, self: Tensor, alpha: Scalar, mat: Tensor, vec: Tensor)</code>: please use <code>alpha</code> and <code>beta</code> as keyword only args instead of positional args.</li>
<li><code>torch.addr(beta: Scalar, self: Tensor, alpha: Scalar, vec1: Tensor, vec2: Scalar)</code>: please use <code>alpha</code> and <code>beta</code> as keyword only args instead of positional args.</li>
<li><code>torch.baddbmm(beta: Scalar, self: Tensor, alpha: Scalar, batch1: Tensor, batch2: Tensor)</code>: please use <code>alpha</code> and <code>beta</code> as keyword only args instead of positional args.</li>
</ul>
<p align="center">
</p><table align="center">
<tbody><tr><th>Before</th><th>After</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">2</span>,<span class="pl-c1">3</span>).<span class="pl-en">add</span>(<span class="pl-c1">2</span>, <span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">2</span>, <span class="pl-c1">3</span>))
..<span class="pl-c1">/</span><span class="pl-s1">torch</span><span class="pl-c1">/</span><span class="pl-s1">csrc</span><span class="pl-c1">/</span><span class="pl-s1">utils</span><span class="pl-c1">/</span><span class="pl-s1">python_arg_parser</span>.<span class="pl-s1">cpp</span>:<span class="pl-c1">750</span>: <span class="pl-v">UserWarning</span>: <span class="pl-v">This</span> <span class="pl-s1">overload</span> <span class="pl-s1">of</span> <span class="pl-s1">add</span> <span class="pl-c1">is</span> <span class="pl-s1">deprecated</span>:
<span class="pl-en">add</span>(<span class="pl-v">Number</span> <span class="pl-s1">alpha</span>, <span class="pl-v">Tensor</span> <span class="pl-s1">other</span>)
<span class="pl-v">Consider</span> <span class="pl-s1">using</span> <span class="pl-s1">one</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-s1">following</span> <span class="pl-s1">signatures</span> <span class="pl-s1">instead</span>:
<span class="pl-en">add</span>(<span class="pl-v">Tensor</span> <span class="pl-s1">other</span>, <span class="pl-v">Number</span> <span class="pl-s1">alpha</span>)
<span class="pl-en">tensor</span>([[<span class="pl-c1">2.</span>, <span class="pl-c1">2.</span>, <span class="pl-c1">2.</span>],
[<span class="pl-c1">2.</span>, <span class="pl-c1">2.</span>, <span class="pl-c1">2.</span>]])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">zeros</span>(<span class="pl-c1">2</span>, <span class="pl-c1">3</span>).<span class="pl-en">add</span>(<span class="pl-s1">torch</span>.<span class="pl-en">ones</span>(<span class="pl-c1">2</span>, <span class="pl-c1">3</span>), <span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-c1">2</span>)
<span class="pl-en">tensor</span>([[<span class="pl-c1">2.</span>, <span class="pl-c1">2.</span>, <span class="pl-c1">2.</span>],
[<span class="pl-c1">2.</span>, <span class="pl-c1">2.</span>, <span class="pl-c1">2.</span>]])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3>Deprecate modifying in-place a view that returned by a custom autograd Function (<a href="https://github.com/pytorch/pytorch/pull/32839" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32839/hovercard">#32839</a>).</h3>
<p>Modifying in-place a view that was created by a custom Function leads
to the custom backward not being called or being called with a partial
gradient. This behavior will be removed in 1.6.</p>
<p>Please clone() the output of the Function to avoid incorrect gradient computation.</p>
<pre><code>class Id(Function):
@staticmethod
def forward(ctx, input):
return input.view_as(input)
@staticmethod
def backward(ctx, grad_input):
return grad_input
</code></pre>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.5.0</th><th>Version 1.5.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>, <span class="pl-s1">requires_grad</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">other</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-v">Id</span>.<span class="pl-en">apply</span>(<span class="pl-s1">input</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span>.<span class="pl-en">copy_</span>(<span class="pl-s1">other</span>)
<span class="pl-c"># Warning: Incorrect gradients</span>
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">input</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>, <span class="pl-s1">requires_grad</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">other</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>)
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-v">Id</span>.<span class="pl-en">apply</span>(<span class="pl-s1">input</span>).<span class="pl-en">clone</span>()
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">output</span>.<span class="pl-en">copy_</span>(<span class="pl-s1">other</span>)
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3>Deprecate modifying in-place a view created inside a no_grad block (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="557743694" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/32839" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/32839/hovercard" href="https://github.com/pytorch/pytorch/pull/32839">#32839</a>)</h3>
<p>Modifying in-place a view created inside a no_grad block is ambiguous and error-prone so we have deprecated it.</p>
<p>Here is an example of some code that weve deprecated. In previous
versions of PyTorch, the following code throws a non-descriptive error
message, but we've added a deprecation in 1.5.0.</p>
<pre><code>&gt;&gt;&gt; base = torch.rand(10, requires_grad=True)
&gt;&gt;&gt; var = torch.rand([], requires_grad=True)
&gt;&gt;&gt; with torch.no_grad():
&gt;&gt;&gt; view = base[1]
&gt;&gt;&gt; view.copy_(var)
&gt;&gt;&gt; torch.autograd.grad(base.sum(), var)
RuntimeError: A view was created in no_grad mode and is being modified inplace with grad mode enabled. Given that this use case is ambiguous and error-prone,
it is deprecated and will be forbidden starting 1.6 (see https://github.com/pytorch/pytorch/pull/32839 for more details about this). You can clarify your code and remove this warning by moving both the view and the inplace either both inside the no_grad block (if you don't want the inplace to be tracked) or both outside (if you want the inplace to be tracked).
</code></pre>
<p>If you want to differentiate, you should change the above code to</p>
<pre><code>&gt;&gt;&gt; base = torch.rand(10, requires_grad=True)
&gt;&gt;&gt; var = torch.rand([], requires_grad=True)
&gt;&gt;&gt; view = base[1]
&gt;&gt;&gt; view.copy_(var)
&gt;&gt;&gt; torch.autograd.grad(base.sum(), var)
(tensor(1.),)
</code></pre>
<p>If you dont want to differentiate, you should change it to</p>
<pre><code>&gt;&gt;&gt; base = torch.rand(10, requires_grad=True)
&gt;&gt;&gt; var = torch.rand([], requires_grad=True)
&gt;&gt;&gt; with torch.no_grad():
&gt;&gt;&gt; view = base[1]
&gt;&gt;&gt; view.copy_(var)
</code></pre>
<h2>C++ API</h2>
<h3>Deprecated <code>Tensor.type()</code> <a href="https://github.com/pytorch/pytorch/pull/30281" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30281/hovercard">(#30281</a>)</h3>
<p>Please use <code>Tensor.options()</code> instead.</p>
<h1>Miscellaneous</h1>
<ul>
<li>Part of an automated mixed-precision solution (<a href="https://github.com/pytorch/pytorch/pull/33366" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33366/hovercard">#33366</a>, <a href="https://github.com/pytorch/pytorch/pull/33832" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/33832/hovercard">#33832</a>).</li>
</ul>
</div>
<details class="details-reset Details-element border-top pt-3 mt-4 mb-2 mb-md-4">
<summary>
<div class="d-flex flex-items-center">
<span class="mr-2 Details-content--closed"><svg class="octicon octicon-triangle-right" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.427 4.427l3.396 3.396a.25.25 0 010 .354l-3.396 3.396A.25.25 0 016 11.396V4.604a.25.25 0 01.427-.177z"></path></svg></span>
<span class="mr-2 Details-content--open"><svg class="octicon octicon-triangle-down" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z"></path></svg></span>
<span class="text-bold">Assets</span>
<span class="ml-1 Counter">2</span>
</div>
</summary>
<div class="Box Box--condensed mt-3">
<div>
<div class="d-block py-1 py-md-2 Box-body px-2">
<a href="https://github.com/pytorch/pytorch/archive/v1.5.0.zip" rel="nofollow" class="d-flex flex-items-center">
<svg class="octicon octicon-file-zip flex-shrink-0 text-gray" width="16" height="16" viewBox="0 0 16 16" version="1.1" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
<span class="px-1 text-bold">Source code</span> (zip)
</a>
</div>
<div class="d-block py-1 py-md-2 Box-body px-2">
<a href="https://github.com/pytorch/pytorch/archive/v1.5.0.tar.gz" rel="nofollow" class="d-flex flex-items-center">
<svg class="octicon octicon-file-zip flex-shrink-0 text-gray" width="16" height="16" viewBox="0 0 16 16" version="1.1" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
<span class="px-1 text-bold">Source code</span> (tar.gz)
</a>
</div>
</div>
</div>
</details>
</div><!-- /.release-body -->
</div><!-- /.release -->
</div>
<div class="release-timeline-tags is-collapsed release-entry js-timeline-tags">
<div class="release-entry">
<div class="d-flex clearfix">
<span class="d-none flex-self-center float-left d-md-block col-md-3 col-lg-2 p-3 text-gray text-md-right pl-0 position-relative tag-timeline-date">
<relative-time datetime="2020-04-20T23:59:38Z" class="no-wrap" title="Apr 21, 2020, 1:59 AM GMT+2">on Apr 21</relative-time>
<svg class="octicon octicon-tag pl-1 text-gray-light" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
</span>
<div class="float-left col-12 col-md-9 col-lg-10 px-md-3 py-3 position-relative release-main-section main">
<div class="commit js-details-container Details">
<div class="d-flex">
<h4 class="flex-auto min-width-0 pr-2 pb-1 commit-title">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.5.0-rc5">
<svg class="octicon octicon-tag d-md-none text-gray mr-1" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
v1.5.0-rc5
</a>
<span class="hidden-text-expander inline"><button type="button" aria-expanded="false" class="ellipsis-expander js-details-target" aria-label="Toggle commit message"></button></span>
</h4>
</div>
<div class="commit-desc">
<pre class="text-small text-gray">[v.1.5.0] Ensure linearIndex of advanced indexing backwards is contig… (
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="603586052" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36962" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36962/hovercard" href="https://github.com/pytorch/pytorch/pull/36962">#36962</a>)
* [v.1.5.0] Ensure linearIndex of advanced indexing backwards is contiguous.
This is a more straightforward solution to the problem than <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="603580389" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36957" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36957/hovercard" href="https://github.com/pytorch/pytorch/pull/36957">#36957</a>; I don't know about the relative performance.
<span class="issue-keyword tooltipped tooltipped-se" aria-label="This commit closes issue #36956.">Fixes</span>: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="603574402" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36956" data-hovercard-type="issue" data-hovercard-url="/pytorch/pytorch/issues/36956/hovercard" href="https://github.com/pytorch/pytorch/issues/36956">#36956</a>
ghstack-source-id: 43c48eaee7232cd3ed2b108edbbee24c11e8321a
Pull Request <span class="issue-keyword tooltipped tooltipped-se" aria-label="This commit closes pull request #36959.">resolved</span>: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="603581667" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36959" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36959/hovercard" href="https://github.com/pytorch/pytorch/pull/36959">#36959</a>
* Fix test.</pre>
</div>
<ul class="list-style-none f6">
<li class="d-inline-block d-md-none mt-1 mr-2 text-gray">
<svg class="octicon octicon-clock" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z"></path></svg>
<relative-time datetime="2020-04-20T23:59:38Z" class="no-wrap" title="Apr 21, 2020, 1:59 AM GMT+2">on Apr 21</relative-time>
</li>
<li class="d-inline-block mt-1 mr-2 text-mono">
<a class="muted-link" href="https://github.com/pytorch/pytorch/commit/4ff3872a2099993bf7e8c588f7182f3df777205b">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
4ff3872
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc5.zip" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
zip
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc5.tar.gz" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
tar.gz
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="release-entry position-relative d-none expander">
<div class="clearfix">
<div class="d-none d-md-block float-left col-12 col-md-3 col-lg-2 text-gray text-right py-3 pr-3 pl-0 position-relative"><relative-time datetime="2020-04-18T00:00:53Z" class="no-wrap" title="Apr 18, 2020, 2:00 AM GMT+2">on Apr 18</relative-time></div>
<span class="col-12 col-md-9 col-lg-10 float-left px-md-3 py-3 position-relative js-timeline-tags-expander release-main-section main">
<span class="d-none d-md-inline hidden-text-expander position-absolute" style="cursor: pointer; top: 14px; left: -12px; z-index: 10">
<button type="button" class="ellipsis-expander" aria-expanded="false"></button>
</span>
<span class="text-bold muted-link" style="cursor: pointer">Show 4 other tags</span>
</span>
</div>
</div>
<div class="release-entry collapsable">
<div class="d-flex clearfix">
<span class="d-none flex-self-center float-left d-md-block col-md-3 col-lg-2 p-3 text-gray text-md-right pl-0 position-relative tag-timeline-date">
<relative-time datetime="2020-04-18T00:00:53Z" class="no-wrap" title="Apr 18, 2020, 2:00 AM GMT+2">on Apr 18</relative-time>
<svg class="octicon octicon-tag pl-1 text-gray-light" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
</span>
<div class="float-left col-12 col-md-9 col-lg-10 px-md-3 py-3 position-relative release-main-section main">
<div class="commit js-details-container Details">
<div class="d-flex">
<h4 class="flex-auto min-width-0 pr-2 pb-1 commit-title">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.5.0-rc4">
<svg class="octicon octicon-tag d-md-none text-gray mr-1" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
v1.5.0-rc4
</a>
<span class="hidden-text-expander inline"><button type="button" aria-expanded="false" class="ellipsis-expander js-details-target" aria-label="Toggle commit message"></button></span>
</h4>
</div>
<div class="commit-desc">
<pre class="text-small text-gray">make simple executor the default for OSS
</pre>
</div>
<ul class="list-style-none f6">
<li class="d-inline-block d-md-none mt-1 mr-2 text-gray">
<svg class="octicon octicon-clock" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z"></path></svg>
<relative-time datetime="2020-04-18T00:00:53Z" class="no-wrap" title="Apr 18, 2020, 2:00 AM GMT+2">on Apr 18</relative-time>
</li>
<li class="d-inline-block mt-1 mr-2 text-mono">
<a class="muted-link" href="https://github.com/pytorch/pytorch/commit/9a51e477acb54563a5c3aef9c557d22f7bc112ee">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
9a51e47
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc4.zip" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
zip
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc4.tar.gz" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
tar.gz
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="release-entry collapsable">
<div class="d-flex clearfix">
<span class="d-none flex-self-center float-left d-md-block col-md-3 col-lg-2 p-3 text-gray text-md-right pl-0 position-relative tag-timeline-date">
<relative-time datetime="2020-04-09T21:08:57Z" class="no-wrap" title="Apr 9, 2020, 11:08 PM GMT+2">on Apr 9</relative-time>
<svg class="octicon octicon-tag pl-1 text-gray-light" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
</span>
<div class="float-left col-12 col-md-9 col-lg-10 px-md-3 py-3 position-relative release-main-section main">
<div class="commit js-details-container Details">
<div class="d-flex">
<h4 class="flex-auto min-width-0 pr-2 pb-1 commit-title">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.5.0-rc3">
<svg class="octicon octicon-tag d-md-none text-gray mr-1" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
v1.5.0-rc3
</a>
<span class="hidden-text-expander inline"><button type="button" aria-expanded="false" class="ellipsis-expander js-details-target" aria-label="Toggle commit message"></button></span>
</h4>
</div>
<div class="commit-desc">
<pre class="text-small text-gray">Use counter instead of vector of futures in `_parallel_run` (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="596095120" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36159" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36159/hovercard" href="https://github.com/pytorch/pytorch/pull/36159">#36159</a>) (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="597512650" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36334" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36334/hovercard" href="https://github.com/pytorch/pytorch/pull/36334">#…</a>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="597512650" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36334" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36334/hovercard" href="https://github.com/pytorch/pytorch/pull/36334">…36334</a>)
Summary:
This should be faster than allocating one mutex, flag and conditional variable per task.
Using `std::atomic&lt;size_t&gt;` to count remaing tasks is not sufficient,
because modification of remaining counter and signalling conditional variable must happen atomically,
otherwise `wait()` might get invoked after `notify_one()` was called.
Pull Request <span class="issue-keyword tooltipped tooltipped-se" aria-label="This commit closes pull request #36159.">resolved</span>: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="596095120" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/36159" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/36159/hovercard" href="https://github.com/pytorch/pytorch/pull/36159">#36159</a>
Test Plan: CI
Differential Revision: D20905411
Pulled By: malfet
fbshipit-source-id: facaf599693649c3f43edafc49f369e90d2f60de
(cherry picked from commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pytorch/pytorch/commit/986a8fdd6a18d9110f8bde59361967139450966b/hovercard" href="https://github.com/pytorch/pytorch/commit/986a8fdd6a18d9110f8bde59361967139450966b"><tt>986a8fd</tt></a>)
Signed-off-by: Eli Uriegas &lt;eliuriegas@fb.com&gt;
Co-authored-by: Nikita Shulga &lt;nshulga@fb.com&gt;</pre>
</div>
<ul class="list-style-none f6">
<li class="d-inline-block d-md-none mt-1 mr-2 text-gray">
<svg class="octicon octicon-clock" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z"></path></svg>
<relative-time datetime="2020-04-09T21:08:57Z" class="no-wrap" title="Apr 9, 2020, 11:08 PM GMT+2">on Apr 9</relative-time>
</li>
<li class="d-inline-block mt-1 mr-2 text-mono">
<a class="muted-link" href="https://github.com/pytorch/pytorch/commit/b58f89b2e4b4a6dc9fbc0c00e608de0f4db52267">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
b58f89b
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc3.zip" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
zip
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc3.tar.gz" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
tar.gz
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="release-entry collapsable">
<div class="d-flex clearfix">
<span class="d-none flex-self-center float-left d-md-block col-md-3 col-lg-2 p-3 text-gray text-md-right pl-0 position-relative tag-timeline-date">
<relative-time datetime="2020-03-28T00:44:03Z" class="no-wrap" title="Mar 28, 2020, 1:44 AM GMT+1">on Mar 28</relative-time>
<svg class="octicon octicon-tag pl-1 text-gray-light" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
</span>
<div class="float-left col-12 col-md-9 col-lg-10 px-md-3 py-3 position-relative release-main-section main">
<div class="commit js-details-container Details">
<div class="d-flex">
<h4 class="flex-auto min-width-0 pr-2 pb-1 commit-title">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.5.0-rc2">
<svg class="octicon octicon-tag d-md-none text-gray mr-1" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
v1.5.0-rc2
</a>
<span class="hidden-text-expander inline"><button type="button" aria-expanded="false" class="ellipsis-expander js-details-target" aria-label="Toggle commit message"></button></span>
</h4>
</div>
<div class="commit-desc">
<pre class="text-small text-gray">Revert "Fix handling of non-finite values in topk (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="586545606" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/35253" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35253/hovercard" href="https://github.com/pytorch/pytorch/pull/35253">#35253</a>)" (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="589449999" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/35582" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/35582/hovercard" href="https://github.com/pytorch/pytorch/pull/35582">#35582</a>)
This reverts commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/pytorch/pytorch/commit/b12579da5398ff23b421332e21e18dc619a0b960/hovercard" href="https://github.com/pytorch/pytorch/commit/b12579da5398ff23b421332e21e18dc619a0b960"><tt>b12579d</tt></a>.
This patch in-and-of itself looks fine, but it's causing some AMP tests to fail.</pre>
</div>
<ul class="list-style-none f6">
<li class="d-inline-block d-md-none mt-1 mr-2 text-gray">
<svg class="octicon octicon-clock" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z"></path></svg>
<relative-time datetime="2020-03-28T00:44:03Z" class="no-wrap" title="Mar 28, 2020, 1:44 AM GMT+1">on Mar 28</relative-time>
</li>
<li class="d-inline-block mt-1 mr-2 text-mono">
<a class="muted-link" href="https://github.com/pytorch/pytorch/commit/dacdbc22d195f80e0b529b4e9111c8ca9a172914">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
dacdbc2
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc2.zip" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
zip
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc2.tar.gz" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
tar.gz
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="release-entry collapsable">
<div class="d-flex clearfix">
<span class="d-none flex-self-center float-left d-md-block col-md-3 col-lg-2 p-3 text-gray text-md-right pl-0 position-relative tag-timeline-date">
<relative-time datetime="2020-03-23T18:05:29Z" class="no-wrap" title="Mar 23, 2020, 7:05 PM GMT+1">on Mar 23</relative-time>
<svg class="octicon octicon-tag pl-1 text-gray-light" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
</span>
<div class="float-left col-12 col-md-9 col-lg-10 px-md-3 py-3 position-relative release-main-section main">
<div class="commit js-details-container Details">
<div class="d-flex">
<h4 class="flex-auto min-width-0 pr-2 pb-1 commit-title">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.4.1">
<svg class="octicon octicon-tag d-md-none text-gray mr-1" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
v1.4.1
</a>
<span class="hidden-text-expander inline"><button type="button" aria-expanded="false" class="ellipsis-expander js-details-target" aria-label="Toggle commit message"></button></span>
</h4>
</div>
<div class="commit-desc">
<pre class="text-small text-gray">Updating fbgemm
</pre>
</div>
<ul class="list-style-none f6">
<li class="d-inline-block d-md-none mt-1 mr-2 text-gray">
<svg class="octicon octicon-clock" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z"></path></svg>
<relative-time datetime="2020-03-23T18:05:29Z" class="no-wrap" title="Mar 23, 2020, 7:05 PM GMT+1">on Mar 23</relative-time>
</li>
<li class="d-inline-block mt-1 mr-2 text-mono">
<a class="muted-link" href="https://github.com/pytorch/pytorch/commit/74044638f755cd8667bedc73da4dbda4aa64c948">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
7404463
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.4.1.zip" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
zip
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.4.1.tar.gz" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
tar.gz
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="release-entry ">
<div class="d-flex clearfix">
<span class="d-none flex-self-center float-left d-md-block col-md-3 col-lg-2 p-3 text-gray text-md-right pl-0 position-relative tag-timeline-date">
<relative-time datetime="2020-03-19T22:39:31Z" class="no-wrap" title="Mar 19, 2020, 11:39 PM GMT+1">on Mar 19</relative-time>
<svg class="octicon octicon-tag pl-1 text-gray-light" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
</span>
<div class="float-left col-12 col-md-9 col-lg-10 px-md-3 py-3 position-relative release-main-section main">
<div class="commit js-details-container Details">
<div class="d-flex">
<h4 class="flex-auto min-width-0 pr-2 pb-1 commit-title">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.5.0-rc1">
<svg class="octicon octicon-tag d-md-none text-gray mr-1" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
v1.5.0-rc1
</a>
<span class="hidden-text-expander inline"><button type="button" aria-expanded="false" class="ellipsis-expander js-details-target" aria-label="Toggle commit message"></button></span>
</h4>
</div>
<div class="commit-desc">
<pre class="text-small text-gray">.circleci: Remove quotes from --git-dir
git doesn't handle the escapes correctly so let's just not put them
altogether.
Signed-off-by: Eli Uriegas &lt;eliuriegas@fb.com&gt;</pre>
</div>
<ul class="list-style-none f6">
<li class="d-inline-block d-md-none mt-1 mr-2 text-gray">
<svg class="octicon octicon-clock" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zm.5 4.75a.75.75 0 00-1.5 0v3.5a.75.75 0 00.471.696l2.5 1a.75.75 0 00.557-1.392L8.5 7.742V4.75z"></path></svg>
<relative-time datetime="2020-03-19T22:39:31Z" class="no-wrap" title="Mar 19, 2020, 11:39 PM GMT+1">on Mar 19</relative-time>
</li>
<li class="d-inline-block mt-1 mr-2 text-mono">
<a class="muted-link" href="https://github.com/pytorch/pytorch/commit/bcd3f6da1af83e7c95013e089cbd59fabd22291c">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
bcd3f6d
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc1.zip" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
zip
</a>
</li>
<li class="d-inline-block mt-1 mr-2">
<a class="muted-link" href="https://github.com/pytorch/pytorch/archive/v1.5.0-rc1.tar.gz" rel="nofollow">
<svg class="octicon octicon-file-zip" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
tar.gz
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="release-entry">
<div class="release pt-2 pt-md-0 pb-3 pb-md-0 clearfix label-">
<div class="d-none d-md-block flex-wrap flex-items-center col-12 col-md-3 col-lg-2 px-md-3 pb-1 pb-md-4 pt-md-4 float-left text-md-right v-align-top">
<div class="flex-auto flex-self-start">
</div>
<ul class="d-none d-md-block mt-2 list-style-none">
<li class="d-block mb-1">
<a href="https://github.com/pytorch/pytorch/tree/v1.4.0" class="muted-link css-truncate" title="v1.4.0">
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
<span class="css-truncate-target" style="max-width: 125px">v1.4.0</span>
</a>
</li>
<li class="d-block mb-1">
<a href="https://github.com/pytorch/pytorch/commit/7f73f1d591afba823daa4a99a939217fb54d7688" class="muted-link">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
<code>7f73f1d</code>
</a>
</li>
<li class="d-block mb-1">
</li>
<li class="mt-3">
<details class="details-reset details-overlay select-menu" id="tag-select-menu-ec3f3a0a-b566-11ea-8f84-e3199c930012">
<summary class="btn btn-sm select-menu-button text-md-left" title="Compare" aria-haspopup="menu" role="button">
<i>Compare</i>
</summary>
<details-menu class="select-menu-modal position-absolute text-md-left" style="z-index: 99;" role="menu">
<div class="select-menu-header">
<span class="select-menu-title">Choose a tag to compare</span>
</div>
<div class="select-menu-filters">
<remote-input class="select-menu-text-filter" src="/pytorch/pytorch/compare/tag-list?range=v1.4.0&amp;tag_name=v1.4.0&amp;type=base" aria-owns="tags-menu-ec3f3a0a-b566-11ea-8f84-e3199c930012">
<input type="text" class="form-control" aria-label="Find a tag" placeholder="Find a tag" autofocus="" autocomplete="off" spellcheck="false">
</remote-input>
</div>
<div class="select-menu-list" id="tags-menu-ec3f3a0a-b566-11ea-8f84-e3199c930012">
<div class="p-2">Search for a tag</div>
</div>
</details-menu>
</details>
</li>
</ul>
</div><!-- /.meta -->
<div class="col-12 col-md-9 col-lg-10 px-md-3 py-md-4 release-main-section commit open float-left">
<div class="release-header">
<div class="d-flex flex-items-start">
<div class="f1 flex-auto min-width-0 text-normal">
<a href="https://github.com/pytorch/pytorch/releases/tag/v1.4.0">Mobile build customization, Distributed model parallel training, Java bindings, and more</a>
</div>
</div>
<ul class="d-flex d-md-none flex-items-center mb-1 list-style-none">
<li class="d-block mr-2">
<a href="https://github.com/pytorch/pytorch/tree/v1.4.0" class="muted-link css-truncate" title="v1.4.0">
<svg class="octicon octicon-tag" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2.5 7.775V2.75a.25.25 0 01.25-.25h5.025a.25.25 0 01.177.073l6.25 6.25a.25.25 0 010 .354l-5.025 5.025a.25.25 0 01-.354 0l-6.25-6.25a.25.25 0 01-.073-.177zm-1.5 0V2.75C1 1.784 1.784 1 2.75 1h5.025c.464 0 .91.184 1.238.513l6.25 6.25a1.75 1.75 0 010 2.474l-5.026 5.026a1.75 1.75 0 01-2.474 0l-6.25-6.25A1.75 1.75 0 011 7.775zM6 5a1 1 0 100 2 1 1 0 000-2z"></path></svg>
<span class="css-truncate-target" style="max-width: 125px">v1.4.0</span>
</a>
</li>
<li class="d-block mr-2 flex-auto">
<a href="https://github.com/pytorch/pytorch/commit/7f73f1d591afba823daa4a99a939217fb54d7688" class="muted-link">
<svg class="octicon octicon-git-commit" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M10.5 7.75a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0zm1.43.75a4.002 4.002 0 01-7.86 0H.75a.75.75 0 110-1.5h3.32a4.001 4.001 0 017.86 0h3.32a.75.75 0 110 1.5h-3.32z"></path></svg>
<code>7f73f1d</code>
</a>
</li>
<li>
<details class="details-reset details-overlay select-menu" id="tag-select-menu-ec3f5166-b566-11ea-8e66-ebd31ff54d9f">
<summary class="btn btn-sm select-menu-button text-md-left" title="Compare" aria-haspopup="menu" role="button">
<i>Compare</i>
</summary>
<details-menu class="select-menu-modal position-absolute text-md-left" style="z-index: 99;" role="menu">
<div class="select-menu-header">
<span class="select-menu-title">Choose a tag to compare</span>
</div>
<div class="select-menu-filters">
<remote-input class="select-menu-text-filter" src="/pytorch/pytorch/compare/tag-list?range=v1.4.0&amp;tag_name=v1.4.0&amp;type=base" aria-owns="tags-menu-ec3f5166-b566-11ea-8e66-ebd31ff54d9f">
<input type="text" class="form-control" aria-label="Find a tag" placeholder="Find a tag" autofocus="" autocomplete="off" spellcheck="false">
</remote-input>
</div>
<div class="select-menu-list" id="tags-menu-ec3f5166-b566-11ea-8e66-ebd31ff54d9f">
<div class="p-2">Search for a tag</div>
</div>
</details-menu>
</details>
</li>
<li>
</li>
</ul>
<p class="f5 text-gray mt-2 mt-md-1 mb-2 mb-md-4">
<a class="d-inline-block" data-hovercard-type="user" data-hovercard-url="/users/nairbv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nairbv"><img class="avatar avatar-user" src="releases_files/582713.jpeg" alt="@nairbv" width="20" height="20"></a>
<a class="text-bold text-gray" data-hovercard-type="user" data-hovercard-url="/users/nairbv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nairbv">nairbv</a>
released this
<relative-time datetime="2020-01-16T00:03:49Z" class="no-wrap" title="Jan 16, 2020, 1:03 AM GMT+1">on Jan 16</relative-time>
</p>
</div>
<div class="markdown-body">
<h1>PyTorch 1.4.0 Release Notes</h1>
<ul>
<li>Highlights</li>
<li>Backwards Incompatible Changes
<ul>
<li>Python</li>
<li>JIT</li>
<li>C++</li>
</ul>
</li>
<li>New Features
<ul>
<li>torch.optim</li>
<li>Distributed</li>
<li>RPC [Experimental]</li>
<li>JIT</li>
<li>Mobile</li>
</ul>
</li>
<li>Improvements
<ul>
<li>Distributed</li>
<li>JIT</li>
<li>Mobile</li>
<li>Named Tensors</li>
<li>C++ API</li>
<li>AMD Support</li>
<li>ONNX</li>
<li>Quantization</li>
<li>Visualization</li>
<li>Other Improvements</li>
</ul>
</li>
<li>Bug Fixes
<ul>
<li>Distributed</li>
<li>RPC</li>
<li>C++ API</li>
<li>JIT</li>
<li>Quantization</li>
<li>Mobile</li>
<li>Other Bug fixes</li>
</ul>
</li>
<li>Deprecations</li>
<li>Performance</li>
</ul>
<p>The PyTorch v1.4.0 release is now available.</p>
<p>The release contains over 1,500 commits and a significant amount of
effort in areas spanning existing areas like JIT, ONNX, Distributed,
Performance and Eager Frontend Improvements and improvements to
experimental areas like mobile and quantization. It also contains new
experimental features including rpc-based model parallel distributed
training and language bindings for the Java language (inference only).</p>
<p><strong>PyTorch 1.4 is the last release that supports Python 2</strong>.
For the C++ API, it is the last release that supports C++11: you
should start migrating to Python 3 and building with C++14 to make the
future transition from 1.4 to 1.5 easier.</p>
<h1>Highlights</h1>
<h2>PyTorch Mobile - Build level customization</h2>
<p>Following the experimental release of <a href="https://pytorch.org/blog/pytorch-1-dot-3-adds-mobile-privacy-quantization-and-named-tensors/" rel="nofollow">PyTorch Mobile in the 1.3 release</a>,
PyTorch 1.4 adds additional mobile support including the ability to
customize build scripts at a fine-grain level. This allows mobile
developers to optimize library size by only including the operators used
by their models and, in the process, reduce their on device footprint
significantly. Initial results show that, for example, a customized
MobileNetV2 is 40% to 50% smaller than the prebuilt PyTorch mobile
library. <a href="https://pytorch.org/mobile/home/" rel="nofollow">Learn more</a> about how to create your own custom builds, and please engage with the community on the <a href="https://discuss.pytorch.org/c/mobile" rel="nofollow">PyTorch forums</a> to provide any feedback you have.</p>
<h2>Distributed Model Parallel Training [Experimental]</h2>
<p>With the scale of models, such as RoBERTa, continuing to increase
into the billions of parameters, model parallel training has become ever
more important to help researchers push the limits. This release
provides a distributed RPC framework to support distributed model
parallel training. It allows for running functions remotely and
referencing remote objects without copying the real data around, and
provides autograd and optimizer APIs to transparently run backwards and
update parameters across RPC boundaries.</p>
<p>To learn more about the APIs and the design of this feature, see the links below:</p>
<ul>
<li><a href="https://pytorch.org/docs/stable/rpc.html" rel="nofollow">API documentation</a></li>
<li><a href="https://pytorch.org/docs/stable/notes/distributed_autograd.html" rel="nofollow">Distributed Autograd design doc</a></li>
<li><a href="https://pytorch.org/docs/stable/notes/rref.html" rel="nofollow">Remote Reference design doc</a></li>
</ul>
<p>For the full tutorials, see the links below:</p>
<ul>
<li><a href="https://pytorch.org/tutorials/intermediate/rpc_tutorial.html" rel="nofollow">A full RPC tutorial</a></li>
<li><a href="https://github.com/pytorch/examples/tree/master/distributed/rpc">Examples using model parallel training for reinforcement learning and with an LSTM</a></li>
</ul>
<p>As always, you can connect with community members and discuss more on the <a href="https://discuss.pytorch.org/c/distributed/distributed-rpc" rel="nofollow">forums</a>.</p>
<h2>Java bindings [Experimental]</h2>
<p>In addition to supporting Python and C++, this release adds
experimental support for Java bindings. Based on the interface developed
for Android in PyTorch Mobile, the new bindings allow you to invoke
TorchScript models from any Java program. Note that the Java bindings
are only available for Linux for this release, and for inference only.
We expect support to expand in subsequent releases. See the code snippet
below for how to use PyTorch within Java:</p>
<p>Learn more about how to use PyTorch from Java <a href="https://github.com/pytorch/java-demo">here</a>, and see the full Javadocs API documentation <a href="https://pytorch.org/docs/stable/packages.html" rel="nofollow">here</a>.</p>
<h2>Pruning</h2>
<p>Pruning functionalities have been added to PyTorch in the <code>nn.utils.prune</code>
module. This provides out-of-the-box support for common magnitude-based
and random pruning techniques, both structured and unstructured, both
layer-wise and global, and it also enables custom pruning from
user-provided masks.</p>
<p>To prune a tensor, first select a pruning technique among those available in <code>nn.utils.prune</code> (or implement your own by subclassing <code>BasePruningMethod</code>).</p>
<div class="highlight highlight-source-python"><pre><span class="pl-k">from</span> <span class="pl-s1">torch</span>.<span class="pl-s1">nn</span>.<span class="pl-s1">utils</span> <span class="pl-k">import</span> <span class="pl-s1">prune</span>
<span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-s1">torch</span>.<span class="pl-en">rand</span>(<span class="pl-c1">2</span>, <span class="pl-c1">5</span>)
<span class="pl-s1">p</span> <span class="pl-c1">=</span> <span class="pl-s1">prune</span>.<span class="pl-v">L1Unstructured</span>(<span class="pl-s1">amount</span><span class="pl-c1">=</span><span class="pl-c1">0.7</span>)
<span class="pl-s1">pruned_tensor</span> <span class="pl-c1">=</span> <span class="pl-s1">p</span>.<span class="pl-en">prune</span>(<span class="pl-s1">t</span>)</pre></div>
<p>To prune a module, select one of the pruning functions available in <code>nn.utils.prune</code> (or implement your own) and specify which module and which parameter within that module pruning should act on.</p>
<div class="highlight highlight-source-python"><pre><span class="pl-s1">m</span> <span class="pl-c1">=</span> <span class="pl-s1">nn</span>.<span class="pl-v">Conv2d</span>(<span class="pl-c1">3</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>)
<span class="pl-s1">prune</span>.<span class="pl-en">ln_structured</span>(<span class="pl-s1">module</span><span class="pl-c1">=</span><span class="pl-s1">m</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'weight'</span>, <span class="pl-s1">amount</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">n</span><span class="pl-c1">=</span><span class="pl-c1">2</span>, <span class="pl-s1">dim</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)</pre></div>
<p>Pruning reparametrizes the module by turning <code>weight</code> (in the example above) from a parameter to an attribute, and replacing it with a new parameter called <code>weight_orig</code> (i.e. appending <code>"_orig"</code> to the initial parameter <code>name</code>) that stores the unpruned version of the tensor. The pruning mask is stored as a buffer named <code>weight_mask</code> (i.e. appending <code>"_mask"</code> to the initial parameter <code>name</code>). Pruning is applied prior to each forward pass by recomputing <code>weight</code> through a multiplication with the updated mask using PyTorch's <code>forward_pre_hooks</code>.</p>
<p>Iterative pruning is seamlessly enabled by repeatedly calling pruning
functions on the same parameter (this automatically handles the
combination of successive masks by making use of a <code>PruningContainer</code> under the hood).</p>
<p><code>nn.utils.prune</code> is easily extensible to support new pruning functions by subclassing the <code>BasePruningMethod</code> base class and implementing the <code>compute_mask</code> method with the instructions to compute the mask according to the logic of the new pruning technique.</p>
<h1>Backwards Incompatible Changes</h1>
<h2>Python</h2>
<h3><code>torch.optim</code>: It is no longer supported to use <code>Scheduler.get_lr()</code> to obtain the last computed learning rate. to get the last computed learning rate, call <code>Scheduler.get_last_lr()</code> instead. (<a href="https://github.com/pytorch/pytorch/pull/26423" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26423/hovercard">26423</a>)</h3>
<p>Learning rate schedulers are now “chainable,” as mentioned in the <em>New Features</em> section below. <code>Scheduler.get_lr</code> was sometimes used for monitoring purposes to obtain the current learning rate. But since <code>Scheduler.get_lr</code>
is also used internally for computing new learning rates, this actually
returns a value that is “one step ahead.” To get the last computed
learning rate, use <code>Scheduler.get_last_lr</code> instead.</p>
<p>Note that <code>optimizer.param_groups[0]['lr']</code> was in version 1.3.1 and remains in 1.4.0 a way of getting the current learning rate used in the optimizer.</p>
<h3><code>Tensor.unfold</code> on a 0-dimensional Tensor now properly returns a 1-dimensional Tensor.</h3>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.3.1</th><th>Version 1.4.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">5</span>).<span class="pl-en">unfold</span>(<span class="pl-s1">dimension</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">step</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)
<span class="pl-en">tensor</span>(<span class="pl-c1">5</span>)
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">tensor</span>(<span class="pl-c1">5</span>).<span class="pl-en">unfold</span>(<span class="pl-s1">dimension</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-c1">1</span>, <span class="pl-s1">step</span><span class="pl-c1">=</span><span class="pl-c1">1</span>)
<span class="pl-en">tensor</span>([<span class="pl-c1">5</span>])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h3><code>torch.symeig</code> now return a 0-element eigenvectors tensor when <code>eigenvectors=False</code> (the default).</h3>
<p align="center">
</p><table align="center">
<tbody><tr><th>Version 1.3.1</th><th>Version 1.4.0</th></tr>
<tr valign="top">
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">symeig</span>(<span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>,<span class="pl-c1">3</span>)).<span class="pl-s1">eigenvectors</span>.<span class="pl-s1">shape</span>
<span class="pl-s1">torch</span>.<span class="pl-v">Size</span>([<span class="pl-c1">3</span>, <span class="pl-c1">3</span>])
</pre></div></sub></td>
<td><sub><div class="highlight highlight-source-python"><pre><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">torch</span>.<span class="pl-en">symeig</span>(<span class="pl-s1">torch</span>.<span class="pl-en">randn</span>(<span class="pl-c1">3</span>,<span class="pl-c1">3</span>)).<span class="pl-s1">eigenvectors</span>.<span class="pl-s1">shape</span>
<span class="pl-s1">torch</span>.<span class="pl-v">Size</span>([<span class="pl-c1">0</span>])
</pre></div></sub></td>
</tr>
</tbody></table>
<p></p>
<h2>JIT</h2>
<ul>
<li>Make <code>torch.jit.get_trace_graph</code> private (it is now <code>torch.jit._get_trace_graph</code>) (<a href="https://github.com/pytorch/pytorch/pull/29149" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29149/hovercard">29149</a>)
<ul>
<li>This function was intended only for ONNX integration; use <code>traced_module.graph</code> instead, like:</li>
<li>traced_module = torch.jit.trace(my_module, example_inputs)<br>
traced_graph = traced_module.graph</li>
</ul>
</li>
<li><code>@property</code> on <code>ScriptModule</code>s has been disabled (<a href="https://github.com/pytorch/pytorch/pull/28395" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28395/hovercard">28395</a>)
<ul>
<li>Scripted <code>@property</code> accesses were silently broken before, where we would evaluate the the <code>get</code> function once and store that as the attribute permanently. They properly error now; a workaround is to make your <code>@property</code> a regular method.</li>
</ul>
</li>
<li>Custom ops: <code>torch::jit::RegisterOperators</code> has been removed, use <code>torch::RegisterOperators</code> instead (<a href="https://github.com/pytorch/pytorch/pull/28229" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28229/hovercard">28229</a>). The usage and behavior should remain the same.</li>
<li>Remove<code> torch.jit._register_*</code> bindings from Python (e.g. <code>torch.jit._register_attribute</code>). These were private functions that were not intended to be used. (<a href="https://github.com/pytorch/pytorch/pull/29499" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29499/hovercard">29499</a>)</li>
</ul>
<h2>C++</h2>
<h3>[C++] The distinction between Tensor and Variable has been eliminated at the C++ level. (<a href="https://github.com/pytorch/pytorch/pull/28287" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28287/hovercard">28287</a>)</h3>
<p>This change simplifies our C++ API and matches previous changes we
did at the python level that merged Tensors and Variables into a single
type.</p>
<p>This change is unlikely to affect user code; the most likely exceptions are:</p>
<ol>
<li>
<p><a href="https://en.cppreference.com/w/cpp/language/adl" rel="nofollow">Argument-dependent lookup</a> for <code>torch::autograd</code> may no longer work. This can break because Variable is now defined as an alias for Tensor (<code>using Variable = Tensor;</code>). In this case, you must explicitly qualify the calls to <code>torch::autograd</code> functions.</p>
</li>
<li>
<p>Because <code>Variable</code> and <code>Tensor</code> are now the same type, code which assumes that they are different types (e.g., for the purposes of templating, or <code>std::enable_if</code> checks) will not work until you delete the (now) redundant overload/specialization.</p>
</li>
<li>
<p>Some operators may trace differently. If this happens, please <a href="https://github.com/pytorch/pytorch/issues/new?template=bug-report.md">file a bug.</a> The most likely situations are:</p>
</li>
</ol>
<ol>
<li>There are now <em>more</em> operations in your trace than before (usually, calls to <code>aten::empty</code>)</li>
<li>There are now <em>less</em> operations in your trace than before (e.g., the trace complains that <code>"there is no observable dependence"</code> with the inputs)</li>
</ol>
<h3>[C++] arguments in <code>torch::nn::LinearOptions</code> are renamed to match the Python API. (<a href="https://github.com/pytorch/pytorch/pull/27382" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27382/hovercard">27382</a>)</h3>
<ul>
<li>Arguments that are renamed:
<ul>
<li><code>in</code> -&gt; <code>in_features</code></li>
<li><code>out</code> -&gt; <code>out_features</code></li>
<li><code>with_bias</code> -&gt; <code>bias</code></li>
</ul>
</li>
</ul>
<h3>[C++] arguments in <code>torch::nn::Conv{1,2,3}dOptions</code> are renamed to match the Python API. (<a href="https://github.com/pytorch/pytorch/pull/28917" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28917/hovercard">28917</a>) (<a href="https://github.com/pytorch/pytorch/pull/29838" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29838/hovercard">29838</a>)</h3>
<ul>
<li>Arguments that are renamed:
<ul>
<li><code>input_channels</code> -&gt; <code>in_channels</code></li>
<li><code>output_channels</code> -&gt; <code>out_channels</code></li>
<li><code>with_bias</code> -&gt; <code>bias</code></li>
</ul>
</li>
</ul>
<h3>[C++] <code>torch::nn::Conv{1,2,3}dOptions</code> no longer has the <code>transposed</code> argument. (<a href="https://github.com/pytorch/pytorch/pull/31005" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31005/hovercard">31005</a>)</h3>
<ul>
<li>If users have <code>transposed</code> originally set to <code>true</code> in <code>torch::nn::Conv{1,2,3}dOptions</code>, they should migrate their code to use <code>torch::nn::ConvTranspose{1,2,3}d</code> layers instead.</li>
</ul>
<h3>[C++] All Reduction enums for <code>torch::nn</code> layers and functionals are changed to have <code>torch::KEnumNAME</code> syntax. (<a href="https://github.com/pytorch/pytorch/pull/27942" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27942/hovercard">27942</a>, <a href="https://github.com/pytorch/pytorch/pull/26837" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26837/hovercard">26837</a>)</h3>
<ul>
<li>Example: previously, to specify “mean” as the reduction method in a torch::nn layer or functional, we would use <code>torch::Reduction::Mean</code>. Now, <code>torch::Reduction::Mean</code> has been renamed to the shorter <code>torch::kMean</code>.</li>
</ul>
<h3>[C++] <code>torch::tensor</code> constructor is improved to match Python API behavior. (<a href="https://github.com/pytorch/pytorch/pull/28523" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28523/hovercard">28523</a>) (<a href="https://github.com/pytorch/pytorch/pull/29632" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29632/hovercard">29632</a>) (<a href="https://github.com/pytorch/pytorch/pull/29066" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29066/hovercard">29066</a>)</h3>
<ul>
<li>Shape checking fixes
<ul>
<li>Example 1: previously, <code>torch::tensor({{1}, {2}})</code> produced a tensor of sizes <code>{2}</code>. Now, it produces a tensor of sizes <code>{2, 1}</code>.</li>
<li>Example 2: previously, <code>torch::tensor(1.1)</code> produced a 1-dim tensor. Now it produces a 0-dim tensor.</li>
</ul>
</li>
<li>Type inference improvements
<ul>
<li>Example 1: previously, C++ <code>torch::tensor</code> with a double (e.g. <code>torch::tensor(1.1)</code>) or a (nested) braced-init-list of doubles (e.g. <code>torch::tensor({{1.1, 2.2}})</code> produces a tensor with dtype <code>torch::kDouble</code>. Now it produces a tensor with dtype <code>torch::get_default_dtype()</code>.</li>
<li>Example 2: previously, C++ <code>torch::tensor</code> with an integer type (e.g. <code>torch::tensor(1)</code>) or a (nested) braced-init-list of integer types (e.g. <code>torch::tensor({{1, 2}})</code>) produces a tensor with the same dtype. Now it always produces a tensor of dtype <code>torch::kLong</code> (aka. <code>int64_t</code>).</li>
<li>Example 3: previously, when passed a <code>TensorOptions</code> without a dtype set to the <code>torch::tensor</code> constructor, it always produces a tensor of dtype <code>torch::get_default_dtype()</code>. Now it produces a tensor of different dtypes based on the dtype of the braced-init-list and the default dtype.</li>
</ul>
</li>
<li>Passing a <code>std::initializer_list</code> (NOT braced-init-list) to <code>torch::tensor</code> will no longer compile, and the user should pass the equivalent braced-init-list to <code>torch::tensor</code> instead. For example, write <code>torch::tensor({1.1, 1.2})</code> instead of <code>torch::tensor(std::initializer_list&lt;double&gt;({1.1, 1.2}))</code>.</li>
</ul>
<h3>[C++] Some activation modules <code>forward</code> function now take <code>Tensor</code> instead of <code>Tensor&amp;</code> as input. (<a href="https://github.com/pytorch/pytorch/pull/28501" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28501/hovercard">28501</a>)</h3>
<p><code>torch::nn</code> layers affected: <code>ELU</code> / <code>SELU</code> / <code>Hardtanh</code> / <code>LeakyReLU</code> / <code>ReLU</code> / <code>ReLU6</code> / <code>RReLU</code> / <code>CELU</code><br>
This change ensures that the above layers can be used in a <code>torch::nn::Sequential</code> module. If your C++ model uses any of the above layers, you must recompile your C++ code with the new libtorch binary.</p>
<h1>New Features</h1>
<h2>torch.optim</h2>
<p>Learning rate schedulers (<code>torch.optim.lr_scheduler</code>) now
support “chaining.” This means that two schedulers can be defined and
stepped one after the other to compound their effect, see example below.
Previously, the schedulers would overwrite each other.</p>
<pre><code>&gt;&gt;&gt; import torch
&gt;&gt;&gt; from torch.optim import SGD
&gt;&gt;&gt; from torch.optim.lr_scheduler import ExponentialLR, StepLR
&gt;&gt;&gt;
&gt;&gt;&gt; model = [torch.nn.Parameter(torch.randn(2, 2, requires_grad=True))]
&gt;&gt;&gt; optimizer = SGD(model, 0.1)
&gt;&gt;&gt;
&gt;&gt;&gt; scheduler1 = ExponentialLR(optimizer, gamma=0.9)
&gt;&gt;&gt; scheduler2 = StepLR(optimizer, step_size=3, gamma=0.1)
&gt;&gt;&gt;
&gt;&gt;&gt; for epoch in range(4):
&gt;&gt;&gt; print(epoch, scheduler2.get_last_lr()[0])
&gt;&gt;&gt;
&gt;&gt;&gt; optimizer.step()
&gt;&gt;&gt; scheduler1.step()
&gt;&gt;&gt; scheduler2.step()
0 0.1
1 0.09000000000000001
2 0.08100000000000002
3 0.00729000000000002
4 0.00656100000000002
</code></pre>
<h2>Distributed</h2>
<ul>
<li>Add <code>allgather_coalesced</code> API to <code>ProcessGroup</code> (<a href="https://github.com/pytorch/pytorch/pull/28634" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28634/hovercard">28634,</a><a href="https://github.com/pytorch/pytorch/pull/29059" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29059/hovercard">29059</a>)</li>
<li>Add <code>abort</code> API in <code>ProcessGroupGloo</code> Send/Recv Work (<a href="https://github.com/pytorch/pytorch/pull/29928" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29928/hovercard">29928</a>).</li>
<li>Add <code>--no_python</code> flag to allow using a bash script wrapper in the launch command (<a href="https://github.com/pytorch/pytorch/pull/29144" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29144/hovercard">29144</a>).</li>
</ul>
<h2>RPC [Experimental]</h2>
<p><code>torch.distributed.rpc</code> is a newly introduced package. It
contains basic building blocks to run functions remotely in model
training and inference, which will be useful for scenarios like
distributed model parallel or implementing parameter server frameworks.
More specifically, it contains four pillars: RPC, Remote Reference,
Distributed Autograd, and Distributed Optimizer. Please refer to the <a href="https://pytorch.org/docs/master/rpc.html" rel="nofollow">documentation</a> and the <a href="https://pytorch.org/tutorials/intermediate/rpc_tutorial.html" rel="nofollow">tutorial</a> for more details.</p>
<ul>
<li>Add <code>rpc_sync</code> and <code>rpc_async</code> for builtin operators and Python user functions (<a href="https://github.com/pytorch/pytorch/pull/23228" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/23228/hovercard">23228</a>, <a href="https://github.com/pytorch/pytorch/pull/23569" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/23569/hovercard">23569</a>, <a href="https://github.com/pytorch/pytorch/pull/28392" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28392/hovercard">28392</a>).</li>
<li>Add <code>remote</code> and <code>RRef</code> for builtin operators and Python user functions (<a href="https://github.com/pytorch/pytorch/pull/25169" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25169/hovercard">25169</a>, <a href="https://github.com/pytorch/pytorch/pull/25499" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25499/hovercard">25499</a>).</li>
<li>Distributed Autograd - FAST mode backward pass implementation. (<a href="https://github.com/pytorch/pytorch/pull/27022" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27022/hovercard">27022</a>, <a href="https://github.com/pytorch/pytorch/pull/27576" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27576/hovercard">27576</a>).</li>
<li>Integrate <code>remote</code> and <code>RRef</code> with distributed autograd (<a href="https://github.com/pytorch/pytorch/pull/28630" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28630/hovercard">28630</a>, <a href="https://github.com/pytorch/pytorch/pull/28656" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28656/hovercard">28656</a>).</li>
<li>Add a distributed optimizer (<a href="https://github.com/pytorch/pytorch/pull/29304" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29304/hovercard">29304</a>, <a href="https://github.com/pytorch/pytorch/pull/30062" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30062/hovercard">30062</a>).</li>
<li>Add python API for <code>get_gradients()</code> method to retrieve gradients from distributed autograd context. (<a href="https://github.com/pytorch/pytorch/pull/28926" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28926/hovercard">28926</a>).</li>
<li>Support creating local <code>RRef</code>s on local values and to-self <code>remote</code> calls (<a href="https://github.com/pytorch/pytorch/pull/28948" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28948/hovercard">28948</a>, <a href="https://github.com/pytorch/pytorch/pull/29634" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29634/hovercard">29634</a>).</li>
<li>Support custom pickler for RPC (<a href="https://github.com/pytorch/pytorch/pull/30185" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30185/hovercard">30185</a>).</li>
<li>Add default RPC agent options based on the backend type (<a href="https://github.com/pytorch/pytorch/pull/30201" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30201/hovercard">30201</a>).</li>
<li>Add local <code>shutdown</code> to <code>ProcessGroup</code> agent (<a href="https://github.com/pytorch/pytorch/pull/30330" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30330/hovercard">30330</a>).</li>
</ul>
<h2>JIT</h2>
<ul>
<li><code>script::Module</code>: implement more of of the nn.Module API (<a href="https://github.com/pytorch/pytorch/pull/28828" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28828/hovercard">28828</a>)
<ul>
<li>In particular, adds the (optionally recursive) methods that iterate over submodules, parameters, etc.</li>
<li>Adds a pybind-like <code>attr()</code> method to simplify attribute access.</li>
</ul>
</li>
<li>Add support for <code>@staticmethod</code> on <code>ScriptModule</code>s (<a href="https://github.com/pytorch/pytorch/pull/27163" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27163/hovercard">27163</a>)</li>
<li>Support Module Containers as Iterables (<a href="https://github.com/pytorch/pytorch/pull/26465" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26465/hovercard">26465</a>)</li>
<li>Support Iterables In List Comprehensions (<a href="https://github.com/pytorch/pytorch/pull/26768" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26768/hovercard">26768)</a></li>
<li>Dictionaries now preserve insertion order, and <code>OrderedDict</code> is supported (<a href="https://github.com/pytorch/pytorch/pull/26465" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26465/hovercard">26465</a>)</li>
<li>Add support for <code>hasattr()</code> (<a href="https://github.com/pytorch/pytorch/pull/29332" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29332/hovercard">29332</a>)</li>
<li>TorchScript classes can now be callable (<a href="https://github.com/pytorch/pytorch/pull/26743" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26743/hovercard">26743</a>)</li>
<li>Add <code>clone_instance</code> for <code>ScriptModule</code>s (<a href="https://github.com/pytorch/pytorch/pull/30168" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30168/hovercard">30168</a>)</li>
<li>Add <code>torch.memory_format</code> support to the TorchScript (<a href="https://github.com/pytorch/pytorch/pull/28544" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28544/hovercard">28544</a>)</li>
<li>Custom <code>forward()</code> is now allowed on container modules (<a href="https://github.com/pytorch/pytorch/pull/28988" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28988/hovercard">28988</a>)</li>
<li>Calls to submodules are now preserved in the traced graph (<a href="https://github.com/pytorch/pytorch/pull/29261" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29261/hovercard">29261</a>)</li>
<li>Add support for module containers to be used as iterables (<a href="https://github.com/pytorch/pytorch/pull/28255" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28255/hovercard">28255</a>)</li>
<li>Make JIT Serialization support arbitrary std::function&lt;&gt; IO (<a href="https://github.com/pytorch/pytorch/pull/28039" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28039/hovercard">28039</a>)</li>
<li>Support <code>layout() </code>in script (<a href="https://github.com/pytorch/pytorch/pull/27100" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27100/hovercard">27100</a>)</li>
<li>Methods and functions are no longer inlined in the serialized file format (<a href="https://github.com/pytorch/pytorch/pull/26706" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26706/hovercard">26706</a>)</li>
</ul>
<h2>Mobile</h2>
<ul>
<li>Build level customization
<ul>
<li>Add custom build script to only include selected operators (<a href="https://github.com/pytorch/pytorch/pull/30144" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30144/hovercard">30144</a>).</li>
<li>Dump operator names used by a script module (<a href="https://github.com/pytorch/pytorch/pull/29374" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29374/hovercard">29374</a>, <a href="https://github.com/pytorch/pytorch/pull/30467" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30467/hovercard">30467</a>).</li>
<li>Disable JIT optimizer in Android wrapper for mobile custom build (<a href="https://github.com/pytorch/pytorch/pull/30285" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30285/hovercard">30285</a>).</li>
<li>FBJNI Gradle ABI_FILTERS parameter (<a href="https://github.com/pytorch/pytorch/pull/30135" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30135/hovercard">30135</a>).</li>
</ul>
</li>
</ul>
<h1>Improvements</h1>
<h2>Distributed</h2>
<h3>Improvements</h3>
<ul>
<li>Add timeout support in <code>ProcessGroupNCCL</code> (<a href="https://github.com/pytorch/pytorch/pull/27224" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27224/hovercard">27224</a>).</li>
<li>Ensure that DDP wrapped module has parameters that require gradients (<a href="https://github.com/pytorch/pytorch/pull/25858" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25858/hovercard">25858</a>).</li>
<li>Making <code>torch/csrc/cuda</code> NCCL usage safe for NCCL 2.5 (<a href="https://github.com/pytorch/pytorch/pull/29014" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29014/hovercard">29014</a>).</li>
<li>Enable <code>test_distributed</code> for ROCm but only with NCCL backend (<a href="https://github.com/pytorch/pytorch/pull/28814" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28814/hovercard">28814</a>).</li>
</ul>
<h3>RPC Improvements</h3>
<ul>
<li>Separate out RPC to <code>rpc_sync</code> and <code>rpc_async</code> APIs (<a href="https://github.com/pytorch/pytorch/pull/26570" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26570/hovercard">26570</a>).</li>
<li>Make python user function serialization format to be consistent with builtin operators (<a href="https://github.com/pytorch/pytorch/pull/27136" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27136/hovercard">27136</a>).</li>
<li>Clean up distributed autograd context on all participants on exit (<a href="https://github.com/pytorch/pytorch/pull/27951" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27951/hovercard">27951</a>).</li>
<li>Improve error handling for distributed autograd engine. (<a href="https://github.com/pytorch/pytorch/pull/27940" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27940/hovercard">27940</a>).</li>
<li>Scope pybind11 functions to <code>torch.distributed.{autograd,rpc}</code> (<a href="https://github.com/pytorch/pytorch/pull/27529" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27529/hovercard">27529</a>).</li>
<li>Lift <code>rpc_timeout</code> to <code>RpcAgent</code> to make it reusable for other <code>RpcAgent</code> implementations. (<a href="https://github.com/pytorch/pytorch/pull/29341" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29341/hovercard">29341</a>).</li>
<li>Support sending message to self in <code>process_group_agent</code> (<a href="https://github.com/pytorch/pytorch/pull/29253" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29253/hovercard">29253</a>).</li>
<li>Properly shutdown RPC even in the case of <code>clean_shutdown=False</code>. (<a href="https://github.com/pytorch/pytorch/pull/29148" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29148/hovercard">29148</a>).</li>
<li>Ensure <code>initializedContextIds_</code> map is cleaned up appropriately in distributed autograd engine. (<a href="https://github.com/pytorch/pytorch/pull/29787" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29787/hovercard">29787</a>).</li>
<li>Add hash and equality operators for <code>WorkerInfo</code> (<a href="https://github.com/pytorch/pytorch/pull/29958" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29958/hovercard">29958</a>).</li>
<li>Add <code>RpcAgentOptions</code> struct type to bundle arguments for different <code>RpcAgent</code>s (<a href="https://github.com/pytorch/pytorch/pull/29972" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29972/hovercard">29972</a>).</li>
<li>Mark timeout <code>FutureMessage</code>s and throw exceptions in <code>ProcessGroupAgent</code> (<a href="https://github.com/pytorch/pytorch/pull/29601" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29601/hovercard">29601</a>).</li>
<li>Re-throw python remote exception when using remote reference to itself (<a href="https://github.com/pytorch/pytorch/pull/29930" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29930/hovercard">29930</a>).</li>
<li>By default ignore <code>RRef</code> leaks during shutdown (<a href="https://github.com/pytorch/pytorch/pull/30217" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30217/hovercard">30217</a>).</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Add Design doc for Distributed Autograd Engine (<a href="https://github.com/pytorch/pytorch/pull/29175" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29175/hovercard">29175</a>, <a href="https://github.com/pytorch/pytorch/pull/30068" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30068/hovercard">30068</a>, <a href="https://github.com/pytorch/pytorch/pull/29927" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29927/hovercard">29927</a>)</li>
<li>Add Design doc for Remote Reference (<a href="https://github.com/pytorch/pytorch/pull/30066" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30066/hovercard">30066</a>).</li>
<li>Add documentation page for <code>torch.distrbuted.rpc</code> (<a href="https://github.com/pytorch/pytorch/pull/29276" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29276/hovercard">29276</a>, <a href="https://github.com/pytorch/pytorch/pull/28030" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28030/hovercard">28030</a>, <a href="https://github.com/pytorch/pytorch/pull/29971" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29971/hovercard">29971</a>, <a href="https://github.com/pytorch/pytorch/pull/30160" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30160/hovercard">30160</a>, <a href="https://github.com/pytorch/pytorch/pull/30050" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30050/hovercard">30050</a>, <a href="https://github.com/pytorch/pytorch/pull/30069" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30069/hovercard">30069</a>, <a href="https://github.com/pytorch/pytorch/pull/30179" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30179/hovercard">30179</a>, <a href="https://github.com/pytorch/pytorch/pull/30218" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30218/hovercard">30218</a>, <a href="https://github.com/pytorch/pytorch/pull/30240" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30240/hovercard">30240</a>, <a href="https://github.com/pytorch/pytorch/pull/30243" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30243/hovercard">30243</a>, <a href="https://github.com/pytorch/pytorch/pull/30259" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30259/hovercard">30259</a>).</li>
</ul>
<h3>MISC</h3>
<ul>
<li>Add known worker IDs to distributed autograd context (<a href="https://github.com/pytorch/pytorch/pull/26324" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26324/hovercard">26324</a>).</li>
<li>Minor tweaks to RPC message API (<a href="https://github.com/pytorch/pytorch/pull/28326" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28326/hovercard">28326</a>).</li>
<li>Rename <code>PythonUDF{Call,Resp}</code> (<a href="https://github.com/pytorch/pytorch/pull/27530" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27530/hovercard">27530</a>).</li>
<li>Use <code>std::shared_ptr</code> for <code>DistAutogradContext</code> (<a href="https://github.com/pytorch/pytorch/pull/29770" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29770/hovercard">29770</a>).</li>
<li>Mark <code>c10d::~NCCLUtils</code> as noexcept (<a href="https://github.com/pytorch/pytorch/pull/29118" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29118/hovercard">29118</a>).</li>
</ul>
<h2>JIT</h2>
<ul>
<li>Move custom passes to last optimization step (<a href="https://github.com/pytorch/pytorch/pull/29256" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29256/hovercard">29256</a>)</li>
<li>Represent the original Python name of a module type the same way in traced and scripted modules. (<a href="https://github.com/pytorch/pytorch/pull/29912" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29912/hovercard">29912</a>)</li>
<li>Only print original SourceRange on highlight (<a href="https://github.com/pytorch/pytorch/pull/29708" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29708/hovercard">29708</a>)</li>
<li>Error message and ergonomic improvements:
<ul>
<li>Show full call stack in TorchScript exception even when calls were inlined. (<a href="https://github.com/pytorch/pytorch/pull/29911" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29911/hovercard">29911</a>)</li>
<li>Reduce error context from 10 -&gt; 3 (<a href="https://github.com/pytorch/pytorch/pull/26765" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26765/hovercard">26765</a>)</li>
<li>Fix error report highlight for unmatched type annotation (<a href="https://github.com/pytorch/pytorch/pull/27195" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27195/hovercard">27195</a>)</li>
<li>Make default string arguments in schemas human readable (<a href="https://github.com/pytorch/pytorch/pull/27088" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27088/hovercard">27088</a>)</li>
<li>Print which output didn't have dependence during trace checking. (<a href="https://github.com/pytorch/pytorch/pull/29047" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29047/hovercard">29047</a>)</li>
</ul>
</li>
<li>Improvements to save/load and serialization performance:
<ul>
<li>Modules can now share JIT types if their implementation is the same, improving save/load performance (<a href="https://github.com/pytorch/pytorch/pull/26666" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26666/hovercard">26666</a>)</li>
<li>Improve float pickling speed. (<a href="https://github.com/pytorch/pytorch/pull/28553" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28553/hovercard">28553</a>)</li>
<li>Pickler: convert <code>std::stringstream</code> cases for improved performance. (<a href="https://github.com/pytorch/pytorch/pull/29351" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29351/hovercard">29351</a>)</li>
<li>Buffer to speed Unpickler (<a href="https://github.com/pytorch/pytorch/pull/27727" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27727/hovercard">27727</a>)</li>
<li>Buffer in Pickler to improve performance. (<a href="https://github.com/pytorch/pytorch/pull/27720" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27720/hovercard">27720</a>)</li>
<li>In <code>torch::save()</code> avoid zip compressing small header records. (<a href="https://github.com/pytorch/pytorch/pull/28180" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28180/hovercard">28180</a>)</li>
<li>String optimizations related to serialization. (<a href="https://github.com/pytorch/pytorch/pull/28230" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28230/hovercard">28230</a>)</li>
</ul>
</li>
<li>Clean up serialized source format (<a href="https://github.com/pytorch/pytorch/pull/28129" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28129/hovercard">28129</a>)</li>
<li>API for finding a common ancestor block for a pair of nodes (<a href="https://github.com/pytorch/pytorch/pull/28864" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28864/hovercard">28864</a>)</li>
<li>Make inserted child module names unique (<a href="https://github.com/pytorch/pytorch/pull/27237" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27237/hovercard">27237</a>)</li>
<li>Better hashing for constant pool (<a href="https://github.com/pytorch/pytorch/pull/27733" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27733/hovercard">27733</a>)</li>
<li>Improve error messages when a method or attribute is missing (<a href="https://github.com/pytorch/pytorch/pull/27110" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27110/hovercard">27110</a>)</li>
<li>Display original source range in <code>Node::print</code> (<a href="https://github.com/pytorch/pytorch/pull/27524" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27524/hovercard">27524</a>)</li>
<li>Always use the closure to resolve variable names (<a href="https://github.com/pytorch/pytorch/pull/27515" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27515/hovercard">27515</a>)</li>
</ul>
<h2>Mobile</h2>
<ul>
<li>Improve Java API / JNI
<ul>
<li>Add module method to allow explicitly destructing native part (<a href="https://github.com/pytorch/pytorch/pull/27090" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27090/hovercard">27090</a>).</li>
<li>Add methods to write image tensor content to buffer (<a href="https://github.com/pytorch/pytorch/pull/27359" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27359/hovercard">27359</a>).</li>
<li>Various improvements to Android API (<a href="https://github.com/pytorch/pytorch/pull/27454" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27454/hovercard">27454</a>, <a href="https://github.com/pytorch/pytorch/pull/27455" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27455/hovercard">27455</a>).</li>
<li>Add support for PyTorch JNI build (<a href="https://github.com/pytorch/pytorch/pull/29412" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29412/hovercard">29412</a>, <a href="https://github.com/pytorch/pytorch/commit/42faf961c8">42faf961c8</a>, <a href="https://github.com/pytorch/pytorch/commit/d22f61432d">d22f61432d</a>).</li>
<li>Various fixes to PyTorch JNI (<a href="https://github.com/pytorch/pytorch/pull/29350" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29350/hovercard">29350</a>, <a href="https://github.com/pytorch/pytorch/pull/29861" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29861/hovercard">29861</a>, <a href="https://github.com/pytorch/pytorch/pull/30206" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30206/hovercard">30206</a>, <a href="https://github.com/pytorch/pytorch/pull/30207" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30207/hovercard">30207</a>).</li>
</ul>
</li>
<li>Improve support for older Android NDK
<ul>
<li>Introduce math_compat.h for older Android versions (<a href="https://github.com/pytorch/pytorch/pull/28567" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28567/hovercard">28567</a>).</li>
<li>Define std::strtoll for older Android (<a href="https://github.com/pytorch/pytorch/pull/28603" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28603/hovercard">28603</a>).</li>
</ul>
</li>
<li>Improve error message, documentation, debuggability
<ul>
<li>Enable full error message for mobile builds (<a href="https://github.com/pytorch/pytorch/pull/29926" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29926/hovercard">29926</a>).</li>
<li>Update iOS README.md (<a href="https://github.com/pytorch/pytorch/pull/27145" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27145/hovercard">27145</a>).</li>
<li>Update Android README.md (<a href="https://github.com/pytorch/pytorch/pull/28533" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28533/hovercard">28533</a>).</li>
<li>Rename function parameters to avoid [-Werror,-Wshadow] (<a href="https://github.com/pytorch/pytorch/pull/30276" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30276/hovercard">30276</a>).</li>
<li>Fix exception message in Java Tensor (<a href="https://github.com/pytorch/pytorch/pull/30776" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30776/hovercard">30776</a>).</li>
</ul>
</li>
<li>Improve support for benchmark and profiling
<ul>
<li>Add Android and iOS test app for benchmark and profiling (<a href="https://github.com/pytorch/pytorch/pull/28405" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28405/hovercard">28405</a>, <a href="https://github.com/pytorch/pytorch/pull/28406" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28406/hovercard">28406</a>, <a href="https://github.com/pytorch/pytorch/pull/28469" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28469/hovercard">28469</a>, <a href="https://github.com/pytorch/pytorch/pull/28622" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28622/hovercard">28622</a>).</li>
<li>Integration with mobile benchmark in PEP (<a href="https://github.com/pytorch/pytorch/pull/28437" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28437/hovercard">28437</a>).</li>
<li>Subscribe for record function and if android do atrace (<a href="https://github.com/pytorch/pytorch/pull/28708" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28708/hovercard">28708</a>).</li>
</ul>
</li>
<li>Improve build / CI
<ul>
<li>Improve Android Gradle build and publishing (<a href="https://github.com/pytorch/pytorch/pull/26833" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26833/hovercard">26833</a>, <a href="https://github.com/pytorch/pytorch/pull/27389" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27389/hovercard">27389</a>, <a href="https://github.com/pytorch/pytorch/pull/29262" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29262/hovercard">29262</a>, <a href="https://github.com/pytorch/pytorch/pull/29738" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29738/hovercard">29738</a>).</li>
<li>Misc fixes to the Android test project (<a href="https://github.com/pytorch/pytorch/pull/27453" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27453/hovercard">27453</a>).</li>
<li>Improve XCode build script (<a href="https://github.com/pytorch/pytorch/pull/27358" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27358/hovercard">27358</a>, <a href="https://github.com/pytorch/pytorch/pull/28996" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28996/hovercard">28996</a>, <a href="https://github.com/pytorch/pytorch/pull/29002" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29002/hovercard">29002</a>).</li>
<li>Add testing code to iOS CI jobs (<a href="https://github.com/pytorch/pytorch/pull/27593" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27593/hovercard">27593</a>, <a href="https://github.com/pytorch/pytorch/pull/27594" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27594/hovercard">27594</a>, <a href="https://github.com/pytorch/pytorch/pull/27784" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27784/hovercard">27784</a>, <a href="https://github.com/pytorch/pytorch/pull/30133" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30133/hovercard">30133</a>).</li>
<li>Misc fixes to the iOS TestApp (<a href="https://github.com/pytorch/pytorch/pull/27591" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27591/hovercard">27591</a>, <a href="https://github.com/pytorch/pytorch/pull/28356" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28356/hovercard">28356</a>, <a href="https://github.com/pytorch/pytorch/pull/28809" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28809/hovercard">28809</a>, <a href="https://github.com/pytorch/pytorch/pull/29247" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29247/hovercard">29247</a>, <a href="https://github.com/pytorch/pytorch/pull/29962" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29962/hovercard">29962</a>, <a href="https://github.com/pytorch/pytorch/pull/29963" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29963/hovercard">29963</a>).</li>
<li>Add support for host build to pytorch_android (<a href="https://github.com/pytorch/pytorch/pull/27662" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27662/hovercard">27662,</a><a href="https://github.com/pytorch/pytorch/pull/27664" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27664/hovercard">27664</a>).</li>
<li>Add host build Gradle publishing (<a href="https://github.com/pytorch/pytorch/pull/29749" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29749/hovercard">29749</a>).</li>
<li>Add mobile build CI with host toolchain (<a href="https://github.com/pytorch/pytorch/pull/30292" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30292/hovercard">30292</a>).</li>
</ul>
</li>
</ul>
<h2>Named Tensors</h2>
<ul>
<li><code>torch.addcdiv</code>, <code>torch.addcmul</code> Added named tensor support (<a href="https://github.com/pytorch/pytorch/pull/28975" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28975/hovercard">28975</a>).</li>
<li><code>torch.{ones,zeros,full,rand,randn}_like</code> Added named tensor support (<a href="https://github.com/pytorch/pytorch/pull/28981" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28981/hovercard">28981</a>).</li>
<li><code>torch.cdist</code> Added named tensor support (<a href="https://github.com/pytorch/pytorch/pull/29129" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29129/hovercard">29129</a>).</li>
<li><code>torch.equal</code> Added named tensor support (<a href="https://github.com/pytorch/pytorch/pull/29322" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29322/hovercard">29322</a>).</li>
<li>Added named tensor support for comparison ops (<a href="https://github.com/pytorch/pytorch/pull/27162" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27162/hovercard">27162</a>).</li>
<li><code>Tensor.align_to</code> Fixed error message (<a href="https://github.com/pytorch/pytorch/pull/27221" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27221/hovercard">27221</a>).</li>
<li><code>Tensor.align_to</code> Make method-only. (<a href="https://github.com/pytorch/pytorch/pull/27304" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27304/hovercard">27304</a>).</li>
<li><code>Tensor.align_to</code> Accept partially named tensors (<a href="https://github.com/pytorch/pytorch/pull/27308" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27308/hovercard">27308</a>).</li>
<li><code>torch.mean(Tensor, Dimname)</code> Fixed autograd support (<a href="https://github.com/pytorch/pytorch/pull/29199" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29199/hovercard">29199</a>).</li>
<li><code>Tensor.unflatten</code> Fix when dim is a negative integer (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="537212278" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/31208" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31208/hovercard" href="https://github.com/pytorch/pytorch/pull/31208">#31208</a>) (<a href="https://github.com/pytorch/pytorch/pull/31432" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31432/hovercard">31432</a>).</li>
<li>Fix type errors in examples about Named Tensor (<a href="https://github.com/pytorch/pytorch/pull/27828" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27828/hovercard">27828</a>).</li>
</ul>
<h2>C++ API</h2>
<h3>New torch::nn modules</h3>
<ul>
<li>Convolution layers
<ul>
<li>torch::nn::ConvTranspose{1,2,3}d / Unfold (<a href="https://github.com/pytorch/pytorch/pull/29721" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29721/hovercard">29721</a>) (<a href="https://github.com/pytorch/pytorch/pull/27809" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27809/hovercard">27809</a>).</li>
</ul>
</li>
<li>Pooling layers
<ul>
<li>torch::nn::AdaptiveAvgPool{1, 2, 3}d / MaxUnpool{1, 2, 3}d / LPPool{1, 2}d / FractionalMaxPool{2,3}d (<a href="https://github.com/pytorch/pytorch/pull/26808" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26808/hovercard">26808</a>, <a href="https://github.com/pytorch/pytorch/pull/26818" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26818/hovercard">26818</a>, <a href="https://github.com/pytorch/pytorch/pull/26819" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26819/hovercard">26819</a>) (<a href="https://github.com/pytorch/pytorch/pull/26896" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26896/hovercard">26896</a>, <a href="https://github.com/pytorch/pytorch/pull/26915" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26915/hovercard">26915</a>, <a href="https://github.com/pytorch/pytorch/pull/27027" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27027/hovercard">27027</a>) (<a href="https://github.com/pytorch/pytorch/pull/27800" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27800/hovercard">27800</a>, <a href="https://github.com/pytorch/pytorch/pull/28492" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28492/hovercard">28492</a>, <a href="https://github.com/pytorch/pytorch/pull/29584" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29584/hovercard">29584</a>) (<a href="https://github.com/pytorch/pytorch/pull/29933" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29933/hovercard">29933</a>).</li>
</ul>
</li>
<li>Loss layers
<ul>
<li>torch::nn::HingeEmbeddingLoss / CosineEmbeddingLoss /MultiMarginLoss (<a href="https://github.com/pytorch/pytorch/pull/27101" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27101/hovercard">27101</a>) (<a href="https://github.com/pytorch/pytorch/pull/27345" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27345/hovercard">27345</a>) (<a href="https://github.com/pytorch/pytorch/pull/27424" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27424/hovercard">27424</a>) (<a href="https://github.com/pytorch/pytorch/pull/27770" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27770/hovercard">27770</a>).</li>
<li>torch::nn::TripletMarginLoss / SoftMarginloss / MultiLabelMargin / MarginRankingLoss / MultiLabelSoftMarginLoss (<a href="https://github.com/pytorch/pytorch/pull/27713" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27713/hovercard">27713</a>, <a href="https://github.com/pytorch/pytorch/pull/27956" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27956/hovercard">27956</a>) (<a href="https://github.com/pytorch/pytorch/pull/27660" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27660/hovercard">27660</a>) (<a href="https://github.com/pytorch/pytorch/pull/27659" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27659/hovercard">27659</a>) (<a href="https://github.com/pytorch/pytorch/pull/29000" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29000/hovercard">29000</a>) (<a href="https://github.com/pytorch/pytorch/pull/27669" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27669/hovercard">27669</a>).</li>
<li>torch::nn::MSELoss / KLDivLoss / BCELoss / SmoothL1Loss / PoissonNLLLoss / BCEWithLogitsLoss (<a href="https://github.com/pytorch/pytorch/pull/27156" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27156/hovercard">27156</a>) (<a href="https://github.com/pytorch/pytorch/pull/28806" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28806/hovercard">28806</a>) (<a href="https://github.com/pytorch/pytorch/pull/30146" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30146/hovercard">30146</a>) (<a href="https://github.com/pytorch/pytorch/pull/27661" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27661/hovercard">27661</a>) (<a href="https://github.com/pytorch/pytorch/pull/28755" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28755/hovercard">28755</a>) (<a href="https://github.com/pytorch/pytorch/pull/28783" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28783/hovercard">28783</a>).</li>
<li>torch::nn::NLLLoss / CrossEntropyLoss / CTCLoss (<a href="https://github.com/pytorch/pytorch/pull/29812" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29812/hovercard">29812</a>) (<a href="https://github.com/pytorch/pytorch/pull/28654" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28654/hovercard">28654</a>).</li>
</ul>
</li>
<li>Normalization Layers
<ul>
<li>torch::nn::LayerNorm / InstanceNorm{1,2,3}d / BatchNorm{1,2,3}d / GroupNorm / LocalResponseNorm / CrossMapLRN2d (<a href="https://github.com/pytorch/pytorch/pull/28032" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28032/hovercard">28032</a>) (<a href="https://github.com/pytorch/pytorch/pull/28790" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28790/hovercard">28790</a>) (<a href="https://github.com/pytorch/pytorch/pull/28176" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28176/hovercard">28176</a>, <a href="https://github.com/pytorch/pytorch/pull/28936" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28936/hovercard">28936</a>) (<a href="https://github.com/pytorch/pytorch/pull/29920" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29920/hovercard">29920</a>) (<a href="https://github.com/pytorch/pytorch/pull/28759" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28759/hovercard">28759</a>) (<a href="https://github.com/pytorch/pytorch/pull/29039" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29039/hovercard">29039</a>).</li>
</ul>
</li>
<li>Activation Layers
<ul>
<li>torch::nn::ELU / LeakyReLU / SELU / PReLU / ReLU / ReLU6 / RRelu / CELU / GLU (<a href="https://github.com/pytorch/pytorch/pull/27028" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27028/hovercard">27028)</a> (<a href="https://github.com/pytorch/pytorch/pull/27059" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27059/hovercard">27059</a>) (<a href="https://github.com/pytorch/pytorch/pull/27434" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27434/hovercard">27434</a>) (<a href="https://github.com/pytorch/pytorch/pull/27429" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27429/hovercard">27429</a>) (<a href="https://github.com/pytorch/pytorch/pull/27435" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27435/hovercard">27435</a>) (<a href="https://github.com/pytorch/pytorch/pull/27436" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27436/hovercard">27436</a>) (<a href="https://github.com/pytorch/pytorch/pull/27437" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27437/hovercard">27437</a>) (<a href="https://github.com/pytorch/pytorch/pull/27487" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27487/hovercard">27487</a>) (<a href="https://github.com/pytorch/pytorch/pull/29922" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29922/hovercard">29922</a>).</li>
<li>torch::nn::Sigmoid / LogSigmoid / LogSoftmax / Softmax / Softmax2d /
Softplus / Softmin / Softsign / Softshrink / Hardshrink / Hardtanh /
Tanh / Threshold (<a href="https://github.com/pytorch/pytorch/pull/27488" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27488/hovercard">27488</a>) (<a href="https://github.com/pytorch/pytorch/pull/27060" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27060/hovercard">27060</a>) (<a href="https://github.com/pytorch/pytorch/pull/27462" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27462/hovercard">27462</a>) (<a href="https://github.com/pytorch/pytorch/pull/27446" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27446/hovercard">27446</a>) (<a href="https://github.com/pytorch/pytorch/pull/27509" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27509/hovercard">27509</a>) (<a href="https://github.com/pytorch/pytorch/pull/27489" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27489/hovercard">27489</a>) (<a href="https://github.com/pytorch/pytorch/pull/27459" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27459/hovercard">27459</a>) (<a href="https://github.com/pytorch/pytorch/pull/27535" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27535/hovercard">27535</a>) (<a href="https://github.com/pytorch/pytorch/pull/27534" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27534/hovercard">27534</a>) (<a href="https://github.com/pytorch/pytorch/pull/27035" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27035/hovercard">27035</a>) (<a href="https://github.com/pytorch/pytorch/pull/27537" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27537/hovercard">27537</a>) (<a href="https://github.com/pytorch/pytorch/pull/27038" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27038/hovercard">27038</a>) (<a href="https://github.com/pytorch/pytorch/pull/27536" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27536/hovercard">27536</a>) (<a href="https://github.com/pytorch/pytorch/pull/27538" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27538/hovercard">27538</a>).</li>
</ul>
</li>
<li>Dropout Layers
<ul>
<li>torch::nn::Dropout / Dropout{2, 3}d / AlphaDropout / FeatureAlphaDropout (<a href="https://github.com/pytorch/pytorch/pull/29761" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29761/hovercard">29761</a>) (<a href="https://github.com/pytorch/pytorch/pull/28424" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28424/hovercard">28424</a>).</li>
</ul>
</li>
<li>Padding Layers
<ul>
<li>torch::nn::ReflectionPad{1, 2}d / ReplicationPad{1,2,3}d / ZeroPad2d / ConstantPad{1,2,3}d (<a href="https://github.com/pytorch/pytorch/pull/28538" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28538/hovercard">28538</a>) (<a href="https://github.com/pytorch/pytorch/pull/28539" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28539/hovercard">28539</a>) (<a href="https://github.com/pytorch/pytorch/pull/28540" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28540/hovercard">28540</a>) (<a href="https://github.com/pytorch/pytorch/pull/28541" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28541/hovercard">28541</a>).</li>
</ul>
</li>
<li>Embedding layers
<ul>
<li>torch::nn::Embedding / EmbeddingBag (<a href="https://github.com/pytorch/pytorch/pull/26358" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26358/hovercard">26358</a>).</li>
</ul>
</li>
<li>Linear layers
<ul>
<li>torch::nn::Bilinear / Flatten (<a href="https://github.com/pytorch/pytorch/pull/26082" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26082/hovercard">26082</a>) (<a href="https://github.com/pytorch/pytorch/pull/28072" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28072/hovercard">28072</a>).</li>
</ul>
</li>
<li>Vision layers
<ul>
<li>torch::nn::Upsample / PixelShuffle (<a href="https://github.com/pytorch/pytorch/pull/28413" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28413/hovercard">28413</a>) (<a href="https://github.com/pytorch/pytorch/pull/28140" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28140/hovercard">28140</a>).</li>
</ul>
</li>
</ul>
<h3>New torch::nn::functional functions</h3>
<ul>
<li>Convolution functions
<ul>
<li>torch::nn::functional::conv{1,2,3}d / conv_transpose{1,2,3}d / fold / unfold (<a href="https://github.com/pytorch/pytorch/pull/28917" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28917/hovercard">28917</a>) (<a href="https://github.com/pytorch/pytorch/pull/29721" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29721/hovercard">29721</a>) (<a href="https://github.com/pytorch/pytorch/pull/28732" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28732/hovercard">28732</a>) (<a href="https://github.com/pytorch/pytorch/pull/27809" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27809/hovercard">27809</a>).</li>
</ul>
</li>
<li>Pooling functions
<ul>
<li>torch::nn::functional::adaptive_avg_pool{1, 2, 3}d / lp_pool{1, 2}d /
fractional_max_pool{2, 3}d / fractional_max_pool{2, 3}d_with_indices (<a href="https://github.com/pytorch/pytorch/pull/26808" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26808/hovercard">26808</a>, <a href="https://github.com/pytorch/pytorch/pull/26818" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26818/hovercard">26818</a>, <a href="https://github.com/pytorch/pytorch/pull/26819" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26819/hovercard">26819</a>) (<a href="https://github.com/pytorch/pytorch/pull/27800" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27800/hovercard">27800</a>, <a href="https://github.com/pytorch/pytorch/pull/28492" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28492/hovercard">28492</a>) (<a href="https://github.com/pytorch/pytorch/pull/29584" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29584/hovercard">29584</a>) (<a href="https://github.com/pytorch/pytorch/pull/29933" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29933/hovercard">29933</a>).</li>
</ul>
</li>
<li>Loss functions
<ul>
<li>torch::nn::functional::hinge_embedding_loss / multi_margin_loss /
multilabel_soft_margin_loss / triplet_margin_loss / soft_margin_loss /
margin_ranking_loss (<a href="https://github.com/pytorch/pytorch/pull/27101" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27101/hovercard">27101</a>) (<a href="https://github.com/pytorch/pytorch/pull/27424" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27424/hovercard">27424</a>) (<a href="https://github.com/pytorch/pytorch/pull/27669" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27669/hovercard">27669</a>) (<a href="https://github.com/pytorch/pytorch/pull/27713" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27713/hovercard">27713</a>) (<a href="https://github.com/pytorch/pytorch/pull/27660" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27660/hovercard">27660</a>) (<a href="https://github.com/pytorch/pytorch/pull/29000" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29000/hovercard">29000</a>).</li>
<li>torch::nn::functional::poisson_nll_loss / nll_loss / cross_entropy / binary_cross_entropy_with_logits (<a href="https://github.com/pytorch/pytorch/pull/28755" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28755/hovercard">28755</a>) (<a href="https://github.com/pytorch/pytorch/pull/29812" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29812/hovercard">29812</a>) (<a href="https://github.com/pytorch/pytorch/pull/28783" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28783/hovercard">28783</a>).</li>
<li>torch::nn::functional::l1_loss / kl_div / mse_loss / binary_cross_entropy / smooth_l1_loss / ctc_loss (<a href="https://github.com/pytorch/pytorch/pull/27156" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27156/hovercard">27156</a>) (<a href="https://github.com/pytorch/pytorch/pull/28806" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28806/hovercard">28806</a>) (<a href="https://github.com/pytorch/pytorch/pull/30146" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30146/hovercard">30146</a>) (<a href="https://github.com/pytorch/pytorch/pull/27661" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27661/hovercard">27661</a>) (<a href="https://github.com/pytorch/pytorch/pull/28654" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28654/hovercard">28654</a>).</li>
</ul>
</li>
<li>Normalization functions
<ul>
<li>torch::nn::functional::layer_norm / instance_norm / clip_grad_norm_ /
batch_norm / group_norm / local_response_norm / normalize (<a href="https://github.com/pytorch/pytorch/pull/28032" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28032/hovercard">28032</a>) (<a href="https://github.com/pytorch/pytorch/pull/28790" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28790/hovercard">28790</a>, <a href="https://github.com/pytorch/pytorch/pull/30684" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30684/hovercard">30684</a>) (<a href="https://github.com/pytorch/pytorch/pull/26140" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26140/hovercard">26140</a>, <a href="https://github.com/pytorch/pytorch/pull/29584" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29584/hovercard">29584</a>, <a href="https://github.com/pytorch/pytorch/pull/30216" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30216/hovercard">30216</a>) (<a href="https://github.com/pytorch/pytorch/pull/28176" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28176/hovercard">28176</a>, <a href="https://github.com/pytorch/pytorch/pull/28936" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28936/hovercard">28936</a>) (<a href="https://github.com/pytorch/pytorch/pull/29920" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29920/hovercard">29920</a>) (<a href="https://github.com/pytorch/pytorch/pull/28759" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28759/hovercard">28759</a>) (<a href="https://github.com/pytorch/pytorch/pull/27280" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27280/hovercard">27280</a>).</li>
</ul>
</li>
<li>Activation functions
<ul>
<li>torch::nn::functional::elu / leaky_relu / selu / prelu / relu / relu6 / rrelu / celu / glu / gelu (<a href="https://github.com/pytorch/pytorch/pull/27028" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27028/hovercard">27028</a>) (<a href="https://github.com/pytorch/pytorch/pull/27059" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27059/hovercard">27059</a>) (<a href="https://github.com/pytorch/pytorch/pull/27434" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27434/hovercard">27434</a>) (<a href="https://github.com/pytorch/pytorch/pull/27429" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27429/hovercard">27429</a>) (<a href="https://github.com/pytorch/pytorch/pull/27435" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27435/hovercard">27435</a>) (<a href="https://github.com/pytorch/pytorch/pull/27436" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27436/hovercard">27436</a>) (<a href="https://github.com/pytorch/pytorch/pull/27437" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27437/hovercard">27437</a>) (<a href="https://github.com/pytorch/pytorch/pull/27487" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27487/hovercard">27487</a>) (<a href="https://github.com/pytorch/pytorch/pull/29922" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29922/hovercard">29922</a>) (<a href="https://github.com/pytorch/pytorch/pull/28433" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28433/hovercard">28433</a>).</li>
<li>torch::nn::functional:: log_sigmoid/ log_softmax / softmax /
softplus / softmin / softsign / softshrink / hardshrink / tanhshrink /
hardtanh / gumbel_softmax / threshold (<a href="https://github.com/pytorch/pytorch/pull/27060" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27060/hovercard">27060</a>) (<a href="https://github.com/pytorch/pytorch/pull/27462" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27462/hovercard">27462</a>) (<a href="https://github.com/pytorch/pytorch/pull/27446" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27446/hovercard">27446</a>) (<a href="https://github.com/pytorch/pytorch/pull/27489" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27489/hovercard">27489</a>) (<a href="https://github.com/pytorch/pytorch/pull/27459" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27459/hovercard">27459</a>) (<a href="https://github.com/pytorch/pytorch/pull/27535" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27535/hovercard">27535</a>) (<a href="https://github.com/pytorch/pytorch/pull/27534" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27534/hovercard">27534</a>) (<a href="https://github.com/pytorch/pytorch/pull/27035" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27035/hovercard">27035</a>) (<a href="https://github.com/pytorch/pytorch/pull/27537" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27537/hovercard">27537</a>) (<a href="https://github.com/pytorch/pytorch/pull/27038" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27038/hovercard">27038</a>) (<a href="https://github.com/pytorch/pytorch/pull/28121" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28121/hovercard">28121</a>) (<a href="https://github.com/pytorch/pytorch/pull/27538" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27538/hovercard">27538</a>).</li>
</ul>
</li>
<li>Embedding functions
<ul>
<li>torch::nn::functional::embedding / embedding_bag / one_hot (<a href="https://github.com/pytorch/pytorch/pull/28669" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28669/hovercard">28669</a>) (<a href="https://github.com/pytorch/pytorch/pull/29673" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29673/hovercard">29673</a>) (<a href="https://github.com/pytorch/pytorch/pull/27177" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27177/hovercard">27177</a>).</li>
</ul>
</li>
<li>Linear functions
<ul>
<li>torch::nn::functional::linear / bilinear (<a href="https://github.com/pytorch/pytorch/pull/27382" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27382/hovercard">27382</a>) (<a href="https://github.com/pytorch/pytorch/pull/26082" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26082/hovercard">26082</a>).</li>
</ul>
</li>
<li>Padding functions
<ul>
<li>torch::nn::functional::pad (<a href="https://github.com/pytorch/pytorch/pull/26601" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26601/hovercard">26601</a>, <a href="https://github.com/pytorch/pytorch/pull/28760" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28760/hovercard">28760</a>).</li>
</ul>
</li>
<li>Vision functions
<ul>
<li>torch::nn::functional::affine_grid / grid_sample / interpolate / pixel_shuffle (<a href="https://github.com/pytorch/pytorch/pull/27263" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27263/hovercard">27263</a>) (<a href="https://github.com/pytorch/pytorch/pull/28354" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28354/hovercard">28354</a>) (<a href="https://github.com/pytorch/pytorch/pull/28413" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28413/hovercard">28413</a>) (<a href="https://github.com/pytorch/pytorch/pull/28140" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28140/hovercard">28140</a>).</li>
</ul>
</li>
<li>Distance functions
<ul>
<li>torch::nn::functional::pdist (<a href="https://github.com/pytorch/pytorch/pull/27122" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27122/hovercard">27122</a>).</li>
</ul>
</li>
<li>Utility functions
<ul>
<li>torch::nn::utils::clip_grad_value_ / parameters_to_vector / vector_to_parameters (<a href="https://github.com/pytorch/pytorch/pull/28736" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28736/hovercard">28736</a>, <a href="https://github.com/pytorch/pytorch/pull/29584" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29584/hovercard">29584</a>) (<a href="https://github.com/pytorch/pytorch/pull/30216" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30216/hovercard">30216</a>) (<a href="https://github.com/pytorch/pytorch/pull/29267" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29267/hovercard">29267</a>).</li>
</ul>
</li>
</ul>
<h2>AMD Support</h2>
<ul>
<li>New features integration
<ul>
<li>Enabled RCCL Integration (<a href="https://github.com/pytorch/pytorch/pull/23884" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/23884/hovercard">23884</a>, <a href="https://github.com/pytorch/pytorch/pull/27383" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27383/hovercard">27383</a>, <a href="https://github.com/pytorch/pytorch/pull/27518" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27518/hovercard">27518</a>, <a href="https://github.com/pytorch/pytorch/pull/29385" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29385/hovercard">29385</a>)</li>
<li>Enabled rocTX and rocTracer Integration (<a href="https://github.com/pytorch/pytorch/pull/27416" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27416/hovercard">27416</a>)</li>
<li>Improved hiprtc integration (<a href="https://github.com/pytorch/pytorch/pull/27390" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27390/hovercard">27390</a>)</li>
<li>bfloat16 enablement (initial) on ROCm (<a href="https://github.com/pytorch/pytorch/pull/27719" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27719/hovercard">27719</a>)</li>
</ul>
</li>
<li>Build/CI
<ul>
<li>Upgrade to ROCm 2.9 (<a href="https://github.com/pytorch/pytorch/pull/27417" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27417/hovercard">27417</a>)</li>
<li>Upgrade ROCm CI to Python3.6 (<a href="https://github.com/pytorch/pytorch/pull/30119" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30119/hovercard">30119</a>, <a href="https://github.com/pytorch/pytorch/pull/27353" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27353/hovercard">27353</a>)</li>
<li>Distribute hipify scripts as part of torch package (<a href="https://github.com/pytorch/pytorch/pull/27425" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27425/hovercard">27425</a>)</li>
<li>Build and test gfx908 architecture (<a href="https://github.com/pytorch/pytorch/pull/27388" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27388/hovercard">27388</a>)</li>
<li>Add <code>torch.version.hip</code> (<a href="https://github.com/pytorch/pytorch/pull/29815" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29815/hovercard">29815</a>).</li>
<li>Build fixes (<a href="https://github.com/pytorch/pytorch/pull/29547" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29547/hovercard">29547</a>, <a href="https://github.com/pytorch/pytorch/pull/29009" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29009/hovercard">29009</a>)</li>
</ul>
</li>
</ul>
<h2>ONNX</h2>
<p>In PyTorch 1.4, we have mainly focused on expanding the coverage for
ONNX Opset 11, and enabling exporting torchvision models. Most of the
torchvision models can be exported to ONNX (Opset 11, with fixed input
size), including FasterRCNN, MaskRCNN, and KeypointRCNN. We have also
enhanced export support for some tensor indexing scenarios, with more
enhancements to come in the next release. In addition, 20+ new PyTorch
operators are enabled in ONNX exporter.</p>
<h3>Expanding Coverage for ONNX Opset 11</h3>
<ul>
<li><code>torch.sort/torch.topk</code> are supported in Opset 11 (<a href="https://github.com/pytorch/pytorch/pull/25739" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25739/hovercard">25739</a>)</li>
<li><code>torch.size/torch.squeeze/torch.unsqueeze/torch.mm/torch.index_fill/torch.index_copy</code> are supported in Opset 11 (<a href="https://github.com/pytorch/pytorch/pull/27578" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27578/hovercard">27578</a>)</li>
<li><code>torch.masked_select/torch.masked_scatter</code> are supported in Opset 11 (<a href="https://github.com/pytorch/pytorch/pull/25949" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25949/hovercard">25949</a>)</li>
<li><code>torch.arange</code> is supported in Opset 11 (<a href="https://github.com/pytorch/pytorch/pull/26875" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26875/hovercard">26875</a>)</li>
<li><code>avg_pool, constant_pad_nd, reflection_pad, replication_pad</code> Support enhanced in Opset 11 (<a href="https://github.com/pytorch/pytorch/pull/28225" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28225/hovercard">28225</a>)</li>
<li><code>torch.hardtanh</code> is supported in Opset 11 (<a href="https://github.com/pytorch/pytorch/pull/30169" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30169/hovercard">30169</a>)</li>
<li>Enable ONNX constant folding for opset 11 (<a href="https://github.com/pytorch/pytorch/pull/29011" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29011/hovercard">29011</a>)</li>
</ul>
<h3>Exporting More Torch Operators/Models to ONNX</h3>
<ul>
<li><code>torch.remainder</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/24410" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/24410/hovercard">24410</a>)</li>
<li><code>torch.unfold</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/24970" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/24970/hovercard">24970</a>)</li>
<li><code>torch.slice/torch.select</code> with negative index are enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/25273" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25273/hovercard">25273</a>, <a href="https://github.com/pytorch/pytorch/pull/26549" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26549/hovercard">26549</a>)</li>
<li><code>torch.ones/torch.ones_like/torch.zeros/torch.zeros_like/torch.full/torch.full_like</code> with default dtype are enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/27577" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27577/hovercard">27577</a>)</li>
<li><code>torch.unbind</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/27247" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27247/hovercard">27247</a>)</li>
<li><code>torch.nn.functional.interpolate</code> export is enhanced (<a href="https://github.com/pytorch/pytorch/pull/27179" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27179/hovercard">27179</a>, <a href="https://github.com/pytorch/pytorch/pull/27566" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27566/hovercard">27566</a>, <a href="https://github.com/pytorch/pytorch/pull/28560" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28560/hovercard">28560</a>, <a href="https://github.com/pytorch/pytorch/pull/29489" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29489/hovercard">29489</a>)</li>
<li><code>torch.det</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/26958" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26958/hovercard">26958</a>)</li>
<li><code>torch.group_norm</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/27071" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27071/hovercard">27071</a>)</li>
<li><code>torch.meshgrid</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/26037" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26037/hovercard">26037</a>)</li>
<li><code>torch.randn/torch.randn_like</code> are enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/28470" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28470/hovercard">28470</a>, <a href="https://github.com/pytorch/pytorch/pull/29354" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29354/hovercard">29354</a>)</li>
<li><code>torch.weight_norm</code> enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/28618" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28618/hovercard">28618</a>)</li>
<li><code>torch.scalar_tensor</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/28713" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28713/hovercard">28713</a>)</li>
<li><code>torch.logdet</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/29767" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29767/hovercard">29767</a>)</li>
<li><code>torch.batch_norm</code> 2D with affine=False is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/29458" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29458/hovercard">29458</a>)</li>
<li><code>torch.bitshift</code> is enabled in exporter (<a href="https://github.com/pytorch/pytorch/pull/28210" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28210/hovercard">28210</a>)</li>
</ul>
<h3>Enhancing Export/Test Infra</h3>
<ul>
<li>Use deepcopy inputs in ONNX ORT test cases (<a href="https://github.com/pytorch/pytorch/pull/27186" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27186/hovercard">27186</a>)</li>
<li>Return NotImplemented from all binary math ops (<a href="https://github.com/pytorch/pytorch/pull/27423" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27423/hovercard">27423</a>).</li>
<li>Disabling ONNX IR v4 sematics for opset 8 or lower (<a href="https://github.com/pytorch/pytorch/pull/28990" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28990/hovercard">28990</a>)</li>
<li>Add ONNX tests for torchvision models (<a href="https://github.com/pytorch/pytorch/pull/30121" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30121/hovercard">30121</a>)</li>
<li>Keep output type information while exporting ONNX graph (<a href="https://github.com/pytorch/pytorch/pull/25906" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25906/hovercard">25906</a>)</li>
</ul>
<h2>Quantization</h2>
<p>Quantization updates correspond to a mix of bug-fixes and feature
improvements, with feature improvements adding improved operator
coverage and performance improvements. We have also made a lot of
progress towards enabling graph mode quantization support.</p>
<ul>
<li>Feature improvements:
<ul>
<li>Enabling intra-op parallelism (<a href="https://github.com/pytorch/pytorch/pull/26692" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26692/hovercard">26692</a>).</li>
<li>Enabling inplace relu (<a href="https://github.com/pytorch/pytorch/pull/28710" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28710/hovercard">28710</a>).</li>
<li>Quantized Tensor support copy (<a href="https://github.com/pytorch/pytorch/pull/28612" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28612/hovercard">28612</a>).</li>
<li>Add quantized torch mean implementation (<a href="https://github.com/pytorch/pytorch/pull/27675" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27675/hovercard">27675</a>).</li>
<li>Add quantized avg_pool2d for pytorch mobile (<a href="https://github.com/pytorch/pytorch/pull/27631" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27631/hovercard">27631</a>).</li>
<li>Add nn.quantized.Conv3d (<a href="https://github.com/pytorch/pytorch/pull/29813" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29813/hovercard">29813</a>).</li>
<li>Adding inplace quantized relu6 (<a href="https://github.com/pytorch/pytorch/pull/29245" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29245/hovercard">29245</a>).</li>
<li>Fast histogram observer (<a href="https://github.com/pytorch/pytorch/pull/29790" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29790/hovercard">29790</a>).</li>
<li>PackedSequence support for quantized LSTM (<a href="https://github.com/pytorch/pytorch/pull/29585" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29585/hovercard">29585</a>).</li>
<li>Improve legacy QuantizedLinear functions to reduce overhead (<a href="https://github.com/pytorch/pytorch/pull/29773" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29773/hovercard">29773</a>).</li>
<li>Add support for quantized operator conversion from PT to C2 via ONNX (<a href="https://github.com/pytorch/pytorch/pull/29694" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29694/hovercard">29694</a>).</li>
<li>enable per channel dynamic quantization (<a href="https://github.com/pytorch/pytorch/pull/30122" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30122/hovercard">30122</a>).</li>
</ul>
</li>
<li>Scripting support:
<ul>
<li>Make PerChannelMinMaxObserver scriptable using <code>torch.jit.ignore</code> (<a href="https://github.com/pytorch/pytorch/pull/29416" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29416/hovercard">29416</a>).</li>
<li>Make HistogramObserver scriptable with <code>@torch.jit.ignore</code> (<a href="https://github.com/pytorch/pytorch/pull/27950" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27950/hovercard">27950</a>).</li>
<li>Fix tracing for dynamic quantized LSTM (<a href="https://github.com/pytorch/pytorch/pull/29331" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29331/hovercard">29331</a>).</li>
</ul>
</li>
</ul>
<h2>Visualization</h2>
<ul>
<li>Fixed graph visualization: displaying proper names after recent JIT changes (<a href="https://github.com/pytorch/pytorch/pull/30244" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30244/hovercard">30244</a>)</li>
<li>Support logging embedding for TensorBoard visualizations to generic filesystem (<a href="https://github.com/pytorch/pytorch/pull/27716" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27716/hovercard">27716</a>)</li>
</ul>
<h2>Other Improvements</h2>
<ul>
<li><code>torch.argmax/argmin</code> Allow half type (<a href="https://github.com/pytorch/pytorch/pull/28787" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28787/hovercard">28787</a>).</li>
<li><code>torch.cuda.memory_stats / memory_summary</code> instrumentation for CUDA memory allocator (<a href="https://github.com/pytorch/pytorch/pull/27361" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27361/hovercard">27361</a>).</li>
<li><code>torch.set_num_threads</code> Allow calling multiple times with TBB (<a href="https://github.com/pytorch/pytorch/pull/27190" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27190/hovercard">27190</a>).</li>
<li><code>torch.set_num_threads</code> Allow calling multiple times in parallel native (<a href="https://github.com/pytorch/pytorch/pull/27947" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27947/hovercard">27947</a>).</li>
<li><code>torch.logical_xor</code> Allow non-bool tensors (<a href="https://github.com/pytorch/pytorch/pull/27248" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27248/hovercard">27248</a>).</li>
<li><code>torch.promote_types</code> Nicer error message. (<a href="https://github.com/pytorch/pytorch/pull/27941" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27941/hovercard">27941</a>).</li>
<li><code>torch.batch_norm_elemt</code> Add an out-variant (<a href="https://github.com/pytorch/pytorch/pull/27621" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27621/hovercard">27621</a>).</li>
<li><code>torch.lerp</code> Implement derivative with respect to weight (<a href="https://github.com/pytorch/pytorch/pull/28219" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28219/hovercard">28219</a>).</li>
<li><code>torch.complex32</code> Add type promotion support (<a href="https://github.com/pytorch/pytorch/pull/27929" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27929/hovercard">27929</a>).</li>
<li><code>torch.unique</code> Support bool tensors (<a href="https://github.com/pytorch/pytorch/pull/28374" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28374/hovercard">28374</a>).</li>
<li><code>torch.reshape</code> Improve backward for viewable geometries (<a href="https://github.com/pytorch/pytorch/pull/28901" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28901/hovercard">28901</a>).</li>
<li><code>torch.lu</code> Generalized factorization (<a href="https://github.com/pytorch/pytorch/pull/28608" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28608/hovercard">28608</a>).</li>
<li><code>torch.equal</code> Add the intra-op parallelism (<a href="https://github.com/pytorch/pytorch/pull/28810" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28810/hovercard">28810</a>).</li>
<li><code>torch.randint</code> Accept generator=None (<a href="https://github.com/pytorch/pytorch/pull/29748" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29748/hovercard">29748</a>).</li>
<li><code>torch.bfloat16</code> Enabled for cuda (<a href="https://github.com/pytorch/pytorch/pull/27259" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27259/hovercard">27259</a>).</li>
<li><code>torch.multinomial</code> Enable for torch.half (<a href="https://github.com/pytorch/pytorch/pull/29266" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29266/hovercard">29266</a>).</li>
<li><code>nn.RNN</code> Respect the current stream in cudnn (<a href="https://github.com/pytorch/pytorch/pull/27026" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27026/hovercard">27026</a>).</li>
<li><code>nn.RNN</code> Preserve nonlinearity attribute (<a href="https://github.com/pytorch/pytorch/pull/28058" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28058/hovercard">28058</a>).</li>
<li><code>nn.Linear</code> Support 0-batch size. (<a href="https://github.com/pytorch/pytorch/pull/27211" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27211/hovercard">27211</a>).</li>
<li><code>nn.functional.binary_cross_entropy</code> implement double backwards (<a href="https://github.com/pytorch/pytorch/pull/26983" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26983/hovercard">26983</a>).</li>
<li><code>nn.AdaptiveAvgPool2d</code> Add support for NHWC memory format (<a href="https://github.com/pytorch/pytorch/pull/24396" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/24396/hovercard">24396</a>).</li>
<li><code>nn.GELU</code> Add GELU activation (<a href="https://github.com/pytorch/pytorch/pull/28944" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28944/hovercard">28944</a>).</li>
<li><code>nn.LayerNorm</code> Handle batch size of zero (<a href="https://github.com/pytorch/pytorch/pull/28614" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28614/hovercard">28614</a>).</li>
<li><code>nn.BatchNorm</code> Add NHWC support on cudnn (<a href="https://github.com/pytorch/pytorch/pull/23861" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/23861/hovercard">23861</a>).</li>
<li><code>nn.BatchNorm2d</code> support torch.channels_last (<a href="https://github.com/pytorch/pytorch/pull/28982" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28982/hovercard">28982</a>).</li>
<li><code>nn.BatchNorm2d</code> Handle empty inputs (<a href="https://github.com/pytorch/pytorch/pull/30035" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30035/hovercard">30035</a>).</li>
<li><code>nn.LayerNorm</code> Enable the intra-op parallelism (<a href="https://github.com/pytorch/pytorch/pull/28464" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28464/hovercard">28464</a>).</li>
<li><code>nn.utils.prune</code> Add pruning functionality (<a href="https://github.com/pytorch/pytorch/pull/24076" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/24076/hovercard">24076</a>).</li>
<li><code>nn.Sequential</code> Make iterable (<a href="https://github.com/pytorch/pytorch/pull/28987" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28987/hovercard">28987</a>).</li>
<li><code>dtype.is_signed</code> Ability to differentiate signed dtypes (<a href="https://github.com/pytorch/pytorch/pull/29511" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29511/hovercard">29511</a>).</li>
<li><code>optim.lr_scheduler.MultiplicativeLR </code>Add new multiplicative learning rate scheduler. (<a href="https://github.com/pytorch/pytorch/pull/27254" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27254/hovercard">27254</a>).</li>
<li><code>cuda.comm.scatter, gather</code> Add channel-last support (<a href="https://github.com/pytorch/pytorch/pull/28077" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28077/hovercard">28077</a>).</li>
<li><code>at::parallel_for</code> Choose number of OMP threads based on GRAIN_SIZE (<a href="https://github.com/pytorch/pytorch/pull/26963" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26963/hovercard">26963</a>).</li>
<li>Return NotImplemented from unsupported tensor arithmetic operators (<a href="https://github.com/pytorch/pytorch/pull/26507" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26507/hovercard">26507</a>).</li>
<li>Automatically select proper tqdm submodule (<a href="https://github.com/pytorch/pytorch/pull/27108" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27108/hovercard">27108</a>).</li>
<li>Pickle support for sparse tensors (<a href="https://github.com/pytorch/pytorch/pull/27062" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27062/hovercard">27062</a>).</li>
<li>Vectorized complex unary and binary op support. (<a href="https://github.com/pytorch/pytorch/pull/26500" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26500/hovercard">26500</a>).</li>
<li>Complex support for reduce and linpack ops on CPU (<a href="https://github.com/pytorch/pytorch/pull/27653" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27653/hovercard">27653</a>).</li>
<li>Complex support for compare and pointwise ops on CPU (<a href="https://github.com/pytorch/pytorch/pull/28735" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28735/hovercard">28735</a>).</li>
<li>Make PyTorch Python 3.8 compatible (<a href="https://github.com/pytorch/pytorch/pull/29302" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29302/hovercard">29302</a>).</li>
<li>Buffer python warning to avoid deadlocks (<a href="https://github.com/pytorch/pytorch/pull/26613" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26613/hovercard">26613</a>).</li>
<li>Use NNPACK for strided convolutions. (<a href="https://github.com/pytorch/pytorch/pull/29084" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29084/hovercard">29084</a>).</li>
</ul>
<h1>Bug Fixes</h1>
<h2>Distributed</h2>
<ul>
<li>Ensure NCCL error handling code is disabled for NCCL versions &lt; 2.4 (<a href="https://github.com/pytorch/pytorch/pull/27124" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27124/hovercard">27124</a>).</li>
<li>Fix segmentation fault in <code>FileStore</code> with concurrent accesses. (<a href="https://github.com/pytorch/pytorch/pull/28812" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28812/hovercard">28812</a>).</li>
<li>Fix DDP incompatibility issue with <code>nn.MultiheadAttention</code> (<a href="https://github.com/pytorch/pytorch/pull/26826" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26826/hovercard">26826</a>).</li>
</ul>
<h2>RPC</h2>
<ul>
<li>Add <code>ProcessGroupAgent</code> termination detection algorithm (<a href="https://github.com/pytorch/pytorch/pull/26984" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26984/hovercard">26984</a>).</li>
<li>Fix pybind11 warnings in Python RPC handler implementation (<a href="https://github.com/pytorch/pytorch/pull/27284" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27284/hovercard">27284</a>).</li>
<li>Defer creating <code>ProcessGroupAgent</code> listener thread until contexts are initialized (<a href="https://github.com/pytorch/pytorch/pull/28013" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28013/hovercard">28013</a>).</li>
<li>Fix Python RPC handler exit crash (<a href="https://github.com/pytorch/pytorch/pull/27251" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27251/hovercard">27251</a>).</li>
<li>Fix distributed autograd initialization (<a href="https://github.com/pytorch/pytorch/pull/29069" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29069/hovercard">29069</a>).</li>
<li>Always include autograd context id in <code>rpc_*</code> / <code>remote</code> requests (<a href="https://github.com/pytorch/pytorch/pull/29781" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29781/hovercard">29781</a>).</li>
<li>Make <code>RRefContext</code> singleton leaky, deal with module destruct order race. (<a href="https://github.com/pytorch/pytorch/pull/30172" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30172/hovercard">30172</a>).</li>
</ul>
<h2>C++ API Bug Fixes</h2>
<ul>
<li>at::Tensor::requires_grad_ now supported (<a href="https://github.com/pytorch/pytorch/pull/26332" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26332/hovercard">26332</a>).</li>
<li>torch::isfinite now supported (<a href="https://github.com/pytorch/pytorch/pull/30083" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30083/hovercard">30083</a>).</li>
<li>torch::nn::modules_ordered_dict is deprecated (<a href="https://github.com/pytorch/pytorch/pull/28774" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28774/hovercard">28774</a>).</li>
<li>Add reset_parameters to torch::nn modules (<a href="https://github.com/pytorch/pytorch/pull/29832" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29832/hovercard">29832</a>).</li>
<li>Allow passing undefined Tensor to Module::register_parameter (<a href="https://github.com/pytorch/pytorch/pull/27948" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27948/hovercard">27948</a>).</li>
<li>Exclude undefined tensors in the result of Module::parameters() / named_paramters() / buffers() / named_buffers() (<a href="https://github.com/pytorch/pytorch/pull/30626" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30626/hovercard">30626</a>).</li>
<li>Include hierarchy information in C++ API loading error messages (<a href="https://github.com/pytorch/pytorch/pull/28499" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28499/hovercard">28499</a>).</li>
<li>Fix a bug: the C++ L-BFGS optimizer does not work properly if there
are one or more registered tensors with no grad in the model (<a href="https://github.com/pytorch/pytorch/pull/27606" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27606/hovercard">27606</a>).</li>
<li>Use c10::variant-based enums for Nonlinearity and FanMode (<a href="https://github.com/pytorch/pytorch/pull/27933" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27933/hovercard">27933</a>). Support for <code>torch::nn::init::Nonlinearity</code> and <code>torch::nn::init::FanMode</code> will be removed in 1.5.</li>
</ul>
<h2>JIT</h2>
<ul>
<li>Make dropout properly condition on training. (<a href="https://github.com/pytorch/pytorch/pull/29436" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29436/hovercard">29436</a>)</li>
<li>Fix aten::grad to return optional list (<a href="https://github.com/pytorch/pytorch/pull/29577" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29577/hovercard">29577</a>)</li>
<li>Fix <code>torch.arange</code> dtype</li>
<li>Fix type sharing on loaded ScriptModules (<a href="https://github.com/pytorch/pytorch/pull/29826" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29826/hovercard">29826</a>)</li>
<li>Fix type sharing between traced modules (<a href="https://github.com/pytorch/pytorch/pull/29583" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29583/hovercard">29583</a>)</li>
<li>Check for mutable default parameters (<a href="https://github.com/pytorch/pytorch/pull/29833" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29833/hovercard">29833</a>)</li>
<li>Fix tracing of autograd functions (<a href="https://github.com/pytorch/pytorch/pull/29791" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29791/hovercard">29791</a>)</li>
<li>Check for unrolled loop in break &amp; continue (<a href="https://github.com/pytorch/pytorch/pull/29474" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29474/hovercard">29474</a>)</li>
<li>Fix negative string indexing (<a href="https://github.com/pytorch/pytorch/pull/22700" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/22700/hovercard">22700</a>)</li>
<li>Make jit.trace_module reentrant (<a href="https://github.com/pytorch/pytorch/pull/29411" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29411/hovercard">29411</a>)</li>
<li>Fix jit outplace tracing and reapply changes to _like operators. (<a href="https://github.com/pytorch/pytorch/pull/28839" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28839/hovercard">28839</a>)</li>
<li>Properly guard against inheritance on TorchScript classes (<a href="https://github.com/pytorch/pytorch/pull/28407" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28407/hovercard">28407</a>)</li>
<li>Fix when giving jit format warning about unsupported options (<a href="https://github.com/pytorch/pytorch/pull/28616" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28616/hovercard">28616</a>)</li>
<li>Fix handling of function attributes. (<a href="https://github.com/pytorch/pytorch/pull/28569" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28569/hovercard">28569</a>)</li>
<li>Fix pushLong() issue in pickler. (<a href="https://github.com/pytorch/pytorch/pull/28057" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28057/hovercard">28057</a>)</li>
<li>Fix broken name mangling (<a href="https://github.com/pytorch/pytorch/pull/27511" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27511/hovercard">27511</a>)</li>
<li>Fix segfault while printing value type for an error msg in emitListComprehension (<a href="https://github.com/pytorch/pytorch/pull/27261" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27261/hovercard">27261</a>)</li>
<li>Fix <code>toIValue</code> dict iteration (<a href="https://github.com/pytorch/pytorch/pull/26856" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26856/hovercard">26856</a>)</li>
<li>Fix race condition in Function::optimized_graph(). (<a href="https://github.com/pytorch/pytorch/pull/27012" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27012/hovercard">27012</a>)</li>
<li>Sanitize module names on legacy import (<a href="https://github.com/pytorch/pytorch/pull/27764" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27764/hovercard">27764</a>)</li>
<li>Python None should have its type inferred as NoneType (<a href="https://github.com/pytorch/pytorch/pull/26665" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26665/hovercard">26665</a>)</li>
<li>Properly set existing attributes under recursive script (<a href="https://github.com/pytorch/pytorch/pull/27514" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27514/hovercard">27514</a>)</li>
</ul>
<h2>Quantization</h2>
<ul>
<li>Skip copy_same_type_transpose_ for quantized tensor (<a href="https://github.com/pytorch/pytorch/pull/29609" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29609/hovercard">29609</a>).</li>
<li>Add note that cuda quantization is not supported (<a href="https://github.com/pytorch/pytorch/pull/27829" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27829/hovercard">27829</a>).</li>
<li>Rename _intrinsic to intrinsic (<a href="https://github.com/pytorch/pytorch/pull/27194" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27194/hovercard">27194</a>).</li>
<li>Better error message for quantized dispatch (<a href="https://github.com/pytorch/pytorch/pull/28635" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28635/hovercard">28635</a>).</li>
<li>Update the misleading comments for zero_points and scale in dynamic quant linear module [1/2] (<a href="https://github.com/pytorch/pytorch/pull/28767" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28767/hovercard">28767</a>).</li>
<li>Avoid the misleading zero_point and scale [2/2] (<a href="https://github.com/pytorch/pytorch/pull/28827" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28827/hovercard">28827</a>).</li>
<li>Add the warning message for API with linear modules (<a href="https://github.com/pytorch/pytorch/pull/28766" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28766/hovercard">28766</a>).</li>
<li>Do not insert observers for empty sequential modules (<a href="https://github.com/pytorch/pytorch/pull/28384" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28384/hovercard">28384</a>).</li>
<li>Fix the padding issue of quantized average pool operator (<a href="https://github.com/pytorch/pytorch/pull/28260" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28260/hovercard">28260</a>).</li>
</ul>
<h2>Mobile</h2>
<ul>
<li>Fix deadlock issues in ThreadPool (<a href="https://github.com/pytorch/pytorch/pull/29885" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29885/hovercard">29885</a>).</li>
<li>Disable ProfilingGraphExecutorImpl for mobile (<a href="https://github.com/pytorch/pytorch/pull/30067" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30067/hovercard">30067</a>).</li>
</ul>
<h2>Other Bug fixes</h2>
<ul>
<li>
<p><code>torch.kthvalue</code> Fix CUDA shared memory out of bound access in findPattern (<a href="https://github.com/pytorch/pytorch/pull/28989" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28989/hovercard">28989</a>).</p>
</li>
<li>
<p><code>torch.save</code> Fix source files not being saved (<a href="https://github.com/pytorch/pytorch/pull/28965" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28965/hovercard">28965</a>).</p>
</li>
<li>
<p><code>torch.load</code> Fix OSError loading files larger than 2GB. (<a href="https://github.com/pytorch/pytorch/pull/27125" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27125/hovercard">27125</a>).</p>
</li>
<li>
<p><code>torch.linspace</code> clearer error message for negative step sizes. (<a href="https://github.com/pytorch/pytorch/pull/28274" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28274/hovercard">28274</a>).</p>
</li>
<li>
<p><code>torch.histc</code> Add range checks to avoid segfaults (<a href="https://github.com/pytorch/pytorch/pull/27712" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27712/hovercard">27712</a>).</p>
</li>
<li>
<p><code>torch.lu</code> Fix thread<code> </code>local issue on cpu (<a href="https://github.com/pytorch/pytorch/pull/28546" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28546/hovercard">28546</a>).</p>
</li>
<li>
<p><code>torch.max_pool2d</code> Limit tensor size to max CUDA grid size (<a href="https://github.com/pytorch/pytorch/pull/28931" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28931/hovercard">28931</a>).</p>
</li>
<li>
<p><code>torch.renorm</code> Fix a memory leak in CUDA renorm. (<a href="https://github.com/pytorch/pytorch/pull/29873" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29873/hovercard">29873</a>).</p>
</li>
<li>
<p><code>torch.index_add</code> Fix bug in atomicAdd on CUDA for some dtypes (<a href="https://github.com/pytorch/pytorch/pull/29231" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29231/hovercard">29231</a>).</p>
</li>
<li>
<p><code>torch.addmm</code> Fix handling of empty tensors (<a href="https://github.com/pytorch/pytorch/pull/28613" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28613/hovercard">28613</a>).</p>
</li>
<li>
<p><code>nn.CTCLoss</code> Fix incorrect gradient for large target sizes (<a href="https://github.com/pytorch/pytorch/pull/27460" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27460/hovercard">27460</a>).</p>
</li>
<li>
<p><code>nn.functional.ctc_loss</code> Fix incorrect gradient on cudnn (<a href="https://github.com/pytorch/pytorch/pull/27039" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27039/hovercard">27039</a>).</p>
</li>
<li>
<p><code>nn.Embedding</code> Incorrect gradient at padding_idx in cuda kernel. (<a href="https://github.com/pytorch/pytorch/pull/27731" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27731/hovercard">27731</a>).</p>
</li>
<li>
<p><code>nn.LayerNorm</code> Fix an illegal memory access error (<a href="https://github.com/pytorch/pytorch/pull/28196" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28196/hovercard">28196</a>).</p>
</li>
<li>
<p><code>nn.Conv2d</code> handle zero stride (<a href="https://github.com/pytorch/pytorch/pull/28784" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28784/hovercard">28784</a>).</p>
</li>
<li>
<p><code>nn.PoissonNLLLoss</code> Fix incorrect result with <code>full=True</code> (<a href="https://github.com/pytorch/pytorch/pull/28637" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28637/hovercard">28637</a>).</p>
</li>
<li>
<p><code>nn.AvgPool2d</code> fix an overflow for 2^31-1 sized inputs (<a href="https://github.com/pytorch/pytorch/pull/30793" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30793/hovercard">30793</a>).</p>
</li>
<li>
<p><code>nn.RNNBase</code> Fix an issue with use of children of RNN third party device types (<a href="https://github.com/pytorch/pytorch/pull/28562" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28562/hovercard">28562</a>).</p>
</li>
<li>
<p><code>nn.Upsample</code> Fix “invalid configuration argument” error (<a href="https://github.com/pytorch/pytorch/pull/28927" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28927/hovercard">28927</a>).</p>
</li>
<li>
<p><code>nn.Upsample</code> Fix a CUDA launch config failure (<a href="https://github.com/pytorch/pytorch/pull/29016" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29016/hovercard">29016</a>).</p>
</li>
<li>
<p><code>optim.lr_scheduler.OneCycleLR</code> Correctly handle div_factor parameter (<a href="https://github.com/pytorch/pytorch/pull/28217" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28217/hovercard">28217</a>).</p>
</li>
<li>
<p><code>PackedSequence.to</code> Ensure all tensors are moved (<a href="https://github.com/pytorch/pytorch/pull/27245" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27245/hovercard">27245</a>).</p>
</li>
<li>
<p><code>EventList.total_average</code> Fix a regression caused by missing <strong>iadd</strong> (<a href="https://github.com/pytorch/pytorch/pull/27498" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27498/hovercard">27498</a>).</p>
</li>
<li>
<p><code>Tensor.record_stream</code> Ensure stream is recorded for shifted view tensors (<a href="https://github.com/pytorch/pytorch/pull/27371" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27371/hovercard">27371</a>).</p>
</li>
<li>
<p><code>torch.hub</code> Handle branch names containing a slash. (<a href="https://github.com/pytorch/pytorch/pull/27960" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27960/hovercard">27960</a>).</p>
</li>
<li>
<p>Fix error handling in Magma kernels (<a href="https://github.com/pytorch/pytorch/pull/29003" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29003/hovercard">29003</a>).</p>
</li>
<li>
<p>Fix avx for c++14 (<a href="https://github.com/pytorch/pytorch/pull/28207" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28207/hovercard">28207</a>).</p>
</li>
<li>
<p>Fix illegal memory access thread safety issue in sparse CUDA (<a href="https://github.com/pytorch/pytorch/pull/29426" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29426/hovercard">29426</a>).</p>
</li>
<li>
<p><code>__cuda_array_interface__</code> Fix stride calculation (<a href="https://github.com/pytorch/pytorch/pull/31450" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/31450/hovercard">31450</a>).</p>
</li>
</ul>
<h1>Deprecations</h1>
<h3><strong>Python 2 support is deprecated and will not be supported in the 1.5 release.</strong></h3>
<h3><code>torch.optim</code>: <code>Scheduler.step(epoch)</code> is now deprecated; use <code>Scheduler.step()</code> instead. (<a href="https://github.com/pytorch/pytorch/pull/26423" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/26423/hovercard">26432</a>)</h3>
<p>For example:</p>
<pre><code>&gt;&gt;&gt; for epoch in range(10):
&gt;&gt;&gt; optimizer.step()
&gt;&gt;&gt; scheduler.step(epoch)
DeprecationWarning: The epoch parameter in `scheduler.step()` was not necessary and is being deprecated where possible. Please use `scheduler.step()` to step the scheduler. During the deprecation, if epoch is different from None, the closed form is used instead of the new chainable form, where available. Please open an issue if you are unable to replicate your use case: https://github.com/pytorch/pytorch/issues/new/choose.
warnings.warn(EPOCH_DEPRECATION_WARNING, DeprecationWarning)
</code></pre>
<h3><strong>[C++]</strong> C++11 is deprecated and will not be supported in the 1.5 release.</h3>
<h3><strong>[C++]</strong> <code>Tensor::is_variable()</code> has been deprecated. As noted in the <strong>Backwards Incompatible Changes</strong>
section, the distinction between variable and non-variable has been
eliminated, so this check is no longer meaningful. Generally, <code>is_variable()</code> will now return true except in some special circumstances (see <a href="https://github.com/pytorch/pytorch/pull/29653" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29653/hovercard">29653</a> for more details). (<a href="https://github.com/pytorch/pytorch/pull/29653" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29653/hovercard">29653</a>)</h3>
<h3><strong>[C++]</strong> <code>torch::nn::modules_ordered_dict</code> has been deprecated. It is generally no longer necessary and can just be removed. (<a href="https://github.com/pytorch/pytorch/pull/28774/" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28774/hovercard">28774</a>)</h3>
<h3><code>torch.jit.quantized</code> API has been deprecated in favor of <code>torch.quantization.quantize_dynamic</code> (<a href="https://github.com/pytorch/pytorch/pull/28766" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28766/hovercard">28766</a>)</h3>
<h1>Performance</h1>
<p>A benchmark suite is available to easily measure the performance of
operators with a range of input shapes. The generated benchmark data
fully characterize the performance of operators in terms of execution
time. For more details see README.md in the
benchmarks/operator_benchmark directory.</p>
<ul>
<li><code>torch.nn.functional.threshold, torch.nn.functional.layer_norm, torch.cdist</code> Performance of threshold (CPU), layer norm (CUDA) and cdist operations was improved (<a href="https://github.com/pytorch/pytorch/pull/27155" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27155/hovercard">27155,</a><a href="https://github.com/pytorch/pytorch/pull/27634" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27634/hovercard">27634</a>, <a href="https://github.com/pytorch/pytorch/pull/25799" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/25799/hovercard">25799</a>)</li>
<li><code>torch.Tensor.fill_</code> Performance for half and bfloat16 types on CPU was improved (<a href="https://github.com/pytorch/pytorch/pull/28397" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28397/hovercard">28397</a>).</li>
<li><code>torch.nn.MaxPool2d</code> implementation for channels_last format was added (<a href="https://github.com/pytorch/pytorch/pull/24872" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/24872/hovercard">24872</a>)</li>
<li>There is a fast pass reducing the overheads of pointwise operations
relying on TensorIterator under certain conditions (contiguous inputs,
no broadcast) (<a href="https://github.com/pytorch/pytorch/pull/29180" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29180/hovercard">29180</a>).</li>
<li>Overheads of operations with scalars/number literals was improved (<a href="https://github.com/pytorch/pytorch/pull/29915" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/29915/hovercard">29915</a>).</li>
<li>In case of type promotion on the GPU, the values are converted on the fly, without explicit casting of the full tensor (<a href="https://github.com/pytorch/pytorch/pull/30018" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/30018/hovercard">30018</a>).</li>
<li>reorder_dimensions in TensorIterator favors output write locality,
improving overall performance when operating on discontiguous tensors (<a href="https://github.com/pytorch/pytorch/pull/28615" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28615/hovercard">28615</a>).</li>
<li>Float pickling speed was improved (<a href="https://github.com/pytorch/pytorch/pull/28553" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28553/hovercard">28553</a>).</li>
<li>GRAIN_SIZE for intra-op parallelization was unified between TH and ATen operations (<a href="https://github.com/pytorch/pytorch/pull/28770" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/28770/hovercard">28770</a>)</li>
<li><code>tensor.numel</code> devirtualized, improving performance (<a href="https://github.com/pytorch/pytorch/pull/27294" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/27294/hovercard">27294</a>)</li>
</ul>
</div>
<details class="details-reset Details-element border-top pt-3 mt-4 mb-2 mb-md-4">
<summary>
<div class="d-flex flex-items-center">
<span class="mr-2 Details-content--closed"><svg class="octicon octicon-triangle-right" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.427 4.427l3.396 3.396a.25.25 0 010 .354l-3.396 3.396A.25.25 0 016 11.396V4.604a.25.25 0 01.427-.177z"></path></svg></span>
<span class="mr-2 Details-content--open"><svg class="octicon octicon-triangle-down" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.427 6.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 6H4.604a.25.25 0 00-.177.427z"></path></svg></span>
<span class="text-bold">Assets</span>
<span class="ml-1 Counter">2</span>
</div>
</summary>
<div class="Box Box--condensed mt-3">
<div>
<div class="d-block py-1 py-md-2 Box-body px-2">
<a href="https://github.com/pytorch/pytorch/archive/v1.4.0.zip" rel="nofollow" class="d-flex flex-items-center">
<svg class="octicon octicon-file-zip flex-shrink-0 text-gray" width="16" height="16" viewBox="0 0 16 16" version="1.1" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
<span class="px-1 text-bold">Source code</span> (zip)
</a>
</div>
<div class="d-block py-1 py-md-2 Box-body px-2">
<a href="https://github.com/pytorch/pytorch/archive/v1.4.0.tar.gz" rel="nofollow" class="d-flex flex-items-center">
<svg class="octicon octicon-file-zip flex-shrink-0 text-gray" width="16" height="16" viewBox="0 0 16 16" version="1.1" aria-hidden="true"><path fill-rule="evenodd" d="M3.5 1.75a.25.25 0 01.25-.25h3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h2.086a.25.25 0 01.177.073l2.914 2.914a.25.25 0 01.073.177v8.586a.25.25 0 01-.25.25h-.5a.75.75 0 000 1.5h.5A1.75 1.75 0 0014 13.25V4.664c0-.464-.184-.909-.513-1.237L10.573.513A1.75 1.75 0 009.336 0H3.75A1.75 1.75 0 002 1.75v11.5c0 .649.353 1.214.874 1.515a.75.75 0 10.752-1.298.25.25 0 01-.126-.217V1.75zM8.75 3a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM6 5.25a.75.75 0 01.75-.75h.5a.75.75 0 010 1.5h-.5A.75.75 0 016 5.25zm2 1.5A.75.75 0 018.75 6h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 6.75zm-1.25.75a.75.75 0 000 1.5h.5a.75.75 0 000-1.5h-.5zM8 9.75A.75.75 0 018.75 9h.5a.75.75 0 010 1.5h-.5A.75.75 0 018 9.75zm-.75.75a1.75 1.75 0 00-1.75 1.75v3c0 .414.336.75.75.75h2.5a.75.75 0 00.75-.75v-3a1.75 1.75 0 00-1.75-1.75h-.5zM7 12.25a.25.25 0 01.25-.25h.5a.25.25 0 01.25.25v2.25H7v-2.25z"></path></svg>
<span class="px-1 text-bold">Source code</span> (tar.gz)
</a>
</div>
</div>
</div>
</details>
</div><!-- /.release-body -->
</div><!-- /.release -->
</div>
</div>
<div data-pjax="" class="paginate-container">
<div class="pagination"><span class="disabled">Previous</span><a rel="nofollow" href="https://github.com/pytorch/pytorch/releases?after=v1.4.0">Next</a></div>
</div>
</div>
</div>
</main>
</div>
</div>
<div class="footer container-lg width-full p-responsive" role="contentinfo">
<div class="position-relative d-flex flex-row-reverse flex-lg-row flex-wrap flex-lg-nowrap flex-justify-center flex-lg-justify-between pt-6 pb-2 mt-6 f6 text-gray border-top border-gray-light ">
<ul class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0">© 2020 GitHub, Inc.</li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to terms, text:terms" href="https://github.com/site/terms">Terms</a></li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to privacy, text:privacy" href="https://github.com/site/privacy">Privacy</a></li>
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to security, text:security" href="https://github.com/security">Security</a></li>
<li class="mr-3 mr-lg-0"><a href="https://githubstatus.com/" data-ga-click="Footer, go to status, text:status">Status</a></li>
<li><a data-ga-click="Footer, go to help, text:help" href="https://help.github.com/">Help</a></li>
</ul>
<a aria-label="Homepage" title="GitHub" class="footer-octicon d-none d-lg-block mx-lg-4" href="https://github.com/">
<svg height="24" class="octicon octicon-mark-github" viewBox="0 0 16 16" version="1.1" width="24" aria-hidden="true"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
</a>
<ul class="list-style-none d-flex flex-wrap col-12 col-lg-5 flex-justify-center flex-lg-justify-between mb-2 mb-lg-0">
<li class="mr-3 mr-lg-0"><a data-ga-click="Footer, go to contact, text:contact" href="https://github.com/contact">Contact GitHub</a></li>
<li class="mr-3 mr-lg-0"><a href="https://github.com/pricing" data-ga-click="Footer, go to Pricing, text:Pricing">Pricing</a></li>
<li class="mr-3 mr-lg-0"><a href="https://developer.github.com/" data-ga-click="Footer, go to api, text:api">API</a></li>
<li class="mr-3 mr-lg-0"><a href="https://training.github.com/" data-ga-click="Footer, go to training, text:training">Training</a></li>
<li class="mr-3 mr-lg-0"><a href="https://github.blog/" data-ga-click="Footer, go to blog, text:blog">Blog</a></li>
<li><a data-ga-click="Footer, go to about, text:about" href="https://github.com/about">About</a></li>
</ul>
</div>
<div class="d-flex flex-justify-center pb-6">
<span class="f6 text-gray-light"></span>
</div>
</div>
<div id="ajax-error-message" class="ajax-error-message flash flash-error">
<svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path></svg>
<button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error">
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
You cant perform that action at this time.
</div>
<script crossorigin="anonymous" async="async" integrity="sha512-WcQmT2vhcClFVOaaAJV/M+HqsJ2Gq/myvl6F3gCVBxykazXTs+i5fvxncSXwyG1CSfcrqmLFw/R/bmFYzprX2A==" type="application/javascript" id="js-conditional-compat" data-src="https://github.githubassets.com/assets/compat-bootstrap-59c4264f.js"></script>
<script crossorigin="anonymous" integrity="sha512-47cvnR4cfmRA+p1TUeCLY+nCEqD7tni9XPMTW5kLy2C4SUhMCAw0NWiKqvZEM0iZRBw+8u8DgeD30fC56eV02w==" type="application/javascript" src="releases_files/environment-bootstrap-e3b72f9d.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-jfR+4VdZuPf5Ck+JA3AZuzWGHz9Sb21keZOYuMoNdfMJovIUb9vxfSdvNSchxAwj5oav48KBfa54+wbuuW8Tlg==" type="application/javascript" src="releases_files/vendor-8df47ee1.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-v96znx7UoCTT9x5ExGL602c2pkjISH54Zz3tEp0/+OfmPEvofzbEEEmc1kpAj9FUQ7kCho2vcC7kp3FCGtdCdg==" type="application/javascript" src="releases_files/frameworks-bfdeb39f.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-Oe2GeXw7ypGUUonIuSIgfJmpcUkKTlEBAy7JaWL0TEKqOqvxoULoCX7IMf+0a0D+/P7xxuucR8IGFutcx+q+7A==" type="application/javascript" src="releases_files/github-bootstrap-39ed8679.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-4GcSWGoe36+BoWho4gtJcByZe8j43w+lt2/PDe3rmBxRVSgD29YipDwuIywe8fvOd2b2CszBqaPGxSznUtE3Xg==" type="application/javascript" data-module-id="./drag-drop.js" data-src="https://github.githubassets.com/assets/drag-drop-e0671258.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-3Vk1NFIOm+TBUMM6pTA6DCUwwLLnc/QIT8jpENm71InvSU8O4p2plDagpst1tH1l+9jOBnneaXZnAskA9a2b3w==" type="application/javascript" data-module-id="./gist-vendor.js" data-src="https://github.githubassets.com/assets/gist-vendor-dd593534.js"></script>
<script crossorigin="anonymous" async="async" integrity="sha512-iv+4yAluOjiG50ZypUBIWIUCRDo6JEBf2twvmd5AelxgPQJO/XC1oNMGTMdDfKt30p7G7fHEOTZ2utHWDJ9PPQ==" type="application/javascript" data-module-id="./randomColor.js" data-src="https://github.githubassets.com/assets/randomColor-8affb8c8.js"></script>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden="">
<svg class="octicon octicon-alert" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path></svg>
<span class="js-stale-session-flash-signed-in" hidden="">You signed in with another tab or window. <a href="">Reload</a> to refresh your session.</span>
<span class="js-stale-session-flash-signed-out" hidden="">You signed out in another tab or window. <a href="">Reload</a> to refresh your session.</span>
</div>
<template id="site-details-dialog">
<details class="details-reset details-overlay details-overlay-dark lh-default text-gray-dark hx_rsm" open="">
<summary role="button" aria-label="Close dialog"></summary>
<details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal">
<button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog="">
<svg class="octicon octicon-x" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg>
</button>
<div class="octocat-spinner my-6 js-details-dialog-spinner"></div>
</details-dialog>
</details>
</template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0">
<div class="Popover-message Popover-message--bottom-left Popover-message--large Box box-shadow-large" style="width:360px;">
</div>
</div>
<div aria-live="polite" class="sr-only"></div></body></html>