docs: fix typos (#164879)

Correct typos in the comments

Pull Request resolved: https://github.com/pytorch/pytorch/pull/164879
Approved by: https://github.com/Lucaskabela, https://github.com/mlazos, https://github.com/cyyever
This commit is contained in:
Roman Krasavtsev 2025-10-28 12:00:36 +00:00 committed by PyTorch MergeBot
parent be28329710
commit e137cd0a10
10 changed files with 10 additions and 10 deletions

View File

@ -522,7 +522,7 @@ class TestCUDA(JitTestCase):
self.assertGreater(test_event(), 0)
# Check for stream synchronization , when a large tensor multiplication is
# computed on the stream. The stream.query should be true once the synchroniztion is done
# computed on the stream. The stream.query should be true once the synchronization is done
@torch.jit.script
def test_stream_synchronize() -> float:
device_index = torch.cuda.current_device()

View File

@ -3662,7 +3662,7 @@ def forward(self, arg0_1: "i64[2][1]cpu", arg1_1: "Sym(u2)", arg2_1: "Sym(u3)",
self.assertEqual(result_compiled, result_eager)
self.assertEqual(cnt.frame_count, 1)
# Pass a contiguous tensor. A recompilation will happen due to 0/1 speciialization on stride.
# Pass a contiguous tensor. A recompilation will happen due to 0/1 specialization on stride.
log_stream, ctx = logs_to_string(
"torch._functorch._aot_autograd.graph_capture", "aot_graphs"
)

View File

@ -5661,7 +5661,7 @@ class TestLinalg(TestCase):
# TunableOp is running in a subprocess
# online tuning needs filename set through API
# offline tuning needs filename set through environment variableq
# offline tuning needs filename set through environment variable
result_filename = torch.cuda.tunable.get_filename()
untuned_filename = get_tunableop_untuned_filename()

View File

@ -307,7 +307,7 @@ class TestPromotion(TestCase):
)
def test_permutations_do_not_influence_result(self, dtypes, expected):
# Tests that most permutations do not influence the result. In the
# above some uint and int combintations promote to a larger integer
# above some uint and int combinations promote to a larger integer
# type, which would then promote to a larger than necessary float.
for perm in permutations(dtypes):
assert np.result_type(*perm) == expected

View File

@ -3664,7 +3664,7 @@ class CheckFunctionManager:
# increase in compile time. We first do a cache flush to measure the
# guard latency more accurately. This cache flush is expensive.
# Note - If you are working on a guard optimization, it might be a
# good idea to increase this number for more stabiilty during
# good idea to increase this number for more stability during
# development.
latency = profile_guard_manager(
self.guard_manager.root, output_graph.local_scope, 1

View File

@ -1619,7 +1619,7 @@ For now, dynamo will explicitly graph break when it encounters user code with th
# take the conservative approach to graph break on size changes, and
# assume other cases can fall through soundly.
#
# Note that although these tensor variablels would hold different
# Note that although these tensor variables would hold different
# proxies, the in-place mutation semantics is preserved in the FX
# graph, so we won't have correctness issues.
if isinstance(saved_out_shapes, list):

View File

@ -156,7 +156,7 @@ class TokenArgument:
# This is use for storing the contents of a list which contain optional tensors
# (Tensor?[], ex. [Tensor, None, ...]), where the list will be serialized to the
# type List[OptionalTensorArgument], with tensor values seiralized to the
# type List[OptionalTensorArgument], with tensor values serialized to the
# "as_tensor" field, and None values serialized to the "as_none" field.
@_union_dataclass
class OptionalTensorArgument(_Union):

View File

@ -692,7 +692,7 @@ class WhileLoopStackOutputOp(HigherOrderOperator):
#
# idx = 0
# init_grad_carries = grads
# init_grad_additional_inputs = torch.zeros_like(g_additioanl_inputs)
# init_grad_additional_inputs = torch.zeros_like(g_additional_inputs)
# fw_inps = torch.cat([ctx.fw_carried_inputs, fw_outputs[:-1]])
# while_loop(cond_fn, body_fn, (idx, init_grad_carries, init_grad_additional_inputs,), (fw_additional_inputs, fw_inps))

View File

@ -100,7 +100,7 @@ def implements_per_sample_grads(torch_function):
# This is a __torch_function__ object but it could have also been a Tensor Extension
# with a dispatch key.
#
# Needs to be a tensor subclass to allow reparamaterization
# Needs to be a tensor subclass to allow reparameterization
class ExpandedWeight(torch.Tensor):
def __init__(self, orig_weight, batch_size, loss_reduction):
self.batch_size = batch_size

View File

@ -427,7 +427,7 @@ class DTensorTestBase(MultiProcessTestCase):
# For nccl backend, bind the device to the process if device_id is not None
# so the nccl communicator is immediately formed and we can use `ncclCommSplit`
# for form subgroup to avoid unnecesssary overhead.
# for form subgroup to avoid unnecessary overhead.
dist.init_process_group(
backend=backend,
world_size=self.world_size,