diff --git a/sycl/CMakeLists.txt b/sycl/CMakeLists.txt index 85a7d62b50970..916d7f57a7265 100644 --- a/sycl/CMakeLists.txt +++ b/sycl/CMakeLists.txt @@ -313,7 +313,7 @@ endif() # environment if (NOT MSVC) if (SYCL_BUILD_PI_ESIMD_EMULATOR) - list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS pi_esimd_cpu libcmrt-headers) + list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS pi_esimd_emulator libcmrt-headers) if (MSVC) list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS libcmrt-libs libcmrt-dlls) else() diff --git a/sycl/include/CL/__spirv/spirv_ops.hpp b/sycl/include/CL/__spirv/spirv_ops.hpp index 71455f543cf78..52a2ee5a7af75 100644 --- a/sycl/include/CL/__spirv/spirv_ops.hpp +++ b/sycl/include/CL/__spirv/spirv_ops.hpp @@ -1,4 +1,4 @@ -//==---------- spirv_ops.hpp --- SPIRV operations -------------------------==// +//==----------- spirv_ops.hpp --- SPIRV operations -------------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/__spirv/spirv_types.hpp b/sycl/include/CL/__spirv/spirv_types.hpp index 8adddff15539e..42f5ce1810da9 100644 --- a/sycl/include/CL/__spirv/spirv_types.hpp +++ b/sycl/include/CL/__spirv/spirv_types.hpp @@ -1,4 +1,4 @@ -//===----------- spirv_types.hpp --- SPIRV types -------------------------===// +//===------------ spirv_types.hpp --- SPIRV types -------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/__spirv/spirv_vars.hpp b/sycl/include/CL/__spirv/spirv_vars.hpp index 9443988cdc655..9aea1192eb37e 100644 --- a/sycl/include/CL/__spirv/spirv_vars.hpp +++ b/sycl/include/CL/__spirv/spirv_vars.hpp @@ -1,4 +1,4 @@ -//==---------- spirv_vars.hpp --- SPIRV variables -------------------------==// +//==----------- spirv_vars.hpp --- SPIRV variables -------------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/sycl/aspects.hpp b/sycl/include/CL/sycl/aspects.hpp index 0edce7775caa1..8fece73cda58d 100644 --- a/sycl/include/CL/sycl/aspects.hpp +++ b/sycl/include/CL/sycl/aspects.hpp @@ -1,4 +1,4 @@ -//==-------------- aspects.hpp - SYCL Aspect Enums ------------*- C++ -*---==// +//==--------------- aspects.hpp - SYCL Aspect Enums ------------*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/sycl/detail/hip_definitions.hpp b/sycl/include/CL/sycl/detail/hip_definitions.hpp index 30265cbb6c475..f5a07c9e2a2e4 100644 --- a/sycl/include/CL/sycl/detail/hip_definitions.hpp +++ b/sycl/include/CL/sycl/detail/hip_definitions.hpp @@ -1,4 +1,4 @@ -//==------------ hip_definitions.hpp - SYCL HIP backend -------------------==// +//==------------- hip_definitions.hpp - SYCL HIP backend -------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/sycl/detail/item_base.hpp b/sycl/include/CL/sycl/detail/item_base.hpp index 80ef0ab46df05..3bb8ed7b56570 100644 --- a/sycl/include/CL/sycl/detail/item_base.hpp +++ b/sycl/include/CL/sycl/detail/item_base.hpp @@ -1,4 +1,4 @@ -//==---------- item_base.hpp --- SYCL iteration ItemBase ------------------==// +//==----------- item_base.hpp --- SYCL iteration ItemBase ------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/sycl/detail/pi.hpp b/sycl/include/CL/sycl/detail/pi.hpp index 13790dbdf5773..45cd9a013cc87 100644 --- a/sycl/include/CL/sycl/detail/pi.hpp +++ b/sycl/include/CL/sycl/detail/pi.hpp @@ -65,13 +65,13 @@ bool trace(TraceLevel level); #define __SYCL_OPENCL_PLUGIN_NAME "pi_opencl.dll" #define __SYCL_LEVEL_ZERO_PLUGIN_NAME "pi_level_zero.dll" #define __SYCL_CUDA_PLUGIN_NAME "pi_cuda.dll" -#define __SYCL_ESIMD_CPU_PLUGIN_NAME "pi_esimd_cpu.dll" +#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "pi_esimd_emulator.dll" #define __SYCL_HIP_PLUGIN_NAME "libpi_hip.dll" #else #define __SYCL_OPENCL_PLUGIN_NAME "libpi_opencl.so" #define __SYCL_LEVEL_ZERO_PLUGIN_NAME "libpi_level_zero.so" #define __SYCL_CUDA_PLUGIN_NAME "libpi_cuda.so" -#define __SYCL_ESIMD_CPU_PLUGIN_NAME "libpi_esimd_cpu.so" +#define __SYCL_ESIMD_EMULATOR_PLUGIN_NAME "libpi_esimd_emulator.so" #define __SYCL_HIP_PLUGIN_NAME "libpi_hip.so" #endif diff --git a/sycl/include/CL/sycl/device_event.hpp b/sycl/include/CL/sycl/device_event.hpp index 7e19a9e23f133..9abed0e233fe6 100644 --- a/sycl/include/CL/sycl/device_event.hpp +++ b/sycl/include/CL/sycl/device_event.hpp @@ -1,4 +1,4 @@ -//==---------- device_event.hpp --- SYCL device event ---------------------==// +//==----------- device_event.hpp --- SYCL device event ---------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/sycl/feature_test.hpp.in b/sycl/include/CL/sycl/feature_test.hpp.in index dff0f3a3a9ed5..b11bc607b7625 100644 --- a/sycl/include/CL/sycl/feature_test.hpp.in +++ b/sycl/include/CL/sycl/feature_test.hpp.in @@ -1,4 +1,4 @@ -//==---- feature_test.hpp - SYCL Feature Test Definitions -----*- C++ -*---==// +//==----- feature_test.hpp - SYCL Feature Test Definitions -----*- C++ -*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/sycl/group_algorithm.hpp b/sycl/include/CL/sycl/group_algorithm.hpp index 170b255a0f18e..73bee6de992a5 100644 --- a/sycl/include/CL/sycl/group_algorithm.hpp +++ b/sycl/include/CL/sycl/group_algorithm.hpp @@ -1,4 +1,4 @@ -//==----------- group_algorithm.hpp ------------------------------------==// +//==------------------------ group_algorithm.hpp ---------------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/CL/sycl/id.hpp b/sycl/include/CL/sycl/id.hpp index b60628a3abfd8..f2a02c1352f1a 100644 --- a/sycl/include/CL/sycl/id.hpp +++ b/sycl/include/CL/sycl/id.hpp @@ -1,4 +1,4 @@ -//==----------- id.hpp --- SYCL iteration id -------------------------==// +//==-------------------- id.hpp --- SYCL iteration id ----------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimdcpu_device_interface.hpp b/sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emulator_device_interface.hpp similarity index 82% rename from sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimdcpu_device_interface.hpp rename to sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emulator_device_interface.hpp index dbf7ad20b0618..4a57576c1753b 100644 --- a/sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimdcpu_device_interface.hpp +++ b/sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emulator_device_interface.hpp @@ -1,4 +1,4 @@ -//==----- esimdcpu_device_interface.hpp - DPC++ Explicit SIMD API ---------==// +//==----- esimd_emulator_device_interface.hpp - DPC++ Explicit SIMD API ----==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,22 +6,22 @@ // //===----------------------------------------------------------------------===// -/// \file esimdcpu_device_interface.hpp -/// Declarations for ESIMD_CPU-device specific definitions. +/// \file esimdemu_device_interface.hpp +/// Declarations for ESIMD_EMULATOR-device specific definitions. /// ESIMD intrinsic and LibCM functionalities required by intrinsic defined /// /// This interface is for ESIMD intrinsic emulation implementations -/// such as slm_access to access ESIMD_CPU specific-support therefore +/// such as slm_access to access ESIMD_EMULATOR specific-support therefore /// it has to be defined and shared as include directory /// -/// \ingroup sycl_pi_esimd_cpu +/// \ingroup sycl_pi_esimd_emulator #pragma once #include // cstdint-type fields such as 'uint32_t' are to be used in funtion -// pointer table file ('esimd_emu_functions_v1.h') included in 'struct +// pointer table file ('esimd_emulator_functions_v1.h') included in 'struct // ESIMDDeviceInterface' definition. #include #include @@ -35,7 +35,7 @@ namespace detail { #define ESIMD_DEVICE_INTERFACE_VERSION 1 // 'ESIMDDeviceInterface' structure defines interface for ESIMD CPU -// emulation (ESIMD_CPU) to access LibCM CPU emulation functionalities +// emulation (ESIMD_EMULATOR) to access LibCM CPU emulation functionalities // from kernel application under emulation. // Header files included in the structure contains only function @@ -51,13 +51,13 @@ struct ESIMDDeviceInterface { void *reserved; ESIMDDeviceInterface(); -#include "esimd_emu_functions_v1.h" +#include "esimd_emulator_functions_v1.h" }; // Denotes the data version used by the implementation. // Increment whenever the 'data' field interpretation within PluginOpaqueData is // changed. -#define ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION 0 +#define ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION 0 /// This structure denotes a ESIMD EMU plugin-specific data returned via the /// piextPluginGetOpaqueData PI call. Depending on the \c version field, the /// second \c data field can be interpreted differently. @@ -76,14 +76,13 @@ ESIMDDeviceInterface *getESIMDDeviceInterface() { void *PIOpaqueData = nullptr; PIOpaqueData = - getPluginOpaqueData( - nullptr); + getPluginOpaqueData(nullptr); ESIMDEmuPluginOpaqueData *OpaqueData = reinterpret_cast(PIOpaqueData); // First check if opaque data version is compatible. - if (OpaqueData->version != ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION) { + if (OpaqueData->version != ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION) { // NOTE: the version check should always be '!=' as layouts of different // versions of PluginOpaqueData is not backward compatible, unlike // layout of the ESIMDDeviceInterface. @@ -92,8 +91,8 @@ ESIMDDeviceInterface *getESIMDDeviceInterface() { << "Opaque data returned by ESIMD Emu plugin is incompatible with" << "the one used in current implementation." << std::endl << "Returned version : " << OpaqueData->version << std::endl - << "Required version : " << ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION - << std::endl; + << "Required version : " + << ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION << std::endl; throw cl::sycl::feature_not_supported(); } // Opaque data version is OK, can cast the 'data' field. @@ -115,7 +114,7 @@ ESIMDDeviceInterface *getESIMDDeviceInterface() { } #undef ESIMD_DEVICE_INTERFACE_VERSION -#undef ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION +#undef ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION } // namespace detail } // namespace sycl diff --git a/sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emu_functions_v1.h b/sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emulator_functions_v1.h similarity index 85% rename from sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emu_functions_v1.h rename to sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emulator_functions_v1.h index 239e567dc0986..1877f890c13fd 100644 --- a/sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emu_functions_v1.h +++ b/sycl/include/sycl/ext/intel/experimental/esimd/emu/detail/esimd_emulator_functions_v1.h @@ -1,4 +1,4 @@ -//==----- esimd_emu_functions_v1.h - DPC++ Explicit SIMD API ---------==// +//==----- esimd_emulator_functions_v1.h - DPC++ Explicit SIMD API ---------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,17 +6,17 @@ // //===----------------------------------------------------------------------===// -/// \file esimd_emu_functions_v1.h +/// \file esimd_emulator_functions_v1.h /// -/// \ingroup sycl_pi_esimd_cpu +/// \ingroup sycl_pi_esimd_emulator #pragma once // for 'uint32_t' type is included in upper-level device -// interface file ('esimdcpu_device_interface.hpp') +// interface file ('esimdemu_device_interface.hpp') // This file defines function interfaces for ESIMD CPU Emulation -// (ESIMD_CPU) to access LibCM CPU emulation functionalities from +// (ESIMD_EMU) to access LibCM CPU emulation functionalities from // kernel applications running under emulation // CM CPU Emulation Info : diff --git a/sycl/plugins/CMakeLists.txt b/sycl/plugins/CMakeLists.txt index b5e3b8213401d..e08cf0e3b1c65 100644 --- a/sycl/plugins/CMakeLists.txt +++ b/sycl/plugins/CMakeLists.txt @@ -19,6 +19,6 @@ add_subdirectory(level_zero) # environment if (NOT MSVC) if (SYCL_BUILD_PI_ESIMD_EMULATOR) - add_subdirectory(esimd_cpu) + add_subdirectory(esimd_emulator) endif() endif() diff --git a/sycl/plugins/esimd_cpu/CMakeLists.txt b/sycl/plugins/esimd_emulator/CMakeLists.txt similarity index 76% rename from sycl/plugins/esimd_cpu/CMakeLists.txt rename to sycl/plugins/esimd_emulator/CMakeLists.txt index e520e63137efd..1e5e528ade8d1 100755 --- a/sycl/plugins/esimd_cpu/CMakeLists.txt +++ b/sycl/plugins/esimd_emulator/CMakeLists.txt @@ -1,11 +1,11 @@ # PI Esimd CPU library -# Create Shared library for libpi_esimd_cpu.so. +# Create Shared library for libpi_esimd_emulator.so. include(ExternalProject) include_directories("${sycl_inc_dir}") -# FIXME/TODO: 'pi.h' is included in 'pi_esimd_cpu.cpp', and CL_*_INTEL +# FIXME/TODO: 'pi.h' is included in 'pi_esimd_emulator.cpp', and CL_*_INTEL # and CL_*_KHR definitions in 'pi.h' are from # ${OPENCL_INCLUDE}. Remove build dependency on OpenCL include_directories(${OpenCL_INCLUDE_DIR}) @@ -14,11 +14,11 @@ file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_build) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_install) if (MSVC) - set(LIBCM ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/lib/libcm${CMAKE_STATIC_LIBRARY_SUFFIX}) - set(LIBIGFXCMRT_EMU ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/lib/igfxcmrt64_emu${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(LIBCM ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/lib/libcm${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(LIBIGFXCMRT_EMU ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/lib/igfxcmrt64_emu${CMAKE_STATIC_LIBRARY_SUFFIX}) else() - set(LIBCM ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/lib/libcm${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(LIBIGFXCMRT_EMU ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/lib/libigfxcmrt_emu${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(LIBCM ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/lib/libcm${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(LIBIGFXCMRT_EMU ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/lib/libigfxcmrt_emu${CMAKE_SHARED_LIBRARY_SUFFIX}) endif() if (DEFINED CM_LOCAL_SOURCE_DIR) @@ -75,13 +75,13 @@ else () endif() endif () ExternalProject_Add_Step(cm-emu llvminstall - COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps && ${CMAKE_COMMAND} -E copy_directory / ${LLVM_BINARY_DIR}/pi_esimd_cpu_deps + COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps && ${CMAKE_COMMAND} -E copy_directory / ${LLVM_BINARY_DIR}/pi_esimd_emulator_deps COMMENT "Installing cm-emu into the LLVM binary directory" DEPENDEES install ) -include_directories(${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/include/igfxcmrt_emu) -include_directories(${LLVM_BINARY_DIR}/pi_esimd_cpu_deps/include/libcm/cm) +include_directories(${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/include/igfxcmrt_emu) +include_directories(${LLVM_BINARY_DIR}/pi_esimd_emulator_deps/include/libcm/cm) # Compilation flag to exclude lines in header files imported from CM set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__SYCL_EXPLICIT_SIMD_PLUGIN__") @@ -96,19 +96,19 @@ else() string(REPLACE "-pedantic" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") endif() -add_library(pi_esimd_cpu SHARED +add_library(pi_esimd_emulator SHARED "${sycl_inc_dir}/CL/sycl/detail/pi.h" - "pi_esimd_cpu.cpp" + "pi_esimd_emulator.cpp" ) if (MSVC) # by defining __SYCL_BUILD_SYCL_DLL, we can use __declspec(dllexport) # which are individually tagged for all pi* symbols in pi.h - target_compile_definitions(pi_esimd_cpu PRIVATE __SYCL_BUILD_SYCL_DLL) + target_compile_definitions(pi_esimd_emulator PRIVATE __SYCL_BUILD_SYCL_DLL) else() # we set the visibility of all symbols 'hidden' by default. # In pi.h file, we set exported symbols with visibility==default individually - target_compile_options(pi_esimd_cpu PUBLIC -fvisibility=hidden) + target_compile_options(pi_esimd_emulator PUBLIC -fvisibility=hidden) # This script file is used to allow exporting pi* symbols only. # All other symbols are regarded as local (hidden) @@ -116,23 +116,23 @@ else() # Filter symbols based on the scope defined in the script file, # and export pi* function symbols in the library. - target_link_libraries( pi_esimd_cpu + target_link_libraries( pi_esimd_emulator PRIVATE "-Wl,--version-script=${linker_script}" ) endif() -add_dependencies(pi_esimd_cpu OpenCL-Headers) -add_dependencies(pi_esimd_cpu cm-emu) -add_dependencies(sycl-toolchain pi_esimd_cpu) +add_dependencies(pi_esimd_emulator OpenCL-Headers) +add_dependencies(pi_esimd_emulator cm-emu) +add_dependencies(sycl-toolchain pi_esimd_emulator) -target_link_libraries(pi_esimd_cpu PRIVATE sycl ${LIBCM} ${LIBIGFXCMRT_EMU}) -set_target_properties(pi_esimd_cpu PROPERTIES LINKER_LANGUAGE CXX) +target_link_libraries(pi_esimd_emulator PRIVATE sycl ${LIBCM} ${LIBIGFXCMRT_EMU}) +set_target_properties(pi_esimd_emulator PROPERTIES LINKER_LANGUAGE CXX) -add_common_options(pi_esimd_cpu) +add_common_options(pi_esimd_emulator) -install(TARGETS pi_esimd_cpu - LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT pi_esimd_cpu - RUNTIME DESTINATION "bin" COMPONENT pi_esimd_cpu) +install(TARGETS pi_esimd_emulator + LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT pi_esimd_emulator + RUNTIME DESTINATION "bin" COMPONENT pi_esimd_emulator) # Copy CM Header files to $(INSTALL)/include/sycl/CL/ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_install/include/libcm/cm/ diff --git a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp b/sycl/plugins/esimd_emulator/pi_esimd_emulator.cpp similarity index 97% rename from sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp rename to sycl/plugins/esimd_emulator/pi_esimd_emulator.cpp index 36a525139f5b2..fa6c335458a70 100644 --- a/sycl/plugins/esimd_cpu/pi_esimd_cpu.cpp +++ b/sycl/plugins/esimd_emulator/pi_esimd_emulator.cpp @@ -1,4 +1,4 @@ -//===---------- pi_esimd_cpu.cpp - CM Emulation Plugin --------------------===// +//===---------- pi_esimd_emulator.cpp - CM Emulation Plugin ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,11 +6,11 @@ // //===----------------------------------------------------------------------===// -/// \file pi_esimd_cpu.cpp +/// \file pi_esimd_emulator.cpp /// Declarations for CM Emulation Plugin. It is the interface between the /// device-agnostic SYCL runtime layer and underlying CM Emulation /// -/// \ingroup sycl_pi_esimd_cpu +/// \ingroup sycl_pi_esimd_emulator #include @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include @@ -40,7 +40,7 @@ #include #include -#include "pi_esimd_cpu.hpp" +#include "pi_esimd_emulator.hpp" namespace { @@ -108,14 +108,14 @@ class ReturnHelper { // Controls PI level tracing prints. static bool PrintPiTrace = false; -// Global variables used in PI_esimd_cpu +// Global variables used in PI_esimd_emulator // Note we only create a simple pointer variables such that C++ RT won't // deallocate them automatically at the end of the main program. // The heap memory allocated for this global variable reclaimed only when // Sycl RT calls piTearDown(). static sycl::detail::ESIMDEmuPluginOpaqueData *PiESimdDeviceAccess; -// To be compared with ESIMD_EMU_PLUGIN_OPAQUE_DATA_VERSION in device +// To be compared with ESIMD_EMULATOR_PLUGIN_OPAQUE_DATA_VERSION in device // interface header file #define ESIMDEmuPluginDataVersion 0 @@ -242,9 +242,9 @@ template class libCMBatch { GroupDim[I] = (uint32_t)(GlobalSize[I] / LocalSize[I]); } - ESimdCPUKernel ESimdCPU((fptrVoid)InvokeLambda, GroupDim, SpaceDim); + EsimdemuKernel Esimdemu((fptrVoid)InvokeLambda, GroupDim, SpaceDim); - ESimdCPU.launchMT(sizeof(struct LambdaWrapper), WrappedLambda.get()); + Esimdemu.launchMT(sizeof(struct LambdaWrapper), WrappedLambda.get()); } }; @@ -276,13 +276,13 @@ void sycl_get_cm_image_params(void *PtrInput, char **BaseAddr, uint32_t *Width, *MtxLock = &(Img->mutexLock); } -/// Implementation for ESIMD_CPU device interface accessing ESIMD +/// Implementation for ESIMD_EMULATOR device interface accessing ESIMD /// intrinsics and LibCM functionalties requred by intrinsics sycl::detail::ESIMDDeviceInterface::ESIMDDeviceInterface() { version = ESIMDEmuPluginInterfaceVersion; reserved = nullptr; - /* From 'esimd_emu_functions_v1.h' : Start */ + /* From 'esimd_emulator_functions_v1.h' : Start */ cm_barrier_ptr = cm_support::barrier; cm_sbarrier_ptr = cm_support::split_barrier; cm_fence_ptr = cm_support::fence; @@ -293,7 +293,7 @@ sycl::detail::ESIMDDeviceInterface::ESIMDDeviceInterface() { sycl_get_cm_buffer_params_ptr = sycl_get_cm_buffer_params; sycl_get_cm_image_params_ptr = sycl_get_cm_image_params; - /* From 'esimd_emu_functions_v1.h' : End */ + /* From 'esimd_emulator_functions_v1.h' : End */ } /// Implementation for Host Kernel Launch used by @@ -392,7 +392,7 @@ pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName, switch (ParamName) { case PI_PLATFORM_INFO_NAME: - return ReturnValue("Intel(R) ESIMD_CPU/GPU"); + return ReturnValue("Intel(R) ESIMD_EMULATOR/GPU"); case PI_PLATFORM_INFO_VENDOR: return ReturnValue("Intel(R) Corporation"); @@ -495,7 +495,7 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, case PI_DEVICE_INFO_PLATFORM: return ReturnValue(Device->Platform); case PI_DEVICE_INFO_NAME: - return ReturnValue("ESIMD_CPU"); + return ReturnValue("ESIMD_EMULATOR"); case PI_DEVICE_INFO_IMAGE_SUPPORT: return ReturnValue(pi_bool{true}); case PI_DEVICE_INFO_DRIVER_VERSION: @@ -517,8 +517,8 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName, #define UNSUPPORTED_INFO(info) \ case info: \ std::cerr << std::endl \ - << "Unsupported device info = " << #info << " from ESIMD_CPU" \ - << std::endl; \ + << "Unsupported device info = " << #info \ + << " from ESIMD_EMULATOR" << std::endl; \ DIE_NO_IMPLEMENTATION; \ break; @@ -740,7 +740,7 @@ pi_result piQueueRelease(pi_queue Queue) { } pi_result piQueueFinish(pi_queue) { - // No-op as enqueued commands with ESIMD_CPU plugin are blocking + // No-op as enqueued commands with ESIMD_EMULATOR plugin are blocking // ones that do not return until their completion - kernel execution // and memory read. CONTINUE_NO_IMPLEMENTATION; @@ -1078,7 +1078,7 @@ pi_result piEventGetProfilingInfo(pi_event Event, pi_profiling_info ParamName, size_t ParamValueSize, void *ParamValue, size_t *ParamValueSizeRet) { if (PrintPiTrace) { - std::cerr << "Warning : Profiling Not supported under PI_ESIMD_CPU" + std::cerr << "Warning : Profiling Not supported under PI_ESIMD_EMULATOR" << std::endl; } return PI_SUCCESS; @@ -1181,7 +1181,7 @@ pi_result piEnqueueMemBufferRead(pi_queue Queue, pi_mem Src, /// TODO : Support Blocked read, 'Queue' handling if (BlockingRead) { assert(false && - "ESIMD_CPU support for blocking piEnqueueMemBufferRead is NYI"); + "ESIMD_EMULATOR support for blocking piEnqueueMemBufferRead is NYI"); } if (NumEventsInWaitList != 0) { return PI_INVALID_EVENT_WAIT_LIST; @@ -1277,7 +1277,7 @@ pi_result piEnqueueMemImageRead(pi_queue CommandQueue, pi_mem Image, pi_event *Event) { /// TODO : Support Blocked read, 'Queue' handling if (BlockingRead) { - assert(false && "ESIMD_CPU does not support Blocking Read"); + assert(false && "ESIMD_EMULATOR does not support Blocking Read"); } _pi_image *PiImg = static_cast<_pi_image *>(Image); @@ -1508,8 +1508,9 @@ pi_result piextDeviceSelectBinary(pi_device, pi_device_binary *, /// for the images if (RawImgSize != 1) { if (PrintPiTrace) { - std::cerr << "Only single device binary image is supported in ESIMD_CPU" - << std::endl; + std::cerr + << "Only single device binary image is supported in ESIMD_EMULATOR" + << std::endl; } return PI_INVALID_VALUE; } @@ -1547,8 +1548,8 @@ pi_result piPluginInit(pi_plugin *PluginInit) { strncpy(PluginInit->PluginVersion, _PI_H_VERSION_STRING, PluginVersionSize); PiESimdDeviceAccess = new sycl::detail::ESIMDEmuPluginOpaqueData(); - // 'version' to be compared with 'ESIMD_CPU_DEVICE_REQUIRED_VER' defined in - // device interface file + // 'version' to be compared with 'ESIMD_EMULATOR_DEVICE_REQUIRED_VER' defined + // in device interface file PiESimdDeviceAccess->version = ESIMDEmuPluginDataVersion; PiESimdDeviceAccess->data = reinterpret_cast(new sycl::detail::ESIMDDeviceInterface()); diff --git a/sycl/plugins/esimd_cpu/pi_esimd_cpu.hpp b/sycl/plugins/esimd_emulator/pi_esimd_emulator.hpp similarity index 94% rename from sycl/plugins/esimd_cpu/pi_esimd_cpu.hpp rename to sycl/plugins/esimd_emulator/pi_esimd_emulator.hpp index 099794e2c56d3..6e301a6b78b56 100755 --- a/sycl/plugins/esimd_cpu/pi_esimd_cpu.hpp +++ b/sycl/plugins/esimd_emulator/pi_esimd_emulator.hpp @@ -1,4 +1,4 @@ -//===---------- pi_esimd_cpu.hpp - CM Emulation Plugin --------------------===// +//===---------- pi_esimd_emulator.hpp - CM Emulation Plugin ---------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,11 +6,11 @@ // //===----------------------------------------------------------------------===// -/// \file pi_esimd_cpu.hpp +/// \file pi_esimd_emulator.hpp /// Declarations for CM Emulation Plugin. It is the interface between the /// device-agnostic SYCL runtime layer and underlying CM Emulation /// -/// \ingroup sycl_pi_esimd_cpu +/// \ingroup sycl_pi_esimd_emulator #pragma once @@ -160,4 +160,4 @@ struct _pi_kernel : _pi_object { _pi_kernel() {} }; -#include +#include diff --git a/sycl/plugins/level_zero/pi_level_zero.hpp b/sycl/plugins/level_zero/pi_level_zero.hpp index 3f52db16d4e21..d7ab23ed2c1a1 100644 --- a/sycl/plugins/level_zero/pi_level_zero.hpp +++ b/sycl/plugins/level_zero/pi_level_zero.hpp @@ -1,4 +1,4 @@ -//===------- pi_level_zero.hpp - Level Zero Plugin -------------------===// +//===--------- pi_level_zero.hpp - Level Zero Plugin ----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/source/detail/backend_impl.hpp b/sycl/source/detail/backend_impl.hpp index f85c20c9cd6ef..0e86cfe2ec152 100644 --- a/sycl/source/detail/backend_impl.hpp +++ b/sycl/source/detail/backend_impl.hpp @@ -1,5 +1,4 @@ -//==------------------ backend_impl.hpp - get impls backend -//-------------------------==// +//==------------------ backend_impl.hpp - get impls backend ----------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/source/detail/context_impl.hpp b/sycl/source/detail/context_impl.hpp index d8b2c38b524a8..722d2c0789d03 100644 --- a/sycl/source/detail/context_impl.hpp +++ b/sycl/source/detail/context_impl.hpp @@ -1,4 +1,4 @@ -//==---------------- context_impl.hpp - SYCL context -----------*- C++-*---==// +//==---------------- context_impl.hpp - SYCL context ------------*- C++-*---==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/source/detail/platform_util.hpp b/sycl/source/detail/platform_util.hpp index bf7a445d349ae..2616f03ab01dc 100644 --- a/sycl/source/detail/platform_util.hpp +++ b/sycl/source/detail/platform_util.hpp @@ -1,4 +1,4 @@ -//===-- platform_util.hpp - platform utilities ----------------*- C++ -*--===// +//===--------- platform_util.hpp - platform utilities ----------*- C++ -*--===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/sycl/source/detail/plugin.hpp b/sycl/source/detail/plugin.hpp index 3955d57c3b0cb..6968cab7c1cda 100644 --- a/sycl/source/detail/plugin.hpp +++ b/sycl/source/detail/plugin.hpp @@ -1,4 +1,4 @@ -//==--------------------- plugin.hpp - SYCL platform-------------------==// +//==------------------------- plugin.hpp - SYCL platform -------------------==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information.