Skip to content

Commit 018fc7d

Browse files
Following-up Vlad's comments
- Relocating 'plugin_printers.hpp' back - Changing cstdint inclusion path
1 parent 2b73112 commit 018fc7d

File tree

6 files changed

+30
-14
lines changed

6 files changed

+30
-14
lines changed

sycl/include/CL/sycl/INTEL/esimd/detail/emu/esimd_emu_functions_v1.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
/// \ingroup sycl_pi_esimd_cpu
1212

1313
#pragma once
14-
#include <cstdint>
14+
15+
// <cstdint> for 'uint32_t' type is included in upper-level device
16+
// interface file ('esimdcpu_device_interface.hpp')
1517

1618
// This file defines function interfaces for ESIMD CPU Emulation
1719
// (ESIMD_CPU) to access LibCM CPU emulation functionalities from

sycl/include/CL/sycl/INTEL/esimd/detail/emu/esimdcpu_device_interface.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020

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

23+
// 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
25+
// ESIMDDeviceInterface' definition.
26+
#include <cstdint>
27+
2328
__SYCL_INLINE_NAMESPACE(cl) {
2429
namespace sycl {
2530
namespace detail {

sycl/include/CL/sycl/INTEL/esimd/detail/esimd_memory_intrin.hpp

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -777,19 +777,22 @@ __esimd_dp4(sycl::INTEL::gpu::vector_type_t<Ty, N> v1,
777777
}
778778

779779
inline void __esimd_slm_init(size_t size) {
780-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
780+
sycl::detail::ESIMDDeviceInterface *I =
781+
sycl::detail::getESIMDDeviceInterface();
781782

782783
I->cm_slm_init_ptr(size);
783784
}
784785

785786
inline void __esimd_barrier() {
786-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
787+
sycl::detail::ESIMDDeviceInterface *I =
788+
sycl::detail::getESIMDDeviceInterface();
787789

788790
I->cm_barrier_ptr();
789791
}
790792

791793
inline void __esimd_sbarrier(sycl::INTEL::gpu::EsimdSbarrierType flag) {
792-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
794+
sycl::detail::ESIMDDeviceInterface *I =
795+
sycl::detail::getESIMDDeviceInterface();
793796

794797
I->cm_sbarrier_ptr((uint)flag);
795798
}
@@ -801,7 +804,8 @@ inline sycl::INTEL::gpu::vector_type_t<Ty, N>
801804
__esimd_slm_read(sycl::INTEL::gpu::vector_type_t<uint32_t, N> addrs,
802805
sycl::INTEL::gpu::vector_type_t<uint16_t, N> pred) {
803806
sycl::INTEL::gpu::vector_type_t<Ty, N> retv;
804-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
807+
sycl::detail::ESIMDDeviceInterface *I =
808+
sycl::detail::getESIMDDeviceInterface();
805809

806810
char *SlmBase = I->__cm_emu_get_slm_ptr();
807811

@@ -816,7 +820,8 @@ inline void
816820
__esimd_slm_write(sycl::INTEL::gpu::vector_type_t<uint32_t, N> addrs,
817821
sycl::INTEL::gpu::vector_type_t<Ty, N> vals,
818822
sycl::INTEL::gpu::vector_type_t<uint16_t, N> pred) {
819-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
823+
sycl::detail::ESIMDDeviceInterface *I =
824+
sycl::detail::getESIMDDeviceInterface();
820825

821826
char *SlmBase = I->__cm_emu_get_slm_ptr();
822827

@@ -828,7 +833,8 @@ template <typename Ty, int N>
828833
inline sycl::INTEL::gpu::vector_type_t<Ty, N>
829834
__esimd_slm_block_read(uint32_t addr) {
830835
sycl::INTEL::gpu::vector_type_t<Ty, N> retv;
831-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
836+
sycl::detail::ESIMDDeviceInterface *I =
837+
sycl::detail::getESIMDDeviceInterface();
832838

833839
char *SlmBase = I->__cm_emu_get_slm_ptr();
834840

@@ -842,7 +848,8 @@ template <typename Ty, int N>
842848
inline void
843849
__esimd_slm_block_write(uint32_t addr,
844850
sycl::INTEL::gpu::vector_type_t<Ty, N> vals) {
845-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
851+
sycl::detail::ESIMDDeviceInterface *I =
852+
sycl::detail::getESIMDDeviceInterface();
846853

847854
char *SlmBase = I->__cm_emu_get_slm_ptr();
848855

@@ -855,7 +862,8 @@ inline sycl::INTEL::gpu::vector_type_t<Ty, N * NumChannels(Mask)>
855862
__esimd_slm_read4(sycl::INTEL::gpu::vector_type_t<uint32_t, N> addrs,
856863
sycl::INTEL::gpu::vector_type_t<uint16_t, N> pred) {
857864
sycl::INTEL::gpu::vector_type_t<Ty, N * NumChannels(Mask)> retv;
858-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
865+
sycl::detail::ESIMDDeviceInterface *I =
866+
sycl::detail::getESIMDDeviceInterface();
859867

860868
char *ReadBase = I->__cm_emu_get_slm_ptr();
861869

@@ -869,7 +877,8 @@ inline void __esimd_slm_write4(
869877
sycl::INTEL::gpu::vector_type_t<uint32_t, N> addrs,
870878
sycl::INTEL::gpu::vector_type_t<Ty, N * NumChannels(Mask)> vals,
871879
sycl::INTEL::gpu::vector_type_t<uint16_t, N> pred) {
872-
ESIMDDeviceInterface *I = getESIMDDeviceInterface();
880+
sycl::detail::ESIMDDeviceInterface *I =
881+
sycl::detail::getESIMDDeviceInterface();
873882

874883
char *WriteBase = I->__cm_emu_get_slm_ptr();
875884

sycl/source/detail/pi.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
/// \file pi.cpp/
10-
// Implementation of C++ wrappers for PI interface.
9+
/// \file pi.cpp
10+
/// Implementation of C++ wrappers for PI interface.
1111
///
1212
/// \ingroup sycl_pi
1313

@@ -60,7 +60,7 @@ void *getPluginOpaqueData(void *OpaqueDataParam) {
6060
cl::sycl::detail::pi::getPlugin<BE>();
6161

6262
Plugin.call<cl::sycl::detail::PiApiKind::piextPluginGetOpaqueData>(
63-
opaquedata_arg, &ReturnOpaqueData);
63+
OpaqueDataParam, &ReturnOpaqueData);
6464

6565
return ReturnOpaqueData;
6666
}

sycl/source/detail/plugin.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#include <CL/sycl/backend_types.hpp>
1111
#include <CL/sycl/detail/common.hpp>
1212
#include <CL/sycl/detail/pi.hpp>
13-
#include <CL/sycl/detail/plugin_printers.hpp>
1413
#include <CL/sycl/stl.hpp>
14+
#include <detail/plugin_printers.hpp>
1515
#include <memory>
1616
#include <mutex>
1717

0 commit comments

Comments
 (0)