Skip to content

Commit 6e9bf3b

Browse files
authored
[SYCL][NFC] Fix SPIR-V format/spec name spelling (#2356)
SPIRV -> SPIR-V
1 parent f64f56f commit 6e9bf3b

File tree

16 files changed

+34
-33
lines changed

16 files changed

+34
-33
lines changed

sycl/doc/CompilerAndRuntimeDesign.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ target, then it will invoke the host compiler to compile the host part of a
2121
SYCL source. In the simplest case, when compilation and linkage are done in one
2222
compiler driver invocation, once compilation is finished, the device object
2323
files (which are really LLVM IR files) are linked with the `llvm-link` tool.
24-
The resulting LLVM IR module is then translated into a SPIRV module using the
24+
The resulting LLVM IR module is then translated into a SPIR-V module using the
2525
`llvm-spirv` tool and wrapped in a host object file using the
2626
`clang-offload-wrapper` tool. Once all the host object files and the wrapped
2727
object with device code are ready, the driver invokes the usual platform linker
@@ -32,7 +32,7 @@ line.
3232
There are many variations of the compilation process depending on whether user
3333
chose to do one or more of the following:
3434
- perform compilation separately from linkage
35-
- compile the device SPIRV module ahead-of-time for one or more targets
35+
- compile the device SPIR-V module ahead-of-time for one or more targets
3636
- perform device code splitting so that device code is distributed across
3737
multiple modules rather than enclosed in a single one
3838
- perform linkage of static device libraries
@@ -450,7 +450,7 @@ either from `llvm-spirv` or from the AOT backend.
450450

451451
##### Device code splitting
452452

453-
Putting all device code into a single SPIRV module does not work well in the
453+
Putting all device code into a single SPIR-V module does not work well in the
454454
following cases:
455455
1. There are thousands of kernels defined and only small part of them is used at
456456
run-time. Having them all in one SPIR-V module significantly increases JIT time.

sycl/doc/extensions/ExplicitSIMD/dpcpp-explicit-simd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ Explicit SIMD extension supports "private global" variables - file scope
434434
variables in private address space (similar to thread-local variables on host).
435435
These variables have 1 copy per work-item (which maps to a single SIMD thread in
436436
ESP) and are visible to all functions in the translation unit. Conceptually they
437-
map to SPIRV variable with private storage class. Private globals can be bound
437+
map to SPIR-V variable with private storage class. Private globals can be bound
438438
to a specific byte offset within the GRF. To mark a file scope variable as
439439
private global, the `INTEL_GPU_PRIVATE` attribute is used,
440440
`INTEL_GPU_REGISTER` is used to bind it the register file:

sycl/include/CL/sycl/INTEL/esimd/esimd_enum.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ using uint = unsigned int;
2626
// Mark a function being nodebug.
2727
#define ESIMD_NODEBUG __attribute__((nodebug))
2828
// Mark a "ESIMD global": accessible from all functions in current translation
29-
// unit, separate copy per subgroup (work-item), mapped to SPIRV private storage
30-
// class.
29+
// unit, separate copy per subgroup (work-item), mapped to SPIR-V private
30+
// storage class.
3131
#define ESIMD_PRIVATE __attribute__((opencl_private))
3232
// Bind a ESIMD global variable to a specific register.
3333
#define ESIMD_REGISTER(n) __attribute__((register_num(n)))

sycl/include/CL/sycl/ONEAPI/experimental/spec_constant.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Based on:
1010
// https://github.com/codeplaysoftware/standards-proposals/blob/master/spec-constant/index.md
1111
// TODO:
12-
// 1) implement the SPIRV interop part of the proposal
12+
// 1) implement the SPIR-V interop part of the proposal
1313
// 2) support arbitrary spec constant type; only primitive types are
1414
// supported currently
1515
// 3) move to the new upcoming spec constant specification (then 1 above is not

sycl/include/CL/sycl/detail/common.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ size_t getLinearIndex(const T<Dims> &Index, const U<Dims> &Range) {
302302
// pairs) into disjoint sets based on the kernel distribution among device
303303
// images.
304304
using KernelSetId = size_t;
305-
// Kernel set ID for kernels contained within the SPIRV file specified via
305+
// Kernel set ID for kernels contained within the SPIR-V file specified via
306306
// environment.
307307
constexpr KernelSetId SpvFileKSId = 0;
308308
constexpr KernelSetId LastKSId = SpvFileKSId;

sycl/include/CL/sycl/detail/image_ocl_types.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ static RetType __invoke__ImageReadSampler(ImageT Img, CoordT Coords,
9595

9696
TempArgT TmpCoords =
9797
cl::sycl::detail::convertDataToType<CoordT, TempArgT>(Coords);
98-
// According to validation rules(SPIRV specification, section 2.16.1) result
98+
// According to validation rules(SPIR-V specification, section 2.16.1) result
9999
// of __spirv_SampledImage is allowed to be an operand of image lookup
100100
// and query instructions explicitly specified to take an operand whose
101101
// type is OpTypeSampledImage.
102102
//
103-
// According to SPIRV specification section 3.32.10 at least one operand
103+
// According to SPIR-V specification section 3.32.10 at least one operand
104104
// setting the level of detail must be present. The last two arguments of
105105
// __spirv_ImageSampleExplicitLod represent image operand type and value.
106-
// From the SPIRV specification section 3.14:
106+
// From the SPIR-V specification section 3.14:
107107
enum ImageOperands { Lod = 0x2 };
108108

109109
// Lod value is zero as mipmap is not supported.
@@ -118,9 +118,9 @@ namespace sycl {
118118
namespace detail {
119119

120120
// Function to return the number of channels for Image Channel Order returned by
121-
// SPIRV call to OpImageQueryOrder.
121+
// SPIR-V call to OpImageQueryOrder.
122122
// The returned int value represents an enum from Image Channel Order. The enums
123-
// for Image Channel Order are mapped differently in sycl and SPIRV spec.
123+
// for Image Channel Order are mapped differently in sycl and SPIR-V spec.
124124
inline int getSPIRVNumChannels(int ImageChannelOrder) {
125125
switch (ImageChannelOrder) {
126126
case 0: // R
@@ -155,11 +155,11 @@ inline int getSPIRVNumChannels(int ImageChannelOrder) {
155155
}
156156

157157
// Function to compute the Element Size for a given Image Channel Type and Image
158-
// Channel Order, returned by SPIRV calls to OpImageQueryFormat and
158+
// Channel Order, returned by SPIR-V calls to OpImageQueryFormat and
159159
// OpImageQueryOrder respectively.
160160
// The returned int value from OpImageQueryFormat represents an enum from Image
161161
// Channel Data Type. The enums for Image Channel Data Type are mapped
162-
// differently in sycl and SPIRV spec.
162+
// differently in sycl and SPIR-V spec.
163163
inline int getSPIRVElementSize(int ImageChannelType, int ImageChannelOrder) {
164164
int NumChannels = getSPIRVNumChannels(ImageChannelOrder);
165165
switch (ImageChannelType) {

sycl/include/CL/sycl/group.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ template <int Dimensions = 1> class group {
263263
access::fence_space>::type accessSpace =
264264
access::fence_space::global_and_local) const {
265265
uint32_t flags = detail::getSPIRVMemorySemanticsMask(accessSpace);
266-
// TODO: currently, there is no good way in SPIRV to set the memory
266+
// TODO: currently, there is no good way in SPIR-V to set the memory
267267
// barrier only for load operations or only for store operations.
268268
// The full read-and-write barrier is used and the template parameter
269-
// 'accessMode' is ignored for now. Either SPIRV or SYCL spec may be
270-
// changed to address this discrepancy between SPIRV and SYCL,
269+
// 'accessMode' is ignored for now. Either SPIR-V or SYCL spec may be
270+
// changed to address this discrepancy between SPIR-V and SYCL,
271271
// or if we decide that 'accessMode' is the important feature then
272272
// we can fix this later, for example, by using OpenCL 1.2 functions
273273
// read_mem_fence() and write_mem_fence().

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
814814
//
815815
std::string SupportedExtensions;
816816

817-
// cl_khr_il_program - OpenCL 2.0 KHR extension for SPIRV support. Core
817+
// cl_khr_il_program - OpenCL 2.0 KHR extension for SPIR-V support. Core
818818
// feature in >OpenCL 2.1
819819
// cl_khr_subgroups - Extension adds support for implementation-controlled
820820
// subgroups.

sycl/source/detail/program_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ void program_impl::flush_spec_constants(const RTDeviceBinaryImage &Img,
506506
const char *SCName = (*SCIt)->Name;
507507
auto SCEntry = SpecConstRegistry.find(SCName);
508508
if (SCEntry == SpecConstRegistry.end())
509-
// spec constant has not been set in user code - SPIRV will use default
509+
// spec constant has not been set in user code - SPIR-V will use default
510510
continue;
511511
const spec_constant_impl &SC = SCEntry->second;
512512
assert(SC.isSet() && "uninitialized spec constant");

sycl/source/detail/program_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ class program_impl {
298298
/// managemment PI APIs. The native program passed as non-null argument
299299
/// overrides the MProgram native program field.
300300
/// \param Img device binary image corresponding to this program, used to
301-
/// resolve spec constant name to SPIRV integer ID
301+
/// resolve spec constant name to SPIR-V integer ID
302302
/// \param NativePrg if not null, used as the flush target, otherwise MProgram
303303
/// is used
304304
void flush_spec_constants(const RTDeviceBinaryImage &Img,
@@ -417,7 +417,7 @@ class program_impl {
417417
OSModuleHandle MProgramModuleHandle = OSUtil::ExeModuleHandle;
418418

419419
// Keeps specialization constant map for this program. Spec constant name
420-
// resolution to actual SPIRV integer ID happens at build time, where the
420+
// resolution to actual SPIR-V integer ID happens at build time, where the
421421
// device binary image is available. Access is guarded by this context's
422422
// program cache lock.
423423
SpecConstRegistryT SpecConstRegistry;

sycl/source/detail/program_manager/program_manager.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static bool isDeviceBinaryTypeSupported(const context &C,
240240
const backend ContextBackend =
241241
detail::getSyclObjImpl(C)->getPlugin().getBackend();
242242

243-
// The CUDA backend cannot use SPIRV
243+
// The CUDA backend cannot use SPIR-V
244244
if (ContextBackend == backend::cuda && Format == PI_DEVICE_BINARY_TYPE_SPIRV)
245245
return false;
246246

@@ -379,7 +379,7 @@ RT::PiProgram ProgramManager::getBuiltPIProgram(OSModuleHandle M,
379379
// Link a fallback implementation of device libraries if they are not
380380
// supported by a device compiler.
381381
// Pre-compiled programs are supposed to be already linked.
382-
// If device image is not SPIRV, DeviceLibReqMask will be 0 which means
382+
// If device image is not SPIR-V, DeviceLibReqMask will be 0 which means
383383
// no fallback device library will be linked.
384384
uint32_t DeviceLibReqMask = 0;
385385
if (Img.getFormat() == PI_DEVICE_BINARY_TYPE_SPIRV &&
@@ -603,11 +603,12 @@ static RT::PiProgram loadDeviceLibFallback(
603603

604604
ProgramManager::ProgramManager() {
605605
const char *SpvFile = std::getenv(UseSpvEnv);
606-
// If a SPIRV file is specified with an environment variable,
606+
// If a SPIR-V file is specified with an environment variable,
607607
// register the corresponding image
608608
if (SpvFile) {
609609
m_UseSpvFile = true;
610-
// The env var requests that the program is loaded from a SPIRV file on disk
610+
// The env var requests that the program is loaded from a SPIR-V file on
611+
// disk
611612
std::ifstream File(SpvFile, std::ios::binary);
612613

613614
if (!File.is_open())
@@ -805,7 +806,7 @@ ProgramManager::build(ProgramPtr Program, const ContextImplPtr Context,
805806

806807
// TODO: this is a temporary workaround for GPU tests for ESIMD compiler.
807808
// We do not link with other device libraries, because it may fail
808-
// due to unrecognized SPIRV format of those libraries.
809+
// due to unrecognized SPIR-V format of those libraries.
809810
if (std::string(CompileOpts).find(std::string("-cmc")) != std::string::npos ||
810811
std::string(CompileOpts).find(std::string("-vc-codegen")) !=
811812
std::string::npos)

sycl/source/detail/program_manager/program_manager.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ class ProgramManager {
192192

193193
// Keeps track of pi_program to image correspondence. Needed for:
194194
// - knowing which specialization constants are used in the program and
195-
// injecting their current values before compiling the SPIRV; the binary
195+
// injecting their current values before compiling the SPIR-V; the binary
196196
// image object has info about all spec constants used in the module
197197
// - finding kernel argument masks for kernels associated with each
198198
// pi_program
@@ -215,7 +215,7 @@ class ProgramManager {
215215
std::unordered_map<const RTDeviceBinaryImage *, KernelNameToArgMaskMap>
216216
m_EliminatedKernelArgMasks;
217217

218-
/// True iff a SPIRV file has been specified with an environment variable
218+
/// True iff a SPIR-V file has been specified with an environment variable
219219
bool m_UseSpvFile = false;
220220
};
221221
} // namespace detail

sycl/source/detail/scheduler/commands.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ static void adjustNDRangePerKernel(NDRDescT &NDR, RT::PiKernel Kernel,
16281628
NDR.set(NDR.Dims, nd_range<3>(NDR.NumWorkGroups * WGSize, WGSize));
16291629
}
16301630

1631-
// We have the following mapping between dimensions with SPIRV builtins:
1631+
// We have the following mapping between dimensions with SPIR-V builtins:
16321632
// 1D: id[0] -> x
16331633
// 2D: id[0] -> y, id[1] -> x
16341634
// 3D: id[0] -> z, id[1] -> y, id[2] -> x

sycl/source/detail/scheduler/commands.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ class Command {
250250
///
251251
/// Stream ids are positive integers and we set it to an invalid value.
252252
int32_t MStreamID = -1;
253-
/// Reserved for storing the object address such as SPIRV or memory object
253+
/// Reserved for storing the object address such as SPIR-V or memory object
254254
/// address.
255255
void *MAddress = nullptr;
256256
/// Buffer to build the address string.

sycl/test/esimd/spirv_intrins_trans.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clangxx -fsycl -fsycl-explicit-simd -fsycl-device-only -O0 -S -emit-llvm -x c++ %s -o - | FileCheck %s
2-
// This test checks that all SPIRV intrinsics are correctly
2+
// This test checks that all SPIR-V intrinsics are correctly
33
// translated into GenX counterparts (implemented in LowerCM.cpp)
44

55
#include <CL/sycl.hpp>

sycl/test/spec_const/spec_const_types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//===----------------------------------------------------------------------===//
1313
// The test checks that the tool chain correctly identifies all specialization
1414
// constants, emits correct specialization constats map file and can properly
15-
// translate the resulting bitcode to SPIRV.
15+
// translate the resulting bitcode to SPIR-V.
1616

1717
#include <CL/sycl.hpp>
1818

0 commit comments

Comments
 (0)