Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
9bow committed Nov 28, 2021
1 parent 4f72864 commit 1e95c9c
Show file tree
Hide file tree
Showing 84 changed files with 6,783 additions and 2,441 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1_TRANSLATE_REQUEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ _(๋ฐ˜๋“œ์‹œ ์ง€ํ‚ค์…”์•ผ ํ•˜๋Š” ์ผ์ •์ด ์•„๋‹™๋‹ˆ๋‹ค - ์ผ์ •์ด ๋„ˆ๋ฌด ๋Šฆ์–ด
## ๊ด€๋ จ ์ด์Šˆ
_ํ˜„์žฌ ๋ฒˆ์—ญ ์š”์ฒญ / ์ง„ํ–‰ ๋‚ด์—ญ์„ ๋ณด๊ธฐ ์œ„ํ•ด ๊ฐ ๋ฒ„์ „์˜ ๋ฉ”์ธ ์ด์Šˆ๋ฅผ ์ฐธ์กฐํ•ฉ๋‹ˆ๋‹ค._ <br />
_(ํŠน๋ณ„ํ•œ ์ผ์ด ์—†๋‹ค๋ฉด ๋ณ€๊ฒฝํ•˜์ง€ ์•Š์œผ์…”๋„ ๋ฉ๋‹ˆ๋‹ค.)_
* ๊ด€๋ จ ์ด์Šˆ: #221 (v1.9)
* ๊ด€๋ จ ์ด์Šˆ: #387 (v1.10)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

PyTorch์—์„œ ์ œ๊ณตํ•˜๋Š” ํŠœํ† ๋ฆฌ์–ผ์˜ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ์„ ์œ„ํ•œ ์ €์žฅ์†Œ์ž…๋‹ˆ๋‹ค.\
๋ฒˆ์—ญ์˜ ๊ฒฐ๊ณผ๋ฌผ์€ [https://tutorials.pytorch.kr](https://tutorials.pytorch.kr)์—์„œ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. (๋ฒˆ์—ญ์„ ์ง„ํ–‰ํ•˜๋ฉฐ **๋ถˆ๊ทœ์น™์ ์œผ๋กœ** ์—…๋ฐ์ดํŠธํ•ฉ๋‹ˆ๋‹ค.)\
ํ˜„์žฌ ๋ฒˆ์—ญ ์ง„ํ–‰ ์ค‘์ธ ๋‚ด์šฉ์€ [#221 ์ด์Šˆ](https://github.com/9bow/PyTorch-tutorials-kr/issues/221)๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.
ํ˜„์žฌ ๋ฒ„์ „์˜ ๋ฒˆ์—ญ / ๋ณ€๊ฒฝ ๊ด€๋ จ ์ด์Šˆ๋Š” [#387 ์ด์Šˆ](https://github.com/9bow/PyTorch-tutorials-kr/issues/387)๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

## ๊ธฐ์—ฌํ•˜๊ธฐ

Expand All @@ -22,7 +22,7 @@ PyTorch์—์„œ ์ œ๊ณตํ•˜๋Š” ํŠœํ† ๋ฆฌ์–ผ์˜ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ์„ ์œ„ํ•œ ์ €์žฅ์†Œ

## ์›๋ฌธ

ํ˜„์žฌ PyTorch v1.9 ํŠœํ† ๋ฆฌ์–ผ ๋ฒˆ์—ญ์ด ์ง„ํ–‰ ์ค‘์ž…๋‹ˆ๋‹ค. ([pytorch/tutorials@24ad87f](https://github.com/pytorch/tutorials/commit/24ad87fdb9e5cd73ed8a27eed1efed6c4a7a1bb5) ๊ธฐ์ค€)
ํ˜„์žฌ PyTorch v1.9 ํŠœํ† ๋ฆฌ์–ผ ๋ฒˆ์—ญ์ด ์ง„ํ–‰ ์ค‘์ž…๋‹ˆ๋‹ค. ([pytorch/tutorials@2571e95](https://github.com/pytorch/tutorials/commit/2571e95df42b8ed46d11ac9827c637fa4e826dfe) ๊ธฐ์ค€)

์ตœ์‹  ๋ฒ„์ „์˜ ํŠœํ† ๋ฆฌ์–ผ(๊ณต์‹, ์˜์–ด)์€ [PyTorch tutorials ์‚ฌ์ดํŠธ](https://pytorch.org/tutorials) ๋ฐ [PyTorch tutorials ์ €์žฅ์†Œ](https://github.com/pytorch/tutorials)๋ฅผ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.

Expand All @@ -31,7 +31,7 @@ PyTorch์—์„œ ์ œ๊ณตํ•˜๋Š” ํŠœํ† ๋ฆฌ์–ผ์˜ ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ์„ ์œ„ํ•œ ์ €์žฅ์†Œ
### PyTorch v1.0 ์ด์ƒ์˜ ํŠœํ† ๋ฆฌ์–ผ ๋ณด๊ธฐ

v1.0 ์ดํ›„ ๋ฒˆ์—ญ์€ ๋ณ„๋„ ์ €์žฅ์†Œ๋กœ ๊ด€๋ฆฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. [์ด ์ €์žฅ์†Œ์˜ Release ๋ฉ”๋‰ด](https://github.com/9bow/PyTorch-tutorials-kr/releases)๋ฅผ ํ™•์ธํ•ด์ฃผ์„ธ์š”. \
`๋ฒ„์ „-base`(์˜ˆ. `1.6-base`)๋Š” ํ•ด๋‹น ๋ฒ„์ „์„ ์‹œ์ž‘ํ•  ๋•Œ์˜ ๋ฆด๋ฆฌ์ฆˆ์ด๊ณ , `๋ฒ„์ „-latest`(์˜ˆ. `1.6-latest`)๋Š” ํ•ด๋‹น ๋ฒ„์ „์˜ ๋งˆ์ง€๋ง‰ ๋ฆด๋ฆฌ์ฆˆ์ž…๋‹ˆ๋‹ค.
`๋ฒ„์ „-base`(์˜ˆ. `1.9-base`)๋Š” ํ•ด๋‹น ๋ฒ„์ „์„ ์‹œ์ž‘ํ•  ๋•Œ์˜ ๋ฆด๋ฆฌ์ฆˆ์ด๊ณ , `๋ฒ„์ „-latest`(์˜ˆ. `1.9-latest`)๋Š” ํ•ด๋‹น ๋ฒ„์ „์˜ ๋งˆ์ง€๋ง‰ ๋ฆด๋ฆฌ์ฆˆ์ž…๋‹ˆ๋‹ค.

ํ•ด๋‹น ๋ฆด๋ฆฌ์ฆˆ์˜ ๋ฌธ์„œ๋ฅผ ๋‚ด๋ ค๋ฐ›์œผ์‹  ํ›„ ๋นŒ๋“œํ•˜์‹œ๋ฉด ํ•ด๋‹น ๋ฒ„์ „์˜ ๋ฌธ์„œ๋ฅผ ํ™•์ธํ•˜์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. \
๋นŒ๋“œ ๋ฐฉ๋ฒ•์€ [๊ธฐ์—ฌํ•˜๊ธฐ ๋ฌธ์„œ์˜ `2-5. (๋‚ด ์ปดํ“จํ„ฐ์—์„œ) ๊ฒฐ๊ณผ ํ™•์ธํ•˜๊ธฐ`](https://github.com/9bow/PyTorch-tutorials-kr/blob/master/CONTRIBUTING.md#2-5-๋‚ด-์ปดํ“จํ„ฐ์—์„œ-๊ฒฐ๊ณผ-ํ™•์ธํ•˜๊ธฐ) ๋ถ€๋ถ„์„ ์ฐธ๊ณ ํ•ด์ฃผ์„ธ์š”.
Expand All @@ -46,5 +46,5 @@ v1.0 ์ดํ›„ ๋ฒˆ์—ญ์€ ๋ณ„๋„ ์ €์žฅ์†Œ๋กœ ๊ด€๋ฆฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. [์ด ์ €์žฅ
| 0.3.1 | [PyTorch-tutorials-kr-0.3.1](https://9bow.github.io/PyTorch-tutorials-kr-0.3.1) | [GitHub ์ €์žฅ์†Œ](https://github.com/9bow/PyTorch-tutorials-kr-0.3.1) |

---
This is a project to translate [pytorch/tutorials@24ad87f](https://github.com/pytorch/tutorials/commit/24ad87fdb9e5cd73ed8a27eed1efed6c4a7a1bb5) into Korean.
This is a project to translate [pytorch/tutorials@2571e95](https://github.com/pytorch/tutorials/commit/2571e95df42b8ed46d11ac9827c637fa4e826dfe) into Korean.
For the latest version, please visit to the [official PyTorch tutorials repo](https://github.com/pytorch/tutorials).
Binary file modified _static/img/profiler_callstack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/img/profiler_kernel_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_memory_curve_selecting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_memory_curve_single.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/img/profiler_memory_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/img/profiler_operator_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/img/profiler_overview1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/img/profiler_overview2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/profiler_trace_view_fwd_bwd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified _static/img/profiler_views_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/thumbnails/cropped/torchaudio-asr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/img/tts_pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions advanced_source/dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,57 @@ speaking, the structure of your registrations will look like this:
that provides implementations for all basic operators on the XLA dispatch
key.


For operators that do not need autograd
---------------------------------------

Note: This section only applies to versions of PyTorch ``>= 1.10``.

In the next section, we will discuss how to add autograd support to an operator.
But for the ops that do not need autograd support, the following kernel should be
registered improve useability and make your op behave like PyTorch's built-in
operators.

.. code-block:: cpp
TORCH_LIBRARY_IMPL(myops, Autograd, m) {
m.impl(op, autogradNotImplementedFallback());
}
The above lines registers an ``Autograd`` kernel that appends a dummy
``NotImplemented`` node on forward (preserving the ``require_grad``-ness of the inputs).
On backward, the ``NotImplemented`` node raises an error. This can be helpful
for debugging in larger models where previously it can be hard to pin-point
exactly where the ``requires_grad``-ness is lost during the forward pass.

In-place or view ops
^^^^^^^^^^^^^^^^^^^

To ensure correctness and best possible performance, if your op mutates an input
in-place or returns a tensor that aliases with one of the inputs, two additional
steps should be taken:

1. Register an ``ADInplaceOrView`` kernel in addition to the ``Autograd`` kernel
above. This kernel handles the necessary bookkeeping to ensure the correctness
of in-place or view operations. It is important to note that this ADInplaceOrView
kernel should only be used with ``autogradNotImplementedFallback``.

.. code-block:: cpp
TORCH_LIBRARY_IMPL(myops, Autograd, m) {
m.impl(op, autogradNotImplementedFallback());
}
TORCH_LIBRARY_IMPL(myops, ADInplaceOrView, m) {
m.impl(op, autogradNotImplementedInplaceOrViewFallback());
}
2. The ``Autograd`` or ``ADInplaceOrView`` boxed kernels registered above
rely on operator schema information in their logi. If your op mutates an input
in-place or returns a tensor that aliases with one of the inputs it is important to
ensure that your schema properly reflects this. See
`here <https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/README.md>`_
for more information on how to annotate the schema.

.. _autograd-support:

Adding autograd support
Expand Down
Loading

0 comments on commit 1e95c9c

Please sign in to comment.