Skip to content

Commit 703cfdc

Browse files
garymmfacebook-github-bot
authored andcommitted
[JIT] improve documentation (pytorch#57991)
Summary: * Fix lots of links. * Minor improvements for consistency, clarity or grammar. * Update jit_python_reference to note the limitations on __exit__. (Related to pytorch#41420). * Fix a comment in exit_transforms.cpp: removed the word "not" which made the comment say the opposite of the truth. Pull Request resolved: pytorch#57991 Reviewed By: malfet Differential Revision: D28522247 Pulled By: SplitInfinity fbshipit-source-id: fc63a59d19ea6c89f957c9f7d451be17d1c5fc91
1 parent 79a258f commit 703cfdc

File tree

6 files changed

+199
-196
lines changed

6 files changed

+199
-196
lines changed

aten/src/ATen/core/ivalue_inl.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,9 @@ struct C10_EXPORT ivalue::Future final : c10::intrusive_ptr_target {
428428
// log errors and thats why we have this log here.
429429
std::string msg = c10::str(
430430
"Skipping setting following error on the Future since "
431-
"it is already marked completed (this is not neccessarily "
432-
"an error):\n", tryRetrieveErrorMessageInternal(eptr));
431+
"it is already marked completed (this is not necessarily "
432+
"an error):\n",
433+
tryRetrieveErrorMessageInternal(eptr));
433434
if (eptr_) {
434435
msg += c10::str(
435436
", \nOriginal exception:\n",
@@ -572,7 +573,7 @@ struct C10_EXPORT ivalue::Future final : c10::intrusive_ptr_target {
572573

573574
// This method should be called before this future's value is used, as it
574575
// ensures that the CUDA streams that are "current" at the callsite properly
575-
// synchonize with the value.
576+
// synchronize with the value.
576577
void synchronizeWithCurrentStreams() {
577578
for (c10::Event& event : events_) {
578579
event.block(impl_.getStream(event.device()));

docs/source/jit_python_reference.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ support in TorchScript. The categorizations are as follows:
395395
- Not Supported
396396
-
397397
* - `8.5. The with statement <https://docs.python.org/3/reference/compound_stmts.html#the-with-statement>`_
398-
- Supported
399-
-
398+
- Partially Supported
399+
- ``__exit__`` is always called with ``exc_type``, ``exc_value``, and ``traceback`` set to None, even if an exception was raised, and ``__exit__``'s return value is ignored.
400400
* - `8.6. Function definitions <https://docs.python.org/3/reference/compound_stmts.html#function-definitions>`_
401401
- Not Supported
402402
-

0 commit comments

Comments
 (0)