1
- // ===---------- pi_esimd_emu .cpp - CM Emulation Plugin ----- ---------------===//
1
+ // ===---------- pi_esimd_emulator .cpp - CM Emulation Plugin ---------------===//
2
2
//
3
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
4
// See https://llvm.org/LICENSE.txt for license information.
5
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- // / \file pi_esimd_emu .cpp
9
+ // / \file pi_esimd_emulator .cpp
10
10
// / Declarations for CM Emulation Plugin. It is the interface between the
11
11
// / device-agnostic SYCL runtime layer and underlying CM Emulation
12
12
// /
13
- // / \ingroup sycl_pi_esimd_emu
13
+ // / \ingroup sycl_pi_esimd_emulator
14
14
15
15
#include < stdint.h>
16
16
40
40
#include < thread>
41
41
#include < utility>
42
42
43
- #include " pi_esimd_emu .hpp"
43
+ #include " pi_esimd_emulator .hpp"
44
44
45
45
namespace {
46
46
@@ -108,14 +108,14 @@ class ReturnHelper {
108
108
// Controls PI level tracing prints.
109
109
static bool PrintPiTrace = false ;
110
110
111
- // Global variables used in PI_esimd_emu
111
+ // Global variables used in PI_esimd_emulator
112
112
// Note we only create a simple pointer variables such that C++ RT won't
113
113
// deallocate them automatically at the end of the main program.
114
114
// The heap memory allocated for this global variable reclaimed only when
115
115
// Sycl RT calls piTearDown().
116
116
static sycl::detail::ESIMDEmuPluginOpaqueData *PiESimdDeviceAccess;
117
117
118
- // To be compared with ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION in device
118
+ // To be compared with ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION in device
119
119
// interface header file
120
120
#define ESIMDEmuPluginDataVersion 0
121
121
@@ -276,13 +276,13 @@ void sycl_get_cm_image_params(void *PtrInput, char **BaseAddr, uint32_t *Width,
276
276
*MtxLock = &(Img->mutexLock );
277
277
}
278
278
279
- // / Implementation for ESIMD_EMU device interface accessing ESIMD
279
+ // / Implementation for ESIMD_EMULATOR device interface accessing ESIMD
280
280
// / intrinsics and LibCM functionalties requred by intrinsics
281
281
sycl::detail::ESIMDDeviceInterface::ESIMDDeviceInterface () {
282
282
version = ESIMDEmuPluginInterfaceVersion;
283
283
reserved = nullptr ;
284
284
285
- /* From 'esimd_emu_functions_v1 .h' : Start */
285
+ /* From 'esimd_emulator_functions_v1 .h' : Start */
286
286
cm_barrier_ptr = cm_support::barrier;
287
287
cm_sbarrier_ptr = cm_support::split_barrier;
288
288
cm_fence_ptr = cm_support::fence;
@@ -293,7 +293,7 @@ sycl::detail::ESIMDDeviceInterface::ESIMDDeviceInterface() {
293
293
294
294
sycl_get_cm_buffer_params_ptr = sycl_get_cm_buffer_params;
295
295
sycl_get_cm_image_params_ptr = sycl_get_cm_image_params;
296
- /* From 'esimd_emu_functions_v1 .h' : End */
296
+ /* From 'esimd_emulator_functions_v1 .h' : End */
297
297
}
298
298
299
299
// / Implementation for Host Kernel Launch used by
@@ -392,7 +392,7 @@ pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName,
392
392
393
393
switch (ParamName) {
394
394
case PI_PLATFORM_INFO_NAME:
395
- return ReturnValue (" Intel(R) ESIMD_EMU /GPU" );
395
+ return ReturnValue (" Intel(R) ESIMD_EMULATOR /GPU" );
396
396
397
397
case PI_PLATFORM_INFO_VENDOR:
398
398
return ReturnValue (" Intel(R) Corporation" );
@@ -495,7 +495,7 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
495
495
case PI_DEVICE_INFO_PLATFORM:
496
496
return ReturnValue (Device->Platform );
497
497
case PI_DEVICE_INFO_NAME:
498
- return ReturnValue (" ESIMD_EMU " );
498
+ return ReturnValue (" ESIMD_EMULATOR " );
499
499
case PI_DEVICE_INFO_IMAGE_SUPPORT:
500
500
return ReturnValue (pi_bool{true });
501
501
case PI_DEVICE_INFO_DRIVER_VERSION:
@@ -517,8 +517,8 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
517
517
#define UNSUPPORTED_INFO (info ) \
518
518
case info: \
519
519
std::cerr << std::endl \
520
- << " Unsupported device info = " << #info << " from ESIMD_EMU " \
521
- << std::endl; \
520
+ << " Unsupported device info = " << #info \
521
+ << " from ESIMD_EMULATOR " << std::endl; \
522
522
DIE_NO_IMPLEMENTATION; \
523
523
break ;
524
524
@@ -740,7 +740,7 @@ pi_result piQueueRelease(pi_queue Queue) {
740
740
}
741
741
742
742
pi_result piQueueFinish (pi_queue) {
743
- // No-op as enqueued commands with ESIMD_EMU plugin are blocking
743
+ // No-op as enqueued commands with ESIMD_EMULATOR plugin are blocking
744
744
// ones that do not return until their completion - kernel execution
745
745
// and memory read.
746
746
CONTINUE_NO_IMPLEMENTATION;
@@ -1078,7 +1078,7 @@ pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName,
1078
1078
size_t ParamValueSize, void *ParamValue,
1079
1079
size_t *ParamValueSizeRet) {
1080
1080
if (PrintPiTrace) {
1081
- std::cerr << " Warning : Profiling Not supported under PI_ESIMD_EMU "
1081
+ std::cerr << " Warning : Profiling Not supported under PI_ESIMD_EMULATOR "
1082
1082
<< std::endl;
1083
1083
}
1084
1084
return PI_SUCCESS;
@@ -1181,7 +1181,7 @@ pi_result piEnqueueMemBufferRead(pi_queue Queue, pi_mem Src,
1181
1181
// / TODO : Support Blocked read, 'Queue' handling
1182
1182
if (BlockingRead) {
1183
1183
assert (false &&
1184
- " ESIMD_EMU support for blocking piEnqueueMemBufferRead is NYI" );
1184
+ " ESIMD_EMULATOR support for blocking piEnqueueMemBufferRead is NYI" );
1185
1185
}
1186
1186
if (NumEventsInWaitList != 0 ) {
1187
1187
return PI_INVALID_EVENT_WAIT_LIST;
@@ -1277,7 +1277,7 @@ pi_result piEnqueueMemImageRead(pi_queue CommandQueue, pi_mem Image,
1277
1277
pi_event *Event) {
1278
1278
// / TODO : Support Blocked read, 'Queue' handling
1279
1279
if (BlockingRead) {
1280
- assert (false && " ESIMD_EMU does not support Blocking Read" );
1280
+ assert (false && " ESIMD_EMULATOR does not support Blocking Read" );
1281
1281
}
1282
1282
_pi_image *PiImg = static_cast <_pi_image *>(Image);
1283
1283
@@ -1508,8 +1508,9 @@ pi_result piextDeviceSelectBinary(pi_device, pi_device_binary *,
1508
1508
// / for the images
1509
1509
if (RawImgSize != 1 ) {
1510
1510
if (PrintPiTrace) {
1511
- std::cerr << " Only single device binary image is supported in ESIMD_EMU"
1512
- << std::endl;
1511
+ std::cerr
1512
+ << " Only single device binary image is supported in ESIMD_EMULATOR"
1513
+ << std::endl;
1513
1514
}
1514
1515
return PI_INVALID_VALUE;
1515
1516
}
@@ -1547,8 +1548,8 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
1547
1548
strncpy (PluginInit->PluginVersion , _PI_H_VERSION_STRING, PluginVersionSize);
1548
1549
1549
1550
PiESimdDeviceAccess = new sycl::detail::ESIMDEmuPluginOpaqueData ();
1550
- // 'version' to be compared with 'ESIMD_EMU_DEVICE_REQUIRED_VER ' defined in
1551
- // device interface file
1551
+ // 'version' to be compared with 'ESIMD_EMULATOR_DEVICE_REQUIRED_VER ' defined
1552
+ // in device interface file
1552
1553
PiESimdDeviceAccess->version = ESIMDEmuPluginDataVersion;
1553
1554
PiESimdDeviceAccess->data =
1554
1555
reinterpret_cast <void *>(new sycl::detail::ESIMDDeviceInterface ());
0 commit comments