Revert "Add deterministic path for CUDA cumsum (#136224)"

This reverts commit d45b0151e5d9a9358368b9fbd7fa454edd5d9709.

Reverted https://github.com/pytorch/pytorch/pull/136224 on behalf of https://github.com/atalman due to Failing internall CI ([comment](https://github.com/pytorch/pytorch/pull/136224#issuecomment-2369244135))
This commit is contained in:
PyTorch MergeBot
2024-09-23 19:57:13 +00:00
parent 08dba25775
commit fd182b90a7
9 changed files with 45 additions and 105 deletions

View File

@ -3317,6 +3317,38 @@ Example::
""".format(**reduceops_common_args),
)
add_docstr(
torch.cumsum,
r"""
cumsum(input, dim, *, dtype=None, out=None) -> Tensor
Returns the cumulative sum of elements of :attr:`input` in the dimension
:attr:`dim`.
For example, if :attr:`input` is a vector of size N, the result will also be
a vector of size N, with elements.
.. math::
y_i = x_1 + x_2 + x_3 + \dots + x_i
Args:
{input}
dim (int): the dimension to do the operation over
Keyword args:
{dtype}
{out}
Example::
>>> a = torch.randint(1, 20, (10,))
>>> a
tensor([13, 7, 3, 10, 13, 3, 15, 10, 9, 10])
>>> torch.cumsum(a, dim=0)
tensor([13, 20, 23, 33, 46, 49, 64, 74, 83, 93])
""".format(**reduceops_common_args),
)
add_docstr(
torch.count_nonzero,
r"""