Skip to content

Commit c77442b

Browse files
Fix typos and spelling mistakes across docs, comments, and logs (pytorch#20758)
Fixes multiple typos and spelling mistakes across several files (including program.fbs, external_constants_pass.py, test_partitioner.py, training_module_test.cpp, clamp_hardswish_pass.py, replacement_pass.py, vulkan_preprocess.py, vulkan_compute_api_test.cpp, XNNCompiler.cpp, upsample_bilinear2d_converter.py, test_fuse_batchnorm_pass.py, conftest.py, README.md, tester.py, test_reporting.py, reporting.py) to improve code readability and documentation quality. cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani
1 parent 636daf1 commit c77442b

20 files changed

Lines changed: 27 additions & 27 deletions

File tree

backends/arm/test/passes/test_fuse_batchnorm_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:
143143
z = self.conv2d2(x)
144144
a = self.batch_norm2d(
145145
y
146-
) # Can be fused despite paramters of conv2d2 having multiple users.
146+
) # Can be fused despite parameters of conv2d2 having multiple users.
147147

148148
return z, a
149149

backends/arm/test/quantizer/test_selective_quantization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def test_multiple_folded_get_attr():
324324
node targets are deleted as soon as there is one get_attr node w/o users
325325
using the target.
326326
327-
If there are multiple get_attr nodes refering the same target such as in
327+
If there are multiple get_attr nodes referring the same target such as in
328328
this test, the function crashes if no workaround is present.
329329
330330
"""

backends/cortex_m/passes/clamp_hardswish_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ClampHardswishPass(ExportPass):
1616
"""
1717
Adds a clamp operation before hardswish to ensure input is in the range [-3, inf).
1818
19-
By doing this before quantization the output range of the preceeding op is minimized,
19+
By doing this before quantization the output range of the preceding op is minimized,
2020
potentially improving accuracy.
2121
"""
2222

backends/cuda/triton/replacement_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def _pick_sdpa_kernel(node: Node):
9797
allocating partial buffers and running the reduction kernel.
9898
9999
TODO(gasoonjia): Benchmarking to determine the optimal
100-
implmentation for each shape.
100+
implementation for each shape.
101101
"""
102102
q_shape = node.args[0].meta["val"].shape
103103
k_shape = node.args[1].meta["val"].shape

backends/nxp/backend/ir/converter/node_converters/ops_converters/upsample_bilinear2d_converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def convert(self, node: Node):
113113
x = t_op.tmp_inputs[0]
114114
y = t_op.tmp_outputs[0]
115115

116-
# ExecuTorch has 1 paramter (align_corners). NeutronIR has 2 parameters (align_corners, half_pixel_centers).
116+
# ExecuTorch has 1 parameter (align_corners). NeutronIR has 2 parameters (align_corners, half_pixel_centers).
117117
# In ExecuTorch, the pixel compute scale is:
118118
# `(input_size - 1) / (output_size - 1)` if align_corners else `input_size / output_size`
119119
# https://github.com/pytorch/executorch/blob/v1.1.0/kernels/portable/cpu/util/upsample_util.h#L65

backends/nxp/quantizer/patterns.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
@dataclass
4444
class NodeArgsIdx:
4545
"""
46-
Specifies indexes to args paramater of Node in node input annotation.
46+
Specifies indexes to args parameter of Node in node input annotation.
4747
4848
4949
Attributes:
50-
idx (int): Index to Node's args paramater (list). Selects an input Node or a list of Nodes at the index.
50+
idx (int): Index to Node's args parameter (list). Selects an input Node or a list of Nodes at the index.
5151
inner_idx (int): If specified, index to a list pointed by 'idx' attribute. Selects an input Node at the index.
5252
Default: None.
5353
"""

backends/openvino/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Follow the steps below to setup your build environment:
126126
```bash
127127
openvino_build.sh
128128
```
129-
- Optionally, `openvino_build.sh` script can be used to build python package or C++ libraries/binaries seperately.
129+
- Optionally, `openvino_build.sh` script can be used to build python package or C++ libraries/binaries separately.
130130

131131
**Build OpenVINO Backend Python Package with Pybindings**: To build and install the OpenVINO backend Python package with Python bindings, run the `openvino_build.sh` script with the `--enable_python` argument as shown in the below command. This will compile and install the ExecuTorch Python package with the OpenVINO backend into your Python environment. This option will also enable python bindings required to execute OpenVINO backend tests and `aot_optimize_and_infer.py` script inside `executorch/examples/openvino` folder.
132132
```bash

backends/qualcomm/tests/rework/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ def temp_attribute(obj, attr, new_value):
244244
)
245245

246246

247-
# No direct depedency between qnn_config and global_setup.
248-
# Keep following depedency for better practice so global_setup is done first.
247+
# No direct dependency between qnn_config and global_setup.
248+
# Keep following dependency for better practice so global_setup is done first.
249249
@pytest.fixture(autouse=True, scope="session")
250250
def qnn_config(global_setup, request):
251251
# generate QnnConfig for on-device test

backends/test/harness/tester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def check_count(self, input: Dict[Any, int]):
287287
return self
288288

289289
def check_node_count(self, input: Dict[Any, int]):
290-
# Count the occurances of each target in the graph.
290+
# Count the occurrences of each target in the graph.
291291
target_ops = [
292292
node.target
293293
for node in self.stages[self.cur].graph_module.graph.nodes

backends/test/suite/reporting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ class TestCaseSummary:
196196
""" The total runtime of the to_edge_transform_and_lower stage, or none, if the test did not run the quantize stage. """
197197

198198
delegated_op_counts: Counter | None = None
199-
""" The number of delegated occurances of each operator in the graph. """
199+
""" The number of delegated occurrences of each operator in the graph. """
200200

201201
undelegated_op_counts: Counter | None = None
202-
""" The number of undelegated occurances of each operator in the graph. """
202+
""" The number of undelegated occurrences of each operator in the graph. """
203203

204204
pte_size_bytes: int | None = None
205205
""" The size of the PTE file in bytes. """

0 commit comments

Comments
 (0)