Skip to content

Commit 6aa808f

Browse files
authored
[SYCL][Doc] Fix typos in spec constant design (#17642)
1 parent e948e07 commit 6aa808f

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

sycl/doc/design/SYCL2020-SpecializationConstants.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ as:
8080
[sycl-2020-spec-constant-glossary]: https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#specialization-constant
8181
[sycl-2020-glossary]: https://www.khronos.org/registry/SYCL/specs/sycl-2020/html/sycl-2020.html#glossary
8282

83-
And implementation is based on [SPIR-V speficiation][spirv-spec] support
83+
And implementation is based on [SPIR-V specification][spirv-spec] support
8484
for [Specialization][spirv-specialization]. However, the specification also
8585
states the following:
8686

@@ -172,7 +172,7 @@ Based on those limitations, the following mapping design is proposed:
172172
```
173173
namespace detail {
174174
// assuming user defined the following specialization_id:
175-
// constexpr specialiation_id<int> int_const;
175+
// constexpr specialization_id<int> int_const;
176176
// class Wrapper {
177177
// public:
178178
// static constexpr specialization_id<float> float_const;
@@ -341,7 +341,7 @@ used to identify the specialization constants at SPIR-V level.
341341
As noted above one symbolic ID can have several numeric IDs assigned to it -
342342
such 1:N mapping comes from the fact that at SPIR-V level, composite
343343
specialization constants don't have dedicated IDs and they are being identified
344-
and specialized through their scalar leafs and corresponding numeric IDs.
344+
and specialized through their scalar leaves and corresponding numeric IDs.
345345

346346
For example, the following code:
347347
```
@@ -375,7 +375,7 @@ unique_symbolic_id_for_id_A -> { 1, 2, 3 }
375375

376376
As it is shown in the example above, if a composite specialization constant
377377
contains another composite within it, that nested composite is also being
378-
"flattened" and its leafs are considered to be leafs of the parent
378+
"flattened" and its leaves are considered to be leaves of the parent
379379
specialization constants. This done by depth-first search through the composite
380380
elements.
381381

@@ -509,8 +509,8 @@ constant in that buffer:
509509
```
510510
[
511511
0, // for id_int, the first constant is at the beginning of the buffer
512-
4, // sizeof(int) == 4, the second constant is located right after the fisrt one
513-
16, // sizeof(int) + sizezof(A) == 4, the same approach for the third constant
512+
4, // sizeof(int) == 4, the second constant is located right after the first one
513+
16, // sizeof(int) + sizeof(A) == 4, the same approach for the third constant
514514
]
515515
```
516516

@@ -661,9 +661,9 @@ While transforming SYCL kernel function into an OpenCL kernel, DPC++ FE should
661661
- Communicate to DPC++ RT which kernel argument should be used for passing
662662
a buffer with specialization constant values when they are emulated.
663663

664-
DPC++ FE provides implementation of `__builtin_sycl_unique_id` built-in function and
665-
it also populates special integration footer with the content required by DPC++
666-
RT for access to right device image properties describing specialization
664+
DPC++ FE provides implementation of `__builtin_sycl_unique_id` built-in function
665+
and it also populates special integration footer with the content required by
666+
DPC++ RT for access to right device image properties describing specialization
667667
constants.
668668

669669
#### SYCL Kernel function transformations
@@ -763,7 +763,7 @@ struct A {
763763
};
764764
765765
constexpr specialization_id<int> id_int;
766-
struct Wraper {
766+
struct Wrapper {
767767
public:
768768
static constexpr specialization_id<A> id_A;
769769
};
@@ -839,10 +839,10 @@ constexpr sycl::specialization_id<int> same_name{1};
839839
840840
namespace {
841841
constexpr sycl::specialization_id<int> same_name{2}:
842-
/* application code that referenes ::(unnamed)::same_name */
842+
/* application code that references ::(unnamed)::same_name */
843843
namespace {
844844
constexpr sycl::specialization_id<int> same_name{3}:
845-
/* application code that referenes ::(unnamed)::(unnamed)::same_name */
845+
/* application code that references ::(unnamed)::(unnamed)::same_name */
846846
}
847847
}
848848
@@ -899,7 +899,7 @@ namespace {
899899
900900
namespace __sycl_detail {
901901
// Sometimes we need a 'shim', which points to another 'shim' in order to
902-
// "extract" a variable from an anonymous namespace unambiguosly
902+
// "extract" a variable from an anonymous namespace unambiguously
903903
static constexpr decltype(__sycl_detail::__shim_1()) &__shim_2() {
904904
// still address of ::(unnamed)::(unnamed)::same_name;
905905
return __sycl_detail::__shim_1();
@@ -972,7 +972,7 @@ address of the specialization constant provided by user and `offset` field of
972972
the descriptor as `(char*)(SpecConstantValuesMap[SymbolicID]) + offset`.
973973

974974
That calculation is required, because at SPIR-V level composite
975-
specialization constants are respresented by several specialization constants
975+
specialization constants are represented by several specialization constants
976976
for each element of a composite, whilst on a SYCL level, the whole composite
977977
is passed by user as a single blob of data. `offset` field from properties is
978978
used to specify which exact piece of that blob should be extracted to perform
@@ -1053,7 +1053,7 @@ the translator will generate `OpSpecConstant` SPIR-V instructions with proper
10531053
OpDecorate %A.float SpecId 44 ; ID of the 2nd member
10541054
%A.i32 = OpSpecConstant %int.type 0 ; 1st member with default value
10551055
%A.float = OpSpecConstant %float.type 0.0 ; 2nd member with default value
1056-
%struct = OpSpecConstantComposite %struct.type %A.i32 %A.float ; Composite doens't need IDs or default value
1056+
%struct = OpSpecConstantComposite %struct.type %A.i32 %A.float ; Composite doesn't need IDs or default value
10571057
%1 = OpTypeFunction %int
10581058
10591059
%get = OpFunction %int None %1

0 commit comments

Comments
 (0)