Skip to content

Commit 919ed65

Browse files
authored
[SYCL][NFC] Fix a few typos in the comments (#1365)
Also remove unnecessary comment Signed-off-by: Alexey Bader <[email protected]>
1 parent 5fc7ae1 commit 919ed65

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

llvm/lib/SYCLLowerIR/LowerWGScope.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
// For a kind 3 variable (alloca w/o metadata) this pass creates a WG-shared
4040
// local "shadow" variable. Before each PFWI invocation leader WI stores its
4141
// private copy of the variable into the shadow (under "is leader" guard), then
42-
// all WIs (ouside of "is leader" guard) load the shadow value into their
42+
// all WIs (outside of "is leader" guard) load the shadow value into their
4343
// private copies ("materialize" the private copy). This works because these
4444
// variables are uniform - i.e. have the same value in all WIs and are not
4545
// changed within PFWI. The only exceptions are captures of private_memory
@@ -67,7 +67,7 @@
6767
//
6868
// TODO The approach employed by this pass generates lots of barriers and data
6969
// copying between private and local memory, which might not be efficient. There
70-
// are optimization opportunities listed below. Also other aproaches can be
70+
// are optimization opportunities listed below. Also other approaches can be
7171
// considered like
7272
// "Efficient Fork-Join on GPUs through Warp Specialization" by Arpith C. Jacob
7373
// et. al.
@@ -148,10 +148,10 @@ static IntegerType *getSizeTTy(Module &M) {
148148
return PtrSize == 8 ? Type::getInt64Ty(Ctx) : Type::getInt32Ty(Ctx);
149149
}
150150

151-
// Encaplulates SPIRV-dependent code generation.
151+
// Encapsulates SPIR-V-dependent code generation.
152152
// TODO this should be factored out into a separate project in clang
153153
namespace spirv {
154-
// There is no TargetMachine for SPIRV, so define those inline here
154+
// There is no TargetMachine for SPIR-V, so define those inline here
155155
enum class AddrSpace : unsigned {
156156
Private = 0,
157157
Global = 1,
@@ -302,7 +302,7 @@ shareOutputViaLocalMem(Instruction &I, BasicBlock &BBa, BasicBlock &BBb,
302302
// 3) Generate a load in the "worker" BB of the value stored by the leader
303303
Bld.SetInsertPoint(&BBb.front());
304304
auto *WGVal = Bld.CreateLoad(WGLocal, "wg_val_" + Twine(I.getName()));
305-
// 4) Finally, replace usages of I ouside the scope
305+
// 4) Finally, replace usages of I outside the scope
306306
for (auto *U : Users)
307307
U->replaceUsesOfWith(&I, WGVal);
308308
}
@@ -530,7 +530,7 @@ static bool localMustBeMaterialized(const AllocaInst *L, const BasicBlock &BB) {
530530
// that BB to current.
531531
// - Avoid unnecessary '*p = *@Shadow_p' reloads and redirect p uses them to the
532532
// @Shadow_p in case it can be proved it is safe (see note above). Might not
533-
// have any noticible effect, though, as reading from Shadow always goes to a
533+
// have any noticeable effect, though, as reading from Shadow always goes to a
534534
// register file anyway.
535535
//
536536
void materializeLocalsInWIScopeBlocks(SmallPtrSetImpl<AllocaInst *> &Locals,
@@ -658,7 +658,7 @@ static void fixupPrivateMemoryPFWILambdaCaptures(CallInst *PFWICall) {
658658
continue;
659659
PrivMemCaptures.push_back(CaptureDesc{AI, GEP});
660660
}
661-
// now rewrite the captured addresss of a private_memory variables within the
661+
// now rewrite the captured address of a private_memory variables within the
662662
// PFWI lambda object:
663663
for (auto &C : PrivMemCaptures) {
664664
GetElementPtrInst *NewGEP = cast<GetElementPtrInst>(C.second->clone());
@@ -854,11 +854,11 @@ GlobalVariable *spirv::createWGLocalVariable(Module &M, Type *T,
854854
return G;
855855
}
856856

857-
// Functions below expose SPIRV translator-specific intrinsics to the use
857+
// Functions below expose SPIR-V translator-specific intrinsics to the use
858858
// in LLVM IR. Those calls and global references will be translated to
859-
// corresponding SPIRV operations and builtin variables.
859+
// corresponding SPIR-V operations and builtin variables.
860860
//
861-
// TODO generalize to support all SPIRV intrinsic operations and builtin
861+
// TODO generalize to support all SPIR-V intrinsic operations and builtin
862862
// variables
863863

864864
// extern "C" const __constant size_t __spirv_BuiltInLocalInvocationIndex;

sycl/test/linear_id/linear-host-dev.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
// RUN: %clangxx -fsycl %s -o %t.out
22
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out | FileCheck %s
3-
//==--------------- linear-host-dev.cpp - SYCL linear id test -------------==//
4-
//
5-
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
6-
// See https://llvm.org/LICENSE.txt for license information.
7-
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8-
//
9-
//===----------------------------------------------------------------------===//
103

114
#include <CL/sycl.hpp>
125
#include <algorithm>
136
#include <cstdio>
147
#include <cstdlib>
158

16-
// Check that linear id is monotincally increased on host device.
9+
// Check that linear id is monotonically increased on host device.
1710
// Only there we can reliable check that. Since the kernel has a restriction
1811
// regarding usage of global variables, use stream to log the linear id
1912
// and ensure that they're monotonically increased.
2013
//
2114
// Note: This test heavily relies on the current implementation of
22-
// host device(single-threaded ordered executio). So if the implementation
15+
// host device(single-threaded ordered execution). So if the implementation
2316
// is somehow changed so it's no longer possible to run this test reliable
2417
// it can be removed.
2518

0 commit comments

Comments
 (0)