Content-Length: 264945 | pFad | http://github.com/pytorch/pytorch/commit/d99e9568ec8cd6906659a251374b23a6396d162e

B5 Add docs for how to mark as unbacked (#154822) · pytorch/pytorch@d99e956 · GitHub
Skip to content

Commit d99e956

Browse files
bobrenjc93pytorchmergebot
authored andcommitted
Add docs for how to mark as unbacked (#154822)
Pull Request resolved: #154822 Approved by: https://github.com/Skylion007 ghstack dependencies: #154802, #154826
1 parent 1258aac commit d99e956

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/source/torch.compiler_dynamic_shapes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ Naively implemented, this is too restrictive: most PyTorch programs will immedia
128128
- Even if nontrivial compute is needed, sometimes a property is never actually queried at all. Making these precomputed properties lazy allows us to avoid guarding on an unbacked symbolic integer unless it is actually needed.
129129
- The data in an integer tensor is generally not known to be non-negative. However, we provide an API ``constrain_range`` whereby a user can specify that a size is bounded above and below by known limits.
130130

131+
Similar to the dynamic APIs, there are corresponding unbacked APIs: namely you can use mark_unbacked instead of ``mark_dynamic`` and ``TORCH_COMPILE_UNBACKED_SOURCES`` instead of ``TORCH_COMPILE_DYNAMIC_SOURCES`` to tell the compiler to mark an input as unbacked.
132+
131133
In future versions of PT2 (beyond PT2.1), we will extend our reasoning system
132134
to infer that an unbacked symbolic integer is size-like based on usage. For
133135
example, if you pass the result of an ``.item()`` call to a factory function

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/pytorch/pytorch/commit/d99e9568ec8cd6906659a251374b23a6396d162e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy