Skip to content

Commit 904866c

Browse files
committed
[offload] Fix typos discovered by codespell
1 parent fdfd979 commit 904866c

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

0 commit comments

Comments
 (0)