Skip to content

Commit 30acaff

Browse files
Renaming esimd emu from esimd cpu (#4728)
[SYCL][ESIMD][EMU] Renaming ESIMD_CPU to ESIMD_EMU * Directory rename * File rename Co-authored-by: kbobrovs <[email protected]>
1 parent c7c99fc commit 30acaff

23 files changed

+90
-91
lines changed

sycl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ endif()
313313
# environment
314314
if (NOT MSVC)
315315
if (SYCL_BUILD_PI_ESIMD_EMULATOR)
316-
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS pi_esimd_cpu libcmrt-headers)
316+
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS pi_esimd_emulator libcmrt-headers)
317317
if (MSVC)
318318
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS libcmrt-libs libcmrt-dlls)
319319
else()

sycl/include/CL/__spirv/spirv_ops.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==---------- spirv_ops.hpp --- SPIRV operations -------------------------==//
1+
//==----------- spirv_ops.hpp --- SPIRV operations -------------------------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/__spirv/spirv_types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===----------- spirv_types.hpp --- SPIRV types -------------------------===//
1+
//===------------ spirv_types.hpp --- SPIRV types -------------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/__spirv/spirv_vars.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==---------- spirv_vars.hpp --- SPIRV variables -------------------------==//
1+
//==----------- spirv_vars.hpp --- SPIRV variables -------------------------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/sycl/aspects.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==-------------- aspects.hpp - SYCL Aspect Enums ------------*- C++ -*---==//
1+
//==--------------- aspects.hpp - SYCL Aspect Enums ------------*- C++ -*---==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/sycl/detail/hip_definitions.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==------------ hip_definitions.hpp - SYCL HIP backend -------------------==//
1+
//==------------- hip_definitions.hpp - SYCL HIP backend -------------------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/sycl/detail/item_base.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==---------- item_base.hpp --- SYCL iteration ItemBase ------------------==//
1+
//==----------- item_base.hpp --- SYCL iteration ItemBase ------------------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/sycl/detail/pi.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ bool trace(TraceLevel level);
6565
#define __SYCL_OPENCL_PLUGIN_NAME "pi_opencl.dll"
6666
#define __SYCL_LEVEL_ZERO_PLUGIN_NAME "pi_level_zero.dll"
6767
#define __SYCL_CUDA_PLUGIN_NAME "pi_cuda.dll"
68-
#define __SYCL_ESIMD_CPU_PLUGIN_NAME "pi_esimd_cpu.dll"
68+
#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "pi_esimd_emulator.dll"
6969
#define __SYCL_HIP_PLUGIN_NAME "libpi_hip.dll"
7070
#else
7171
#define __SYCL_OPENCL_PLUGIN_NAME "libpi_opencl.so"
7272
#define __SYCL_LEVEL_ZERO_PLUGIN_NAME "libpi_level_zero.so"
7373
#define __SYCL_CUDA_PLUGIN_NAME "libpi_cuda.so"
74-
#define __SYCL_ESIMD_CPU_PLUGIN_NAME "libpi_esimd_cpu.so"
74+
#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "libpi_esimd_emulator.so"
7575
#define __SYCL_HIP_PLUGIN_NAME "libpi_hip.so"
7676
#endif
7777

sycl/include/CL/sycl/device_event.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==---------- device_event.hpp --- SYCL device event ---------------------==//
1+
//==----------- device_event.hpp --- SYCL device event ---------------------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/sycl/feature_test.hpp.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==---- feature_test.hpp - SYCL Feature Test Definitions -----*- C++ -*---==//
1+
//==----- feature_test.hpp - SYCL Feature Test Definitions -----*- C++ -*---==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/sycl/group_algorithm.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==----------- group_algorithm.hpp ------------------------------------==//
1+
//==------------------------ group_algorithm.hpp ---------------------------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/CL/sycl/id.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//==----------- id.hpp --- SYCL iteration id -------------------------==//
1+
//==-------------------- id.hpp --- SYCL iteration id ----------------------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.

sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimdcpu_device_interface.hpp renamed to sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emulator_device_interface.hpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
//==----- esimdcpu_device_interface.hpp - DPC++ Explicit SIMD API ---------==//
1+
//==----- esimd_emulator_device_interface.hpp - DPC++ Explicit SIMD API ----==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
/// \file esimdcpu_device_interface.hpp
10-
/// Declarations for ESIMD_CPU-device specific definitions.
9+
/// \file esimdemu_device_interface.hpp
10+
/// Declarations for ESIMD_EMULATOR-device specific definitions.
1111
/// ESIMD intrinsic and LibCM functionalities required by intrinsic defined
1212
///
1313
/// This interface is for ESIMD intrinsic emulation implementations
14-
/// such as slm_access to access ESIMD_CPU specific-support therefore
14+
/// such as slm_access to access ESIMD_EMULATOR specific-support therefore
1515
/// it has to be defined and shared as include directory
1616
///
17-
/// \ingroup sycl_pi_esimd_cpu
17+
/// \ingroup sycl_pi_esimd_emulator
1818

1919
#pragma once
2020

2121
#include <CL/sycl/detail/pi.hpp>
2222

2323
// cstdint-type fields such as 'uint32_t' are to be used in funtion
24-
// pointer table file ('esimd_emu_functions_v1.h') included in 'struct
24+
// pointer table file ('esimd_emulator_functions_v1.h') included in 'struct
2525
// ESIMDDeviceInterface' definition.
2626
#include <cstdint>
2727
#include <mutex>
@@ -35,7 +35,7 @@ namespace detail {
3535
#define ESIMD_DEVICE_INTERFACE_VERSION 1
3636

3737
// 'ESIMDDeviceInterface' structure defines interface for ESIMD CPU
38-
// emulation (ESIMD_CPU) to access LibCM CPU emulation functionalities
38+
// emulation (ESIMD_EMULATOR) to access LibCM CPU emulation functionalities
3939
// from kernel application under emulation.
4040

4141
// Header files included in the structure contains only function
@@ -51,13 +51,13 @@ struct ESIMDDeviceInterface {
5151
void *reserved;
5252

5353
ESIMDDeviceInterface();
54-
#include "esimd_emu_functions_v1.h"
54+
#include "esimd_emulator_functions_v1.h"
5555
};
5656

5757
// Denotes the data version used by the implementation.
5858
// Increment whenever the 'data' field interpretation within PluginOpaqueData is
5959
// changed.
60-
#define ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION 0
60+
#define ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION 0
6161
/// This structure denotes a ESIMD EMU plugin-specific data returned via the
6262
/// piextPluginGetOpaqueData PI call. Depending on the \c version field, the
6363
/// second \c data field can be interpreted differently.
@@ -76,14 +76,13 @@ ESIMDDeviceInterface *getESIMDDeviceInterface() {
7676
void *PIOpaqueData = nullptr;
7777

7878
PIOpaqueData =
79-
getPluginOpaqueData<cl::sycl::backend::ext_oneapi_esimd_emulator>(
80-
nullptr);
79+
getPluginOpaqueData<cl::sycl::backend::ext_intel_esimd_emulator>(nullptr);
8180

8281
ESIMDEmuPluginOpaqueData *OpaqueData =
8382
reinterpret_cast<ESIMDEmuPluginOpaqueData *>(PIOpaqueData);
8483

8584
// First check if opaque data version is compatible.
86-
if (OpaqueData->version != ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION) {
85+
if (OpaqueData->version != ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION) {
8786
// NOTE: the version check should always be '!=' as layouts of different
8887
// versions of PluginOpaqueData is not backward compatible, unlike
8988
// layout of the ESIMDDeviceInterface.
@@ -92,8 +91,8 @@ ESIMDDeviceInterface *getESIMDDeviceInterface() {
9291
<< "Opaque data returned by ESIMD Emu plugin is incompatible with"
9392
<< "the one used in current implementation." << std::endl
9493
<< "Returned version : " << OpaqueData->version << std::endl
95-
<< "Required version : " << ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION
96-
<< std::endl;
94+
<< "Required version : "
95+
<< ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION << std::endl;
9796
throw cl::sycl::feature_not_supported();
9897
}
9998
// Opaque data version is OK, can cast the 'data' field.
@@ -115,7 +114,7 @@ ESIMDDeviceInterface *getESIMDDeviceInterface() {
115114
}
116115

117116
#undef ESIMD_DEVICE_INTERFACE_VERSION
118-
#undef ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION
117+
#undef ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION
119118

120119
} // namespace detail
121120
} // namespace sycl

sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emu_functions_v1.h renamed to sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emulator_functions_v1.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
//==----- esimd_emu_functions_v1.h - DPC++ Explicit SIMD API ---------==//
1+
//==----- esimd_emulator_functions_v1.h - DPC++ Explicit SIMD API ---------==//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
/// \file esimd_emu_functions_v1.h
9+
/// \file esimd_emulator_functions_v1.h
1010
///
11-
/// \ingroup sycl_pi_esimd_cpu
11+
/// \ingroup sycl_pi_esimd_emulator
1212

1313
#pragma once
1414

1515
// <cstdint> for 'uint32_t' type is included in upper-level device
16-
// interface file ('esimdcpu_device_interface.hpp')
16+
// interface file ('esimdemu_device_interface.hpp')
1717

1818
// This file defines function interfaces for ESIMD CPU Emulation
19-
// (ESIMD_CPU) to access LibCM CPU emulation functionalities from
19+
// (ESIMD_EMU) to access LibCM CPU emulation functionalities from
2020
// kernel applications running under emulation
2121

2222
// CM CPU Emulation Info :

sycl/plugins/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ add_subdirectory(level_zero)
1919
# environment
2020
if (NOT MSVC)
2121
if (SYCL_BUILD_PI_ESIMD_EMULATOR)
22-
add_subdirectory(esimd_cpu)
22+
add_subdirectory(esimd_emulator)
2323
endif()
2424
endif()

sycl/plugins/esimd_cpu/CMakeLists.txt renamed to sycl/plugins/esimd_emulator/CMakeLists.txt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22
# PI Esimd CPU library
3-
# Create Shared library for libpi_esimd_cpu.so.
3+
# Create Shared library for libpi_esimd_emulator.so.
44

55
include(ExternalProject)
66

77
include_directories("${sycl_inc_dir}")
8-
# FIXME/TODO: 'pi.h' is included in 'pi_esimd_cpu.cpp', and CL_*_INTEL
8+
# FIXME/TODO: 'pi.h' is included in 'pi_esimd_emulator.cpp', and CL_*_INTEL
99
# and CL_*_KHR definitions in 'pi.h' are from
1010
# ${OPENCL_INCLUDE}. Remove build dependency on OpenCL
1111
include_directories(${OpenCL_INCLUDE_DIR})
@@ -14,11 +14,11 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_build)
1414
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_install)
1515

1616
if (MSVC)
17-
set(LIBCM ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/lib/libcm${CMAKE_STATIC_LIBRARY_SUFFIX})
18-
set(LIBIGFXCMRT_EMU ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/lib/igfxcmrt64_emu${CMAKE_STATIC_LIBRARY_SUFFIX})
17+
set(LIBCM ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/lib/libcm${CMAKE_STATIC_LIBRARY_SUFFIX})
18+
set(LIBIGFXCMRT_EMU ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/lib/igfxcmrt64_emu${CMAKE_STATIC_LIBRARY_SUFFIX})
1919
else()
20-
set(LIBCM ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/lib/libcm${CMAKE_SHARED_LIBRARY_SUFFIX})
21-
set(LIBIGFXCMRT_EMU ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/lib/libigfxcmrt_emu${CMAKE_SHARED_LIBRARY_SUFFIX})
20+
set(LIBCM ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/lib/libcm${CMAKE_SHARED_LIBRARY_SUFFIX})
21+
set(LIBIGFXCMRT_EMU ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/lib/libigfxcmrt_emu${CMAKE_SHARED_LIBRARY_SUFFIX})
2222
endif()
2323

2424
if (DEFINED CM_LOCAL_SOURCE_DIR)
@@ -75,13 +75,13 @@ else ()
7575
endif()
7676
endif ()
7777
ExternalProject_Add_Step(cm-emu llvminstall
78-
COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps && ${CMAKE_COMMAND} -E copy_directory <INSTALL_DIR>/ ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps
78+
COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps && ${CMAKE_COMMAND} -E copy_directory <INSTALL_DIR>/ ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps
7979
COMMENT "Installing cm-emu into the LLVM binary directory"
8080
DEPENDEES install
8181
)
8282

83-
include_directories(${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/include/igfxcmrt_emu)
84-
include_directories(${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/include/libcm/cm)
83+
include_directories(${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/include/igfxcmrt_emu)
84+
include_directories(${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/include/libcm/cm)
8585

8686
# Compilation flag to exclude lines in header files imported from CM
8787
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__SYCL_EXPLICIT_SIMD_PLUGIN__")
@@ -96,43 +96,43 @@ else()
9696
string(REPLACE "-pedantic" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
9797
endif()
9898

99-
add_library(pi_esimd_cpu SHARED
99+
add_library(pi_esimd_emulator SHARED
100100
"${sycl_inc_dir}/CL/sycl/detail/pi.h"
101-
"pi_esimd_cpu.cpp"
101+
"pi_esimd_emulator.cpp"
102102
)
103103

104104
if (MSVC)
105105
# by defining __SYCL_BUILD_SYCL_DLL, we can use __declspec(dllexport)
106106
# which are individually tagged for all pi* symbols in pi.h
107-
target_compile_definitions(pi_esimd_cpu PRIVATE __SYCL_BUILD_SYCL_DLL)
107+
target_compile_definitions(pi_esimd_emulator PRIVATE __SYCL_BUILD_SYCL_DLL)
108108
else()
109109
# we set the visibility of all symbols 'hidden' by default.
110110
# In pi.h file, we set exported symbols with visibility==default individually
111-
target_compile_options(pi_esimd_cpu PUBLIC -fvisibility=hidden)
111+
target_compile_options(pi_esimd_emulator PUBLIC -fvisibility=hidden)
112112

113113
# This script file is used to allow exporting pi* symbols only.
114114
# All other symbols are regarded as local (hidden)
115115
set(linker_script "${CMAKE_CURRENT_SOURCE_DIR}/../ld-version-script.txt")
116116

117117
# Filter symbols based on the scope defined in the script file,
118118
# and export pi* function symbols in the library.
119-
target_link_libraries( pi_esimd_cpu
119+
target_link_libraries( pi_esimd_emulator
120120
PRIVATE "-Wl,--version-script=${linker_script}"
121121
)
122122
endif()
123123

124-
add_dependencies(pi_esimd_cpu OpenCL-Headers)
125-
add_dependencies(pi_esimd_cpu cm-emu)
126-
add_dependencies(sycl-toolchain pi_esimd_cpu)
124+
add_dependencies(pi_esimd_emulator OpenCL-Headers)
125+
add_dependencies(pi_esimd_emulator cm-emu)
126+
add_dependencies(sycl-toolchain pi_esimd_emulator)
127127

128-
target_link_libraries(pi_esimd_cpu PRIVATE sycl ${LIBCM} ${LIBIGFXCMRT_EMU})
129-
set_target_properties(pi_esimd_cpu PROPERTIES LINKER_LANGUAGE CXX)
128+
target_link_libraries(pi_esimd_emulator PRIVATE sycl ${LIBCM} ${LIBIGFXCMRT_EMU})
129+
set_target_properties(pi_esimd_emulator PROPERTIES LINKER_LANGUAGE CXX)
130130

131-
add_common_options(pi_esimd_cpu)
131+
add_common_options(pi_esimd_emulator)
132132

133-
install(TARGETS pi_esimd_cpu
134-
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT pi_esimd_cpu
135-
RUNTIME DESTINATION "bin" COMPONENT pi_esimd_cpu)
133+
install(TARGETS pi_esimd_emulator
134+
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT pi_esimd_emulator
135+
RUNTIME DESTINATION "bin" COMPONENT pi_esimd_emulator)
136136

137137
# Copy CM Header files to $(INSTALL)/include/sycl/CL/
138138
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_install/include/libcm/cm/

0 commit comments

Comments
 (0)