Skip to content

Commit 1f56bb3

Browse files
authored
[Offload][NFC] Fix typos discovered by codespell (llvm#125119)
https://github.com/codespell-project/codespell % `codespell --ignore-words-list=archtype,hsa,identty,inout,iself,nd,te,ths,vertexes --write-changes`
1 parent 55be370 commit 1f56bb3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+107
-107
lines changed

offload/DeviceRTL/include/Configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ uint32_t getNumDevices();
2727
/// Return the device number in the system for omp_get_device_num.
2828
uint32_t getDeviceNum();
2929

30-
/// Return the user choosen debug level.
30+
/// Return the user chosen debug level.
3131
uint32_t getDebugKind();
3232

3333
/// Return if teams oversubscription is assumed

offload/DeviceRTL/include/Mapping.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ LaneMaskTy activemask();
6363
/// Return a mask describing all threads with a smaller Id in the warp.
6464
LaneMaskTy lanemaskLT();
6565

66-
/// Return a mask describing all threads with a larget Id in the warp.
66+
/// Return a mask describing all threads with a larger Id in the warp.
6767
LaneMaskTy lanemaskGT();
6868

6969
/// Return the thread Id in the warp, in [0, getWarpSize()).

offload/DeviceRTL/include/State.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace memory {
3333
/// Note: See the restrictions on __kmpc_alloc_shared for proper usage.
3434
void *allocShared(uint64_t Size, const char *Reason);
3535

36-
/// Free \p Ptr, alloated via allocShared, for \p Reason.
36+
/// Free \p Ptr, allocated via allocShared, for \p Reason.
3737
///
3838
/// Note: See the restrictions on __kmpc_free_shared for proper usage.
3939
void freeShared(void *Ptr, uint64_t Bytes, const char *Reason);
@@ -44,7 +44,7 @@ void *allocGlobal(uint64_t Size, const char *Reason);
4444
/// Return a pointer to the dynamic shared memory buffer.
4545
void *getDynamicBuffer();
4646

47-
/// Free \p Ptr, alloated via allocGlobal, for \p Reason.
47+
/// Free \p Ptr, allocated via allocGlobal, for \p Reason.
4848
void freeGlobal(void *Ptr, const char *Reason);
4949

5050
} // namespace memory
@@ -365,7 +365,7 @@ inline state::Value<uint32_t, state::VK_Level> Level;
365365
/// The `active-level` describes which of the parallel level counted with the
366366
/// `level-var` is active. There can only be one.
367367
///
368-
/// active-level-var is 1, if ActiveLevelVar is not 0, otherweise it is 0.
368+
/// active-level-var is 1, if ActiveLevelVar is not 0, otherwise it is 0.
369369
inline state::Value<uint32_t, state::VK_ActiveLevel> ActiveLevel;
370370

371371
/// TODO

offload/DeviceRTL/include/Synchronization.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace atomic {
2222

2323
enum OrderingTy {
2424
relaxed = __ATOMIC_RELAXED,
25-
aquire = __ATOMIC_ACQUIRE,
25+
acquire = __ATOMIC_ACQUIRE,
2626
release = __ATOMIC_RELEASE,
2727
acq_rel = __ATOMIC_ACQ_REL,
2828
seq_cst = __ATOMIC_SEQ_CST,

offload/DeviceRTL/src/Configuration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using namespace ompx;
2727
0;
2828
[[gnu::weak]] extern const uint32_t __omp_rtl_assume_teams_oversubscription = 0;
2929

30-
// This variable should be visibile to the plugin so we override the default
30+
// This variable should be visible to the plugin so we override the default
3131
// hidden visibility.
3232
[[gnu::used, gnu::retain, gnu::weak,
3333
gnu::visibility("protected")]] DeviceEnvironmentTy

offload/DeviceRTL/src/Misc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ double getWTime();
3333

3434
double getWTick() {
3535
// The number of ticks per second for the AMDGPU clock varies by card and can
36-
// only be retrived by querying the driver. We rely on the device environment
36+
// only be retrieved by querying the driver. We rely on the device environment
3737
// to inform us what the proper frequency is.
3838
return 1.0 / config::getClockFrequency();
3939
}

offload/DeviceRTL/src/Reduction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ int32_t __kmpc_nvptx_teams_reduce_nowait_v2(
206206
// to the number of slots in the buffer.
207207
bool IsMaster = (ThreadId == 0);
208208
while (IsMaster) {
209-
Bound = atomic::load(&IterCnt, atomic::aquire);
209+
Bound = atomic::load(&IterCnt, atomic::acquire);
210210
if (TeamId < Bound + num_of_records)
211211
break;
212212
}
@@ -259,7 +259,7 @@ int32_t __kmpc_nvptx_teams_reduce_nowait_v2(
259259
unsigned NumRecs = kmpcMin(NumTeams, uint32_t(num_of_records));
260260
if (ChunkTeamCount == NumTeams - Bound - 1) {
261261
// Ensure we see the global memory writes by other teams
262-
fence::kernel(atomic::aquire);
262+
fence::kernel(atomic::acquire);
263263

264264
//
265265
// Last team processing.

offload/DeviceRTL/src/Synchronization.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ uint32_t atomicInc(uint32_t *A, uint32_t V, atomic::OrderingTy Ordering,
8484
default:
8585
__builtin_unreachable();
8686
Case(atomic::relaxed);
87-
Case(atomic::aquire);
87+
Case(atomic::acquire);
8888
Case(atomic::release);
8989
Case(atomic::acq_rel);
9090
Case(atomic::seq_cst);
@@ -107,7 +107,7 @@ void namedBarrier() {
107107
uint32_t WarpSize = mapping::getWarpSize();
108108
uint32_t NumWaves = NumThreads / WarpSize;
109109

110-
fence::team(atomic::aquire);
110+
fence::team(atomic::acquire);
111111

112112
// named barrier implementation for amdgcn.
113113
// Uses two 16 bit unsigned counters. One for the number of waves to have
@@ -172,7 +172,7 @@ void syncThreads(atomic::OrderingTy Ordering) {
172172
__builtin_amdgcn_s_barrier();
173173

174174
if (Ordering != atomic::relaxed)
175-
fenceTeam(Ordering == atomic::acq_rel ? atomic::aquire : atomic::seq_cst);
175+
fenceTeam(Ordering == atomic::acq_rel ? atomic::acquire : atomic::seq_cst);
176176
}
177177
void syncThreadsAligned(atomic::OrderingTy Ordering) { syncThreads(Ordering); }
178178

@@ -198,7 +198,7 @@ void setCriticalLock(omp_lock_t *Lock) {
198198
!cas((uint32_t *)Lock, UNSET, SET, atomic::relaxed, atomic::relaxed)) {
199199
__builtin_amdgcn_s_sleep(32);
200200
}
201-
fenceKernel(atomic::aquire);
201+
fenceKernel(atomic::acquire);
202202
}
203203
}
204204

offload/DeviceRTL/src/Workshare.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ template <typename T, typename ST> struct omptarget_nvptx_LoopSupport {
7979
lb = lb + entityId * chunk;
8080
T inputUb = ub;
8181
ub = lb + chunk - 1; // Clang uses i <= ub
82-
// Say ub' is the begining of the last chunk. Then who ever has a
82+
// Say ub' is the beginning of the last chunk. Then who ever has a
8383
// lower bound plus a multiple of the increment equal to ub' is
8484
// the last one.
8585
T beginingLastChunk = inputUb - (inputUb % chunk);
@@ -806,7 +806,7 @@ template <typename Ty> class StaticLoopChunker {
806806
NumIters, OneIterationPerThread);
807807
}
808808

809-
/// Worksharing `distrbute`-loop.
809+
/// Worksharing `distribute`-loop.
810810
static void Distribute(IdentTy *Loc, void (*LoopBody)(Ty, void *), void *Arg,
811811
Ty NumIters, Ty BlockChunk) {
812812
ASSERT(icv::Level == 0, "Bad distribute");
@@ -853,7 +853,7 @@ template <typename Ty> class StaticLoopChunker {
853853
ASSERT(state::ParallelTeamSize == 1, "Bad distribute");
854854
}
855855

856-
/// Worksharing `distrbute parallel for`-loop.
856+
/// Worksharing `distribute parallel for`-loop.
857857
static void DistributeFor(IdentTy *Loc, void (*LoopBody)(Ty, void *),
858858
void *Arg, Ty NumIters, Ty NumThreads,
859859
Ty BlockChunk, Ty ThreadChunk) {

offload/include/OpenMP/OMPT/Callback.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ FOREACH_OMPT_EMI_EVENT(declareOmptCallback)
5656

5757
/// This function will call an OpenMP API function. Which in turn will lookup a
5858
/// given enum value of type \p ompt_callbacks_t and copy the address of the
59-
/// corresponding callback funtion into the provided pointer.
59+
/// corresponding callback function into the provided pointer.
6060
/// The pointer to the runtime function is passed during 'initializeLibrary'.
6161
/// \p which the enum value of the requested callback function
6262
/// \p callback the destination pointer where the address shall be copied

offload/include/PluginManager.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct PluginManager {
7777
/// Iterate over all device images registered with this plugin.
7878
auto deviceImages() { return llvm::make_pointee_range(DeviceImages); }
7979

80-
/// Translation table retreived from the binary
80+
/// Translation table retrieved from the binary
8181
HostEntriesBeginToTransTableTy HostEntriesBeginToTransTable;
8282
std::mutex TrlTblMtx; ///< For Translation Table
8383
/// Host offload entries in order of image registration
@@ -171,7 +171,7 @@ struct PluginManager {
171171
/// Devices associated with plugins, accesses to the container are exclusive.
172172
ProtectedObj<DeviceContainerTy> Devices;
173173

174-
/// References to upgraded legacy offloading entires.
174+
/// References to upgraded legacy offloading entries.
175175
std::list<llvm::SmallVector<llvm::offloading::EntryTy, 0>> LegacyEntries;
176176
std::list<llvm::SmallVector<__tgt_device_image, 0>> LegacyImages;
177177
llvm::DenseMap<__tgt_bin_desc *, __tgt_bin_desc> UpgradedDescriptors;

offload/include/device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ struct DeviceTy {
134134
int32_t recordEvent(void *Event, AsyncInfoTy &AsyncInfo);
135135

136136
/// Wait for an event. This function can be blocking or non-blocking,
137-
/// depending on the implmentation. It is expected to set a dependence on the
137+
/// depending on the implementation. It is expected to set a dependence on the
138138
/// event such that corresponding operations shall only start once the event
139139
/// is fulfilled.
140140
int32_t waitEvent(void *Event, AsyncInfoTy &AsyncInfo);

offload/include/omptarget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ enum __tgt_target_return_t : int {
4242
OMP_TGT_SUCCESS = 0,
4343
/// offload may not execute on the requested target device
4444
/// this scenario can be caused by the device not available or unsupported
45-
/// as described in the Execution Model in the specifcation
45+
/// as described in the Execution Model in the specification
4646
/// this status may not be used for target device execution failure
4747
/// which should be handled internally in libomptarget
4848
OMP_TGT_FAIL = ~0

offload/liboffload/API/APIDefs.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class IsPointerType<string Type> {
3636
bit ret = !ne(!find(Type, "*", !sub(!size(Type), 1)), -1);
3737
}
3838

39-
// Describes the valid range of a pointer parameter that reperesents an array
39+
// Describes the valid range of a pointer parameter that represents an array
4040
class Range<string Begin, string End> {
4141
string begin = Begin;
4242
string end = End;

offload/liboffload/API/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ which preserves ABI compatibility with C.
6262
Represents a C-style enum. Contains a list of `etor` values, which have a name
6363
and description.
6464

65-
A `TaggedEtor` record type also exists which addtionally takes a type. This type
65+
A `TaggedEtor` record type also exists which additionally takes a type. This type
6666
is used when the enum is used as a parameter to a function with a type-tagged
6767
function parameter (e.g. `olGetDeviceInfo`).
6868

offload/liboffload/src/OffloadLib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ OffloadConfig &offloadConfig() {
3636
return Config;
3737
}
3838

39-
// Pull in the declarations for the implementation funtions. The actual entry
39+
// Pull in the declarations for the implementation functions. The actual entry
4040
// points in this file wrap these.
4141
#include "OffloadImplFuncDecls.inc"
4242

0 commit comments

Comments
 (0)