e8645fa2b9
[Doc] fix some typos (found by codespell and typos) ( #132544 )
...
Applying doc fixes from PR https://github.com/pytorch/pytorch/pull/127267 - with CLA
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132544
Approved by: https://github.com/kit1980
2024-08-05 17:21:56 +00:00
8d45f555d7
[BE] [1/3] Rewrite super()
calls in caffe2 and benchmarks ( #94587 )
...
Rewrite Python built-in class `super()` calls. Only non-semantic changes should be applied.
- #94587
- #94588
- #94592
Also, methods with only a `super()` call are removed:
```diff
class MyModule(nn.Module):
- def __init__(self):
- super().__init__()
-
def forward(self, ...):
...
```
Some cases that change the semantics should be kept unchanged. E.g.:
f152a79be9/caffe2/python/net_printer.py (L184-L190)
f152a79be9/test/test_jit_fuser_te.py (L2628-L2635)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94587
Approved by: https://github.com/ezyang
2023-02-11 18:19:48 +00:00
25725fd624
(Re-open) Adds cudaMallocAsync as an alternative backend for the CUDA allocator ( #82682 )
...
Rebased version of @mcarilli 's cudaMallocAsync #65365 for continued testing
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82682
Approved by: https://github.com/ngimel
2022-10-12 03:44:21 +00:00
74e6d2ce67
fix typos in jit_language_reference.rst ( #68706 )
...
Summary:
Fixes https://github.com/pytorch/pytorch/issues/68700
- indent problem
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68706
Reviewed By: mruberry
Differential Revision: D32598916
Pulled By: jbschlosser
fbshipit-source-id: 42af216e83fb48bbd311fc3d41fc3e8f5a2fef08
2021-11-22 19:09:06 -08:00
ff125a3624
Minor changes in documentation ( #68557 )
...
Summary:
Fixed some small typos
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68557
Reviewed By: mruberry
Differential Revision: D32538749
Pulled By: ngimel
fbshipit-source-id: 09a9cd4031463b6a40d7307bd8fcb7d364444ac3
2021-11-18 17:57:16 -08:00
693fe2fd9b
docs: Added Union to supported types in documentation ( #68435 )
...
Summary:
This PR simply updates the documentation following up on https://github.com/pytorch/pytorch/pull/64234 , by adding `Union` as a supported type.
Any feedback is welcome!
cc ansley albanD gmagogsfm
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68435
Reviewed By: davidberard98
Differential Revision: D32494271
Pulled By: ansley
fbshipit-source-id: c3e4806d8632e1513257f0295568a20f92dea297
2021-11-17 10:26:31 -08:00
6ed68f3f84
Document torch.jit.is_tracing()
( #67326 )
...
Summary:
This PR adds `torch.jit.is_tracing()` to the JIT API reference.
This function is widely used but left undocumented: https://github.com/search?q=torch.jit.is_tracing&type=code
Pull Request resolved: https://github.com/pytorch/pytorch/pull/67326
Reviewed By: tugsbayasgalan
Differential Revision: D31985251
Pulled By: Krovatkin
fbshipit-source-id: 852b432b08d63df8bd7a7a02c9555e61f5f37978
2021-10-28 09:56:09 -07:00
0d981eea6c
add type annotations to torch.nn.modules.conv ( #49564 )
...
Summary:
closes gh-49563
Pull Request resolved: https://github.com/pytorch/pytorch/pull/49564
Reviewed By: albanD
Differential Revision: D25917441
Pulled By: walterddr
fbshipit-source-id: 491dc06cfc1bbf694dfd9ccefca4f55488a931b2
2021-01-15 11:16:11 -08:00
4af4b71fdc
[JIT] Update docs for recently added features ( #45232 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45232
**Summary**
This commit updates the TorchScript language reference to include
documentation on recently-added TorchScript enums. It also removed
`torch.no_grad` from the list of known unsupported `torch` modules and
classes because it is now supported.
**Test Plan**
Continuous integration.
Test Plan: Imported from OSS
Reviewed By: ZolotukhinM
Differential Revision: D23971884
Pulled By: SplitInfinity
fbshipit-source-id: 5e2c164ed59bc0926b11201106952cff86e9356e
2020-09-28 18:17:42 -07:00
e3cb582e05
Error printing extension support for multiline errors ( #43807 )
...
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/43807
Test Plan: Imported from OSS
Reviewed By: gmagogsfm
Differential Revision: D23407457
Pulled By: Lilyjjo
fbshipit-source-id: 05a6a50dc39c00474d9087ef56028a2c183aa53a
2020-09-01 10:02:43 -07:00
4fef3763dd
Revert "Revert D21337640: [pytorch][PR] Split up documentation into subpages and clean up some warnings" ( #37778 )
...
Summary:
Original PR: https://github.com/pytorch/pytorch/pull/37419
cc mattip suo
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37778
Differential Revision: D21385774
Pulled By: ezyang
fbshipit-source-id: 5de532faab8bae132736b6b5189e0ee2ac9935be
2020-05-04 14:32:35 -07:00
20f7e62b1d
Revert D21337640: [pytorch][PR] Split up documentation into subpages and clean up some warnings
...
Test Plan: revert-hammer
Differential Revision:
D21337640
Original commit changeset: d4ad198780c3
fbshipit-source-id: fa9ba6ac542173a50bdb45bfa12f3fec0ed704fb
2020-05-04 10:57:55 -07:00
f10fbcc820
Split up documentation into subpages and clean up some warnings ( #37419 )
...
Summary:
xref gh-32838, gh-34032
This is a major refactor of parts of the documentation to split it up using sphinx's `autosummary` feature which will build out `autofuction` and `autoclass` stub files and link to them. The end result is that the top module pages like torch.nn.rst and torch.rst are now more like table-of-contents to the actual single-class or single-function documentations pages.
Along the way, I modified many of the docstrings to eliminate sphinx warnings when building. I think the only thing I changed from a non-documentation perspective is to add names to `__all__` when adding them to `globals()` in `torch.__init__.py`
I do not know the CI system: are the documentation build artifacts available after the build, so reviewers can preview before merging?
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37419
Differential Revision: D21337640
Pulled By: ezyang
fbshipit-source-id: d4ad198780c3ae7a96a9f22651e00ff2d31a0c0f
2020-05-04 09:39:22 -07:00
ac950bb9c8
Update docs for master to remove Python 2 references ( #36336 )
...
Summary:
Fix compile error from original PR in jit_language_references.rst: https://github.com/pytorch/pytorch/pull/36114
Full details in task: https://our.intern.facebook.com/intern/tasks/?t=64776265
With pytroch 1.5+ we remove python2 support from PyTorch. All documentation under docs/ and on the pytorch.org website needs to remove Python 2 references.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36336
Differential Revision: D21057507
Pulled By: jlin27
fbshipit-source-id: 993a763f1ecb16dad859bc02a07625ddc023645d
2020-04-16 10:15:48 -07:00
6016f694c0
Revert D20901746: [pytorch][PR] Update docs for master to remove Python 2 references
...
Test Plan: revert-hammer
Differential Revision:
D20901746
Original commit changeset: 07f8dc8e6fab
fbshipit-source-id: 13c55597f9f79b8473210cf35a5a0f1fb34bae39
2020-04-08 14:49:11 -07:00
43234be525
Update docs for master to remove Python 2 references ( #36114 )
...
Summary:
Full details in task: https://our.intern.facebook.com/intern/tasks/?t=64776265
With pytroch 1.5+ we remove python2 support from PyTorch. All documentation under docs/ and on the pytorch.org website needs to remove Python 2 references.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36114
Differential Revision: D20901746
Pulled By: jlin27
fbshipit-source-id: 07f8dc8e6fab0b232e5048a63079cab0c433c85f
2020-04-07 16:13:18 -07:00
dc3d47110a
[docs] add experimental warning to TorchScript classes in language reference ( #33697 )
...
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/33697
reference
Test Plan: Imported from OSS
Differential Revision: D20070220
Pulled By: suo
fbshipit-source-id: 9828d876afed59203cc472eaf0134d52d399069e
2020-02-24 14:01:19 -08:00
503a4e9019
Cleanup after moving language reference ( #31146 )
...
Summary:
Stacked PRs
* **#31146 - [jit] Cleanup after moving language reference**
* #31138 - [jit] Move TorchScript language reference to its own page
Preview: https://driazati.github.io/pytorch_doc_previews/jit.html#torchscript-language
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31146
Pulled By: driazati
Differential Revision: D19167390
fbshipit-source-id: f28daed36754a553264fc8ac142ed22c3e26d63e
2019-12-18 15:09:35 -08:00
ae2487bf4d
Move TorchScript language reference to its own page ( #31138 )
...
Summary:
Stacked PRs
* #31146 - [jit] Cleanup after moving language reference
* **#31138 - [jit] Move TorchScript language reference to its own page**
Preview: https://driazati.github.io/pytorch_doc_previews/jit.html#torchscript-language
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31138
Pulled By: driazati
Differential Revision: D19167375
fbshipit-source-id: d37110d85fc8b8d2c741be49846e873de1357c2a
2019-12-18 15:09:31 -08:00
3e59e80429
Revert D18941024: Move TorchScript language reference to its own page
...
Test Plan: revert-hammer
Differential Revision:
D18941024
Original commit changeset: d0ff600870a1
fbshipit-source-id: 01c0eac4c9741f27b91d710616e71a0d769f6f6a
2019-12-18 08:55:50 -08:00
c05538b831
Move TorchScript language reference to its own page ( #31138 )
...
Summary:
Preview: https://driazati.github.io/pytorch_doc_previews/jit.html#torchscript-language
](https://our.intern.facebook.com/intern/diff/18941024/ )
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31138
Pulled By: driazati
Differential Revision: D18941024
fbshipit-source-id: d0ff600870a14c4a7c6ce54867d152072a12c48c
2019-12-18 00:46:19 -08:00