mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Unconditionally exclude upper bound in all size oblivious tests (#144867)
I was thinking about https://github.com/pytorch/pytorch/pull/144471 some more and I thought, "Hmm, why not just always exclude the constant upper bound." So here it is. Signed-off-by: Edward Z. Yang <ezyang@meta.com> Pull Request resolved: https://github.com/pytorch/pytorch/pull/144867 Approved by: https://github.com/bobrenjc93
This commit is contained in:
committed by
PyTorch MergeBot
parent
df67ac4c86
commit
323fb4dad0
@ -1664,8 +1664,9 @@ def _check_is_size(i, message=None, *, max=None):
|
||||
|
||||
When max is not None, this specifies an upper bound equivalent to
|
||||
``_check(i <= max)``. This bound is also subject to alternate semantics:
|
||||
in ``guard_size_oblivious`` tests, we assume that the max bound is treated
|
||||
equivalently to all other values.
|
||||
in ``guard_size_oblivious`` tests, we assume that a constant max bound is
|
||||
treated equivalently to all other values. Symbolic max bounds are not yet
|
||||
supported.
|
||||
|
||||
NB: Do NOT use this in contexts where a -1 size would be valid (indicating
|
||||
to infer the size from context, or if you should wrap-around or truncate).
|
||||
|
Reference in New Issue
Block a user