Skip to content

Commit 8162f41

Browse files
kiszkpytorchmergebot
authored andcommitted
Fix typo under c10 directory (pytorch#111155)
This PR fixes typo in comments and messages in files under `c10` directory. Pull Request resolved: pytorch#111155 Approved by: https://github.com/Skylion007
1 parent ac48c11 commit 8162f41

8 files changed

+14
-14
lines changed

c10/core/DispatchKey.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace c10 {
1717
// a DispatchKeySet. The bits in the DispatchKeySet are split between the bottom
1818
// ~12 "BackendComponent" bits, while the remaining upper bits are assigned to
1919
// functionalities. When we encounter a functionality bit that is known to be
20-
// customizeable per-backend, then we also look at the lower BackendComponent
20+
// customizable per-backend, then we also look at the lower BackendComponent
2121
// bits and take the highest bit to determine which backend's implementation to
2222
// use.
2323

c10/core/DispatchKeySet.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ C10_ALWAYS_INLINE static const std::
112112
// Sparse, Quantized, AutogradFunctionality, ...). These keys together allow
113113
// every dispatcher operator to be customized in up to 12*4 different ways. Each
114114
// of those requires a slot in the operator table of every dispatcher operator.
115-
// Not every piece of functionality necessarily needs to be customizeable
115+
// Not every piece of functionality necessarily needs to be customizable
116116
// per-backend, and not every backend necessarily needs to be able to customize
117117
// every type of functionality.
118118
//
@@ -128,10 +128,10 @@ C10_ALWAYS_INLINE static const std::
128128

129129
// (2a) and (2b) are represented identically in the DispatchKeySet logic:
130130
// - backend-agnostic functionalities (e.g. FuncTorchBatched) are NOT
131-
// customizeable per backend.
131+
// customizable per backend.
132132
// In order to do so, we'd need to promote it to a per-backend functionality
133133
// "building block" key.
134-
// - non-customizeable backends (e.g. FPGA) can NOT customize existing
134+
// - non-customizable backends (e.g. FPGA) can NOT customize existing
135135
// functionality like Sparse, Autograd, etc.
136136
// In order to do so, we'd need to promote it to a backend "building block"
137137
// key.
@@ -795,7 +795,7 @@ C10_API bool isBackendDispatchKey(DispatchKey t);
795795
C10_API DispatchKeySet getRuntimeDispatchKeySet(DispatchKey t);
796796

797797
// Resolve alias dispatch key to DispatchKeySet if applicable,
798-
// and chek if k is a part of that set
798+
// and check if k is a part of that set
799799
C10_API bool runtimeDispatchKeySetHas(DispatchKey t, DispatchKey k);
800800

801801
// Returns a DispatchKeySet of all backend keys mapped to Autograd dispatch key

c10/core/SingletonSymNodeImpl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class C10_API SingletonSymNodeImpl : public SymNodeImpl {
113113
// For the purpose of computing inequalities, we consider the coefficient of
114114
// the SingletonInt to be a positive integer.
115115
//
116-
// Thus, no modificaitons are needed to the logic since
116+
// Thus, no modifications are needed to the logic since
117117
// j0 >= k implies coeff * j0 >= k
118118
//
119119
c10::SymNode eq(const c10::SymNode& other) override;

c10/core/SymInt.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class C10_API SymInt {
150150
// if the SymInt in question is an unbacked SymInt (or, potentially in the
151151
// future, if it contains unbacked SymInts), we will also treat the
152152
// unbacked SymInt as statically testing >= 2 (which will prevent us from
153-
// choking on, e.g., contiguity chekcs.)
153+
// choking on, e.g., contiguity checks.)
154154
bool expect_size(const char* file, int64_t line) const;
155155

156156
// Distinguish actual symbolic values from constants stored on the heap

c10/core/impl/DeviceGuardImplInterface.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ struct C10_API DeviceGuardImplInterface {
125125
*/
126126
virtual Stream getStreamFromGlobalPool(Device, bool isHighPriority = false)
127127
const {
128-
(void)isHighPriority; // Suppress unused varaible warning
128+
(void)isHighPriority; // Suppress unused variable warning
129129
TORCH_CHECK(false, "Backend doesn't support acquiring a stream from pool.")
130130
}
131131

c10/cuda/CUDACachingAllocator.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ struct PrivatePool {
725725
// Instead of maintaining private BlockPools here, I could stuff all blocks
726726
// (private or no) into the top-level large_blocks and small_blocks, and
727727
// distinguish private blocks by adding a "pool id" check above the stream
728-
// check in BlockComparator. BlockComparator is performance- critial though,
728+
// check in BlockComparator. BlockComparator is performance- critical though,
729729
// I'd rather not add more logic to it.
730730
BlockPool large_blocks;
731731
BlockPool small_blocks;
@@ -1118,7 +1118,7 @@ class DeviceCachingAllocator {
11181118
format_size(alloc_size),
11191119
". GPU ",
11201120
device,
1121-
" has a total capacty of ",
1121+
" has a total capacity of ",
11221122
format_size(device_total),
11231123
" of which ",
11241124
format_size(device_free),
@@ -1649,7 +1649,7 @@ class DeviceCachingAllocator {
16491649
const auto all_blocks = get_all_blocks();
16501650

16511651
for (const Block* const head_block : all_blocks) {
1652-
// For expandable segments, we report one segment for each continguous
1652+
// For expandable segments, we report one segment for each contiguous
16531653
// mapped range of memory
16541654
if (head_block->prev && head_block->prev->mapped) {
16551655
continue;
@@ -2078,7 +2078,7 @@ class DeviceCachingAllocator {
20782078
// cannot be freed when requested, but fully free pages
20792079
// of expandable blocks can always be freed.
20802080
// The logic to track this as statistic is pretty involved,
2081-
// so we simply just exclude expandable segements from
2081+
// so we simply just exclude expandable segments from
20822082
// inactive_split
20832083
if (!block->expandable_segment_) {
20842084
update_stat(

c10/cuda/CUDACachingAllocator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class CUDAAllocator : public Allocator {
251251

252252
// memory not allocated from cudaMalloc cannot be copied
253253
// across devices using cudaMemcpyAsync if peer to peer access is disabled.
254-
// instead it requres cudaMemcpyAsyncPeer
254+
// instead it requires cudaMemcpyAsyncPeer
255255
// with P2P Enabled, all combinations work
256256
// with P2P Disabled:
257257
// cudaMalloc cudaMallocAsync/cuMemMap

c10/util/TypeIndex.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ inline constexpr type_index get_type_index() {
167167
#if !defined(TORCH_PEDANTIC)
168168
// Use precomputed hashsum for std::string
169169
// Needed to workaround ambiguity in class name resolution
170-
// into __PRETTY_FUNCION__ when abovementioned class is defined in inlined
170+
// into __PRETTY_FUNCTION__ when abovementioned class is defined in inlined
171171
// namespace. In multi-ABI C++ library, `std::string` is an alias to
172172
// `std::__cxx11::basic_string<char>` which depending on compiler flags can be
173173
// resolved to `basic_string<char>` either in `std` namespace or in

0 commit comments

Comments
 (0)