# frontend API

**URL:** https://dev-discuss.pytorch.org/c/eager/7.md?page=1

[Latest](https://dev-discuss.pytorch.org/latest.md) · [Categories](https://dev-discuss.pytorch.org/categories.md)

**Page:** 2

---

## [Torch.nn H2 2021 Lookback and H1 2022 Lookahead](https://dev-discuss.pytorch.org/t/torch-nn-h2-2021-lookback-and-h1-2022-lookahead/477)

<div class="topic-metadata">

**Author:** [@jbschlosser](https://dev-discuss.pytorch.org/u/jbschlosser)\
**Replies:** 0\
**Last updated:** [January 14, 2022, 5:10pm UTC](https://dev-discuss.pytorch.org/t/torch-nn-h2-2021-lookback-and-h1-2022-lookahead/477 "2022-01-14T17:10:03Z")

</div>

Hey everyone! I wanted to post some quick highlights from the torch.nn work during H2 2021 and the upcoming projects we are looking into for H1 2022. There were some big accomplishments this past half, and we have quite …

---

## [Forward AD: 2021 Retrospective](https://dev-discuss.pytorch.org/t/forward-ad-2021-retrospective/473)

<div class="topic-metadata">

**Author:** [@jw3468](https://dev-discuss.pytorch.org/u/jw3468)\
**Replies:** 0\
**Last updated:** [January 12, 2022, 10:49pm UTC](https://dev-discuss.pytorch.org/t/forward-ad-2021-retrospective/473 "2022-01-12T22:49:27Z")

</div>

Hi everyone! Here’s an update on forward AD, a new major feature in autograd first shared at the beginning of 2021 (RFC) providing significant speedup and memory improvements in some use cases. In our last update forward…

---

## [How to read the autograd codebase](https://dev-discuss.pytorch.org/t/how-to-read-the-autograd-codebase/383)

<div class="topic-metadata">

**Author:** [@albanD](https://dev-discuss.pytorch.org/u/albanD)\
**Replies:** 1\
**Last updated:** [October 26, 2021, 3:36pm UTC](https://dev-discuss.pytorch.org/t/how-to-read-the-autograd-codebase/383 "2021-10-26T15:36:12Z")

</div>

How to read the autograd code in PyTorch This document will try to give you a good idea of how to browse the autograd-related source in PyTorch The goal is to get you familiar with what the key pieces are, where they are…

---

## [Tensor subclass now support deepcopy!](https://dev-discuss.pytorch.org/t/tensor-subclass-now-support-deepcopy/365)

<div class="topic-metadata">

**Author:** [@albanD](https://dev-discuss.pytorch.org/u/albanD)\
**Replies:** 0\
**Last updated:** [September 28, 2021, 9:48pm UTC](https://dev-discuss.pytorch.org/t/tensor-subclass-now-support-deepcopy/365 "2021-09-28T21:48:57Z")

</div>

As part of our work to increase the coverage for Tensor subclass significantly, we now have proper serialization and deepcopy support for them! add deepcopy support to subclasses by albanD · Pull Request #65584 · pytorch…

---

## [State of PyTorch core: September 2021 edition](https://dev-discuss.pytorch.org/t/state-of-pytorch-core-september-2021-edition/332)

<div class="topic-metadata">

**Author:** [@ezyang](https://dev-discuss.pytorch.org/u/ezyang)\
**Replies:** 1\
**Last updated:** [September 21, 2021, 9:56pm UTC](https://dev-discuss.pytorch.org/t/state-of-pytorch-core-september-2021-edition/332 "2021-09-21T21:56:25Z")

</div>

State of PyTorch core: September 2021 edition There are a lot of projects currently going on in PyTorch core and it can be difficult to keep track of all of them or how they relate with each other. Here is my personal un…

---

## [Torch.nn September Update](https://dev-discuss.pytorch.org/t/torch-nn-september-update/353)

<div class="topic-metadata">

**Author:** [@jbschlosser](https://dev-discuss.pytorch.org/u/jbschlosser)\
**Replies:** 0\
**Last updated:** [September 16, 2021, 2:17pm UTC](https://dev-discuss.pytorch.org/t/torch-nn-september-update/353 "2021-09-16T14:17:33Z")

</div>

torch.nn September Update Hey everyone! Here’s an update with some torch.nn-related highlights: Long-standing issues Notably, support for label smoothing in nn.CrossEntropyLoss has finally landed! This was a popular re…

---

## [Functorch: Levels as dynamically allocated classes](https://dev-discuss.pytorch.org/t/functorch-levels-as-dynamically-allocated-classes/294)

<div class="topic-metadata">

**Author:** [@ezyang](https://dev-discuss.pytorch.org/u/ezyang)\
**Replies:** 1\
**Last updated:** [September 15, 2021, 5:54pm UTC](https://dev-discuss.pytorch.org/t/functorch-levels-as-dynamically-allocated-classes/294 "2021-09-15T17:54:16Z")

</div>

Functorch: Levels as dynamically allocated classes Abstract: functorch does not need to manually implement levels and internally dispatch to the appropriate functorch transformation for a level; the existing types dispat…

---

## [Structured kernels and meta tensors: September 2021 status report](https://dev-discuss.pytorch.org/t/structured-kernels-and-meta-tensors-september-2021-status-report/325)

<div class="topic-metadata">

**Author:** [@ezyang](https://dev-discuss.pytorch.org/u/ezyang)\
**Replies:** 0\
**Last updated:** [September 8, 2021, 4:59pm UTC](https://dev-discuss.pytorch.org/t/structured-kernels-and-meta-tensors-september-2021-status-report/325 "2021-09-08T16:59:38Z")

</div>

With Brian Hirsh, Meghan Lele, Heitor Schueroff, Maksim Levental, Natalia Gimelshein, Zheng Yan, Jeffrey Wan, Rong Rong, Basil Hosmer, Joel Schlosser, Alex Suhan, Kushashwa Ravi Shrimali, Yukio Siraichi, Ivan Yashchuk, K…

---

## [PyTorch hooks Part 2: nn.Module hooks](https://dev-discuss.pytorch.org/t/pytorch-hooks-part-2-nn-module-hooks/250)

<div class="topic-metadata">

**Author:** [@albanD](https://dev-discuss.pytorch.org/u/albanD)\
**Replies:** 0\
**Last updated:** [June 18, 2021, 3:12pm UTC](https://dev-discuss.pytorch.org/t/pytorch-hooks-part-2-nn-module-hooks/250 "2021-06-18T15:12:19Z")

</div>

This section is going to present how the forward and backward hooks on Modules work. General idea All the hooks on Modules are made possible because, while the user implements the forward() function to specify what shou…

---

## [PyTorch hooks Part 1: All the available hooks](https://dev-discuss.pytorch.org/t/pytorch-hooks-part-1-all-the-available-hooks/246)

<div class="topic-metadata">

**Author:** [@albanD](https://dev-discuss.pytorch.org/u/albanD)\
**Replies:** 0\
**Last updated:** [June 15, 2021, 9:57pm UTC](https://dev-discuss.pytorch.org/t/pytorch-hooks-part-1-all-the-available-hooks/246 "2021-06-15T21:57:48Z")

</div>

The goal of these notes is going to be to dive into the different set of hooks that we have in pytorch and how they’re implemented (with a specific focus on autograd and torch.nn hooks). This first part is an exhaustive…

---

## [Device check will be automatically generated for functions](https://dev-discuss.pytorch.org/t/device-check-will-be-automatically-generated-for-functions/211)

<div class="topic-metadata">

**Author:** [@wenleix](https://dev-discuss.pytorch.org/u/wenleix)\
**Replies:** 0\
**Last updated:** [May 7, 2021, 6:09pm UTC](https://dev-discuss.pytorch.org/t/device-check-will-be-automatically-generated-for-functions/211 "2021-05-07T18:09:03Z")

</div>

With #56872 landed, now functions registered in native\_functions.yaml will have automatically generated check about whether tensor parameters are on the same devices by default. If your function allows tensors on differ…

---

## [RFC: Skip Module Parameter Initialization](https://dev-discuss.pytorch.org/t/rfc-skip-module-parameter-initialization/207)

<div class="topic-metadata">

**Author:** [@jbschlosser](https://dev-discuss.pytorch.org/u/jbschlosser)\
**Replies:** 0\
**Last updated:** [May 5, 2021, 4:46pm UTC](https://dev-discuss.pytorch.org/t/rfc-skip-module-parameter-initialization/207 "2021-05-05T16:46:10Z")

</div>

RFC: SKIP MODULE PARAMETER INITIALIZATION Hey all, I’ve been working on enabling the ability to instantiate PyTorch modules with uninitialized parameters / buffers (see #29523). This functionality helps avoid unnecessary…

---

## [Generalizing AMP to work on CPU](https://dev-discuss.pytorch.org/t/generalizing-amp-to-work-on-cpu/201)

<div class="topic-metadata">

**Author:** [@ezyang](https://dev-discuss.pytorch.org/u/ezyang)\
**Replies:** 0\
**Last updated:** [April 26, 2021, 2:20pm UTC](https://dev-discuss.pytorch.org/t/generalizing-amp-to-work-on-cpu/201 "2021-04-26T14:20:45Z")

</div>

Intel is interested in bringing automatic mixed precision to CPU in \[RFC\] Extend Autocast to CPU/CUDA with BF16 data type · Issue #55374 · pytorch/pytorch · GitHub One big question is what the API for autocasting should …

---

## [What's the deal with shallow\_copy\_and\_detach?](https://dev-discuss.pytorch.org/t/whats-the-deal-with-shallow-copy-and-detach/134)

<div class="topic-metadata">

**Author:** [@MarisaKirisame](https://dev-discuss.pytorch.org/u/MarisaKirisame)\
**Replies:** 1\
**Last updated:** [February 8, 2021, 2:53pm UTC](https://dev-discuss.pytorch.org/t/whats-the-deal-with-shallow-copy-and-detach/134 "2021-02-08T14:53:47Z")

</div>

Hi, I had implemented a new kind of TensorImpl in a separate pytorch branch. Previously, in order to override detach() I override shallow\_copy\_and\_detach(). Now I rebased and it doesnt work (calling detach complain that …

---

## [A simplified introduction to PyTorch's autograd implementation](https://dev-discuss.pytorch.org/t/a-simplified-introduction-to-pytorchs-autograd-implementation/51)

<div class="topic-metadata">

**Author:** [@zdevito](https://dev-discuss.pytorch.org/u/zdevito)\
**Replies:** 6\
**Last updated:** [January 26, 2021, 7:09pm UTC](https://dev-discuss.pytorch.org/t/a-simplified-introduction-to-pytorchs-autograd-implementation/51 "2021-01-26T19:09:28Z")

</div>

Interested in how PyTorch’s autograd works conceptually? Want to understand how TorchScript can fuse operations even when they are recording gradient? I put together an executable notebook, Simple Grad, that walks thro…

---

## [Some more complex autograd use cases](https://dev-discuss.pytorch.org/t/some-more-complex-autograd-use-cases/62)

<div class="topic-metadata">

**Author:** [@albanD](https://dev-discuss.pytorch.org/u/albanD)\
**Replies:** 0\
**Last updated:** [January 25, 2021, 5:02pm UTC](https://dev-discuss.pytorch.org/t/some-more-complex-autograd-use-cases/62 "2021-01-25T17:02:32Z")

</div>

When discussing the ML Compute (Apple ML library) integration, I made this description of some of the more complex use cases for the autograd. This might be interesting to other to looks at, link here. Feel free to ask…

[Previous page](https://dev-discuss.pytorch.org/c/eager/7.md)
