Skip to content

[SYCL][ESIMD][EMU] Memory intrinsic updates for ESIMD_EMU plugin #4748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 50 commits into from
Feb 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
77e5c8d
[SYCL][ESIMD][EMU] Memory intrinsic updates for ESIMD_EMU plugin
dongkyunahn-intel Oct 11, 2021
bff7edd
Intrinsic implementations for ESIMD_EMU
dongkyunahn-intel Oct 11, 2021
54da408
slm_init() refactoring
dongkyunahn-intel Oct 12, 2021
ab85953
Comments for if(SLM_BTI) and otherwise case
dongkyunahn-intel Oct 12, 2021
0e6c1ee
SLM_BTI fixes / Function argument reference fixes
dongkyunahn-intel Oct 12, 2021
e3a94bc
Removing unnecessary comment
dongkyunahn-intel Oct 13, 2021
8cb68ec
Sanity check for whether ESIMD_EMU pi module is loaded or not
dongkyunahn-intel Oct 13, 2021
7b6629b
Merge branch 'sycl' of https://github.com/intel/llvm into esimd_emu_m…
dongkyunahn-intel Nov 18, 2021
fa4afaf
Merge branch 'sycl' of https://github.com/intel/llvm into esimd_emu_m…
dongkyunahn-intel Dec 1, 2021
692f8c8
Memory intrinsic update for ESIMD_EMULATOR
dongkyunahn-intel Dec 1, 2021
808d0c4
Version info fix for interface version upgrade
dongkyunahn-intel Dec 6, 2021
09ec042
Removing outdated LowerESIMD.cpp for pulling sycl
dongkyunahn-intel Jan 22, 2022
edb02da
Merge branch 'sycl' of https://github.com/intel/llvm into esimd_emu_m…
dongkyunahn-intel Jan 22, 2022
a7e346e
Build error fix after merging sycl
dongkyunahn-intel Jan 22, 2022
7be1079
Reverting __esimd_slm_init lowering
dongkyunahn-intel Jan 24, 2022
bec4d3c
clang-format fix
dongkyunahn-intel Jan 24, 2022
db22be4
Merge branch 'sycl' of https://github.com/intel/llvm into esimd_emu_m…
dongkyunahn-intel Jan 24, 2022
e3f826a
Creating dummy header file - cm_rt.h
dongkyunahn-intel Jan 24, 2022
49f687d
Fix for odr test failure - slm_init()
dongkyunahn-intel Jan 24, 2022
169d8bd
clang-format error fix
dongkyunahn-intel Jan 24, 2022
d3b458f
Enabling __esimd_gather_masked_scaled2
dongkyunahn-intel Jan 24, 2022
2fcffc8
Applying __ESIMD_API macro for slm_init()
dongkyunahn-intel Jan 24, 2022
322ceaa
Update sycl/include/sycl/ext/intel/experimental/esimd/detail/memory_i…
dongkyunahn-intel Jan 25, 2022
a5a6f07
Addressing Konst's comment
dongkyunahn-intel Jan 24, 2022
1a5c0a1
__esimd_emu_pi_load_check is moved in into getESIMDDeviceInterface()
dongkyunahn-intel Jan 24, 2022
8b4c952
Serializing access to PiESimdSurfaceMap
dongkyunahn-intel Jan 25, 2022
8f0d0eb
get_cm_surface_index() returns surface index as return value
dongkyunahn-intel Jan 25, 2022
588067e
Comment update
dongkyunahn-intel Jan 25, 2022
1ca19de
Comment on newly added interface functions
dongkyunahn-intel Jan 25, 2022
c2eaf05
clang-format fix
dongkyunahn-intel Jan 25, 2022
db3736a
slm_init failure fix
dongkyunahn-intel Jan 25, 2022
7137dd6
clang-format fix
dongkyunahn-intel Jan 25, 2022
2e43a71
Refactoring : __esimd_*_gather/scatter4_scaled
dongkyunahn-intel Jan 25, 2022
ccdaf45
Removing __SYCL_EXPLICIT_SIMD_PLUGIN__
dongkyunahn-intel Jan 26, 2022
1d49b17
Removing unnecessary intermediate variable for ESIMDeviceInterface
dongkyunahn-intel Jan 27, 2022
9381f55
Updating pi_esimd_emualtor implementation
dongkyunahn-intel Jan 27, 2022
dd3bcba
Lowering "__esimd_slm_init"
dongkyunahn-intel Jan 27, 2022
faa7bda
PlatformCache for piPlatformsGet PI_API
dongkyunahn-intel Jan 27, 2022
e0cf9ed
Enabling single-entry device cache
dongkyunahn-intel Jan 27, 2022
3863705
Merging ESIMDDeviceInterface version 2 table to version 1
dongkyunahn-intel Jan 27, 2022
263e831
Fixing lower_intrins.ll failure
dongkyunahn-intel Jan 27, 2022
f00480f
Merge branch 'sycl' of https://github.com/intel/llvm into esimd_emu_m…
dongkyunahn-intel Jan 28, 2022
0c6f70b
Merge branch 'sycl' of https://github.com/intel/llvm into esimd_emu_m…
dongkyunahn-intel Jan 31, 2022
251fe21
Addressing Konst's comments
dongkyunahn-intel Feb 2, 2022
16f7c3f
Merge branch 'sycl' of https://github.com/intel/llvm into esimd_emu_m…
dongkyunahn-intel Feb 2, 2022
3ae4be4
Missing change from pulling sycl branch
dongkyunahn-intel Feb 2, 2022
60d1107
Excluding 'PromoT' work-around for ESIMD_EMULATOR
dongkyunahn-intel Feb 2, 2022
d4edc16
Initializing return vector in 'gather' memory intrinsic
dongkyunahn-intel Feb 4, 2022
d7ec3ca
Merge branch 'sycl' of https://github.com/intel/llvm into esimd_emu_m…
dongkyunahn-intel Feb 15, 2022
69f01cf
Recovering 'PromoT' for ESIMD_EMULATOR for half_type support
dongkyunahn-intel Feb 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/SYCLLowerIR/ESIMD/LowerESIMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ size_t SYCLLowerESIMDPass::runOnFunction(Function &F,
// process ESIMD builtins that go through special handling instead of
// the translation procedure
// TODO FIXME slm_init should be made top-level __esimd_slm_init
if (Name.startswith("N2cl4sycl3ext5intel12experimental5esimd8slm_init")) {
if (Name.startswith("__esimd_slm_init")) {
// tag the kernel with meta-data SLMSize, and remove this builtin
translateSLMInit(*CI);
ToErase.push_back(CI);
Expand Down
2 changes: 0 additions & 2 deletions llvm/test/SYCLLowerIR/ESIMD/lower_intrins.ll
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ define dso_local spir_kernel void @FUNC_30() {
; CHECK: define dso_local spir_kernel void @FUNC_30()
call spir_func void @_ZN2cl4sycl3ext5intel12experimental5esimd8slm_initEj(i32 1023)
ret void
; CHECK-NEXT: ret void
}

define dso_local spir_func <16 x i32> @FUNC_32() {
Expand Down Expand Up @@ -327,6 +326,5 @@ attributes #0 = { "genx_byte_offset"="192" "genx_volatile" }
!genx.kernels = !{!0}

!0 = !{void ()* @"FUNC_30", !"FUNC_30", !1, i32 0, i32 0, !1, !2, i32 0, i32 0}
; CHECK: !0 = !{void ()* @FUNC_30, !"FUNC_30", !1, i32 1023, i32 0, !1, !2, i32 0, i32 0}
!1 = !{i32 0, i32 0}
!2 = !{}
15 changes: 10 additions & 5 deletions sycl/include/sycl/ext/intel/experimental/esimd/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,23 @@ static inline constexpr saturation_on_tag saturation_on{};
/// Represents a pixel's channel.
enum class rgba_channel : uint8_t { R, G, B, A };

/// Surface index type. Surface is an internal representation of a memory block
/// addressable by GPU in "stateful" memory model, and each surface is
/// identified by its "binding table index" - surface index.
using SurfaceIndex = unsigned int;

namespace detail {
template <rgba_channel Ch>
static inline constexpr uint8_t ch = 1 << static_cast<int>(Ch);
static inline constexpr uint8_t chR = ch<rgba_channel::R>;
static inline constexpr uint8_t chG = ch<rgba_channel::G>;
static inline constexpr uint8_t chB = ch<rgba_channel::B>;
static inline constexpr uint8_t chA = ch<rgba_channel::A>;

// Shared Local Memory Binding Table Index (aka surface index).
static inline constexpr SurfaceIndex SLM_BTI = 254;
static inline constexpr SurfaceIndex INVALID_BTI =
static_cast<SurfaceIndex>(-1);
} // namespace detail

/// Represents a pixel's channel mask - all possible combinations of enabled
Expand Down Expand Up @@ -190,11 +200,6 @@ enum class split_barrier_action : uint8_t {
signal = 1, // split barrier signal
};

/// Surface index type. Surface is an internal representation of a memory block
/// addressable by GPU in "stateful" memory model, and each surface is
/// identified by its "binding table index" - surface index.
using SurfaceIndex = unsigned int;

/// @} sycl_esimd_core

} // namespace esimd
Expand Down
Loading