Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b010840
Enabling ESIMD_EMU support build by default
dongkyunahn-intel Nov 19, 2021
f8ae218
Replacing ESIMDEmu with ESIMDCPU for legacy CM_EMU
dongkyunahn-intel Nov 30, 2021
1d8cb9c
PI Device info update
dongkyunahn-intel Dec 1, 2021
183a2b3
Removing command line option for esimd_cpu_emulation
dongkyunahn-intel Dec 2, 2021
340e5dd
Applying reducing overhead on command creation for ESIMD_EMULATOR BE
dongkyunahn-intel Dec 2, 2021
8ba735d
ESIMD_EMULATOR plug-in update for bringing-up intel/llvm-test-suite
dongkyunahn-intel Dec 6, 2021
0b9c1e7
Removing 'TODO' comments for tests from intel/llvm-test-suite
dongkyunahn-intel Dec 14, 2021
e01e682
Merge branch 'sycl' of https://github.com/intel/llvm into enable_esim…
dongkyunahn-intel Dec 17, 2021
11155d1
Build error fix after pulling sycl branch
dongkyunahn-intel Dec 17, 2021
7efcbc0
clang-format fix
dongkyunahn-intel Dec 17, 2021
5471769
CM-EMU Device version info composition
dongkyunahn-intel Dec 20, 2021
85baa6c
Merge branch 'sycl' of https://github.com/intel/llvm into enable_esim…
dongkyunahn-intel Jan 11, 2022
706c8f6
Correction : Version format check
dongkyunahn-intel Jan 12, 2022
02ebd74
clang-format error fix
dongkyunahn-intel Jan 12, 2022
0097e37
Merge branch 'sycl' of https://github.com/intel/llvm into enable_esim…
dongkyunahn-intel Jan 12, 2022
9cd3b6d
Patching works for suppressing warning message
dongkyunahn-intel Jan 13, 2022
090eef8
Merge branch 'sycl' of https://github.com/intel/llvm into enable_esim…
dongkyunahn-intel Jan 14, 2022
d0ac755
Returning single-entry CM device list only for GPU type request
dongkyunahn-intel Jan 14, 2022
d71a04d
Updating returning platform info with NumEntries
dongkyunahn-intel Jan 15, 2022
6f1034e
Single-point-of-return for EnqueueKernel
dongkyunahn-intel Jan 15, 2022
71802cc
Adding command line option for disabling ESIMD_EMULATOR build
dongkyunahn-intel Jan 18, 2022
139a549
Updating pi_esimd_emulator build due to update in open-source CM_EMU
dongkyunahn-intel Jan 18, 2022
bba4c55
Merge branch 'sycl' of https://github.com/intel/llvm into enable_esim…
dongkyunahn-intel Jan 18, 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
5 changes: 0 additions & 5 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def do_configure(args):
libclc_targets_to_build = ''
libclc_gen_remangled_variants = 'OFF'
sycl_build_pi_cuda = 'OFF'
sycl_build_pi_esimd_emulator = 'OFF'
sycl_build_pi_hip = 'OFF'
sycl_build_pi_hip_platform = 'AMD'
sycl_clang_extra_flags = ''
Expand All @@ -55,9 +54,6 @@ def do_configure(args):
if args.arm:
llvm_targets_to_build = 'ARM;AArch64'

if args.enable_esimd_cpu_emulation:
sycl_build_pi_esimd_emulator = 'ON'

if args.cuda or args.hip:
llvm_enable_projects += ';libclc'

Expand Down Expand Up @@ -131,7 +127,6 @@ def do_configure(args):
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
"-DSYCL_ENABLE_XPTI_TRACING={}".format(sycl_enable_xpti_tracing),
"-DLLVM_ENABLE_LLD={}".format(llvm_enable_lld),
"-DSYCL_BUILD_PI_ESIMD_EMULATOR={}".format(sycl_build_pi_esimd_emulator),
"-DXPTI_ENABLE_WERROR={}".format(xpti_enable_werror),
"-DSYCL_CLANG_EXTRA_FLAGS={}".format(sycl_clang_extra_flags)
]
Expand Down
14 changes: 4 additions & 10 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,11 @@ if(SYCL_BUILD_PI_HIP)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS libspirv-builtins pi_hip)
endif()

if (SYCL_BUILD_PI_ESIMD_EMULATOR)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS pi_esimd_emulator libcmrt-headers)
if (MSVC)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS libcmrt-libs libcmrt-dlls)
else()
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS libcmrt-sos)
endif()
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS pi_esimd_emulator libcmrt-headers)
if (MSVC)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS libcmrt-libs libcmrt-dlls)
else()
# TODO/FIXME : Removing empty header file (cm_rt.h) generation when
# the ESIMD_EMULATOR support is enabled by default
file (TOUCH ${SYCL_INCLUDE_BUILD_DIR}/sycl/CL/cm_rt.h)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS libcmrt-sos)
endif()

# Use it as fake dependency in order to force another command(s) to execute.
Expand Down
4 changes: 1 addition & 3 deletions sycl/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@ add_subdirectory(level_zero)
# TODO : Remove 'if (NOT MSVC)' when CM_EMU supports Windows
# environment
if (NOT MSVC)
if (SYCL_BUILD_PI_ESIMD_EMULATOR)
add_subdirectory(esimd_emulator)
endif()
add_subdirectory(esimd_emulator)
endif()
40 changes: 30 additions & 10 deletions sycl/plugins/esimd_emulator/pi_esimd_emulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
#include <CL/sycl/nd_item.hpp>
#include <CL/sycl/range.hpp>

#include <esimdemu_support.h>
// TODO : Rename esimdcpu to esimdemu for next CM_EMU release
#include <esimdcpu_support.h>

#include <cstdarg>
#include <cstdio>
Expand Down Expand Up @@ -123,6 +124,9 @@ static sycl::detail::ESIMDEmuPluginOpaqueData *PiESimdDeviceAccess;
// interface header file
#define ESIMDEmuPluginInterfaceVersion 1

// For PI_DEVICE_INFO_DRIVER_VERSION info
static char ESimdEmuVersionString[32];

using IDBuilder = sycl::detail::Builder;

template <int NDims>
Expand Down Expand Up @@ -242,7 +246,9 @@ template <int DIMS> class libCMBatch {
GroupDim[I] = (uint32_t)(GlobalSize[I] / LocalSize[I]);
}

EsimdemuKernel Esimdemu((fptrVoid)InvokeLambda<DIMS>, GroupDim, SpaceDim);
// TODO : Replace ESimdCPUKernel with EsimdemuKernel for next
// CM_EMU release
ESimdCPUKernel Esimdemu((fptrVoid)InvokeLambda<DIMS>, GroupDim, SpaceDim);

Esimdemu.launchMT(sizeof(struct LambdaWrapper<DIMS>), WrappedLambda.get());
}
Expand Down Expand Up @@ -398,7 +404,7 @@ pi_result piPlatformGetInfo(pi_platform Platform, pi_platform_info ParamName,
return ReturnValue("Intel(R) Corporation");

case PI_PLATFORM_INFO_VERSION:
return ReturnValue(Platform->CmEmuVersion);
return ReturnValue(Platform->CmEmuVersion.c_str());

case PI_PLATFORM_INFO_PROFILE:
return ReturnValue("FULL_PROFILE");
Expand Down Expand Up @@ -499,7 +505,13 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
case PI_DEVICE_INFO_IMAGE_SUPPORT:
return ReturnValue(pi_bool{true});
case PI_DEVICE_INFO_DRIVER_VERSION:
return ReturnValue("0.0.1");
/// Combination of ESIMDEmuPluginDataVersion and
/// ESIMDEmuPluginInterfaceVersion : 0.a.b
/// a : ESIMDEmuPluginInterfaceVersion
/// b : ESIMDEmuPluginDataVersion
sprintf(ESimdEmuVersionString, "0.%d.%d", ESIMDEmuPluginInterfaceVersion,
ESIMDEmuPluginDataVersion);
return ReturnValue(ESimdEmuVersionString);
case PI_DEVICE_INFO_VENDOR:
return ReturnValue("Intel(R) Corporation");
case PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH:
Expand All @@ -513,6 +525,20 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
// cl_khr_fp64, cl_khr_int64_base_atomics,
// cl_khr_int64_extended_atomics
return ReturnValue("");
case PI_DEVICE_INFO_VERSION:
// CM_EMU release version from
// https://github.com/intel/cm-cpu-emulation/releases
return ReturnValue("1.0.7-CM_EMU");
case PI_DEVICE_INFO_COMPILER_AVAILABLE:
return ReturnValue(pi_bool{false});
case PI_DEVICE_INFO_LINKER_AVAILABLE:
return ReturnValue(pi_bool{false});
case PI_DEVICE_INFO_MAX_COMPUTE_UNITS:
return ReturnValue(pi_uint32{256});
case PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES:
return ReturnValue(pi_uint32{0});
case PI_DEVICE_INFO_PARTITION_PROPERTIES:
return ReturnValue(pi_device_partition_property{0});

#define UNSUPPORTED_INFO(info) \
case info: \
Expand All @@ -523,9 +549,6 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
break;

UNSUPPORTED_INFO(PI_DEVICE_INFO_VENDOR_ID)
UNSUPPORTED_INFO(PI_DEVICE_INFO_COMPILER_AVAILABLE)
UNSUPPORTED_INFO(PI_DEVICE_INFO_LINKER_AVAILABLE)
UNSUPPORTED_INFO(PI_DEVICE_INFO_MAX_COMPUTE_UNITS)
UNSUPPORTED_INFO(PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS)
UNSUPPORTED_INFO(PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE)
UNSUPPORTED_INFO(PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES)
Expand All @@ -535,10 +558,7 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
UNSUPPORTED_INFO(PI_DEVICE_INFO_GLOBAL_MEM_SIZE)
UNSUPPORTED_INFO(PI_DEVICE_INFO_LOCAL_MEM_SIZE)
UNSUPPORTED_INFO(PI_DEVICE_INFO_AVAILABLE)
UNSUPPORTED_INFO(PI_DEVICE_INFO_VERSION)
UNSUPPORTED_INFO(PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES)
UNSUPPORTED_INFO(PI_DEVICE_INFO_REFERENCE_COUNT)
UNSUPPORTED_INFO(PI_DEVICE_INFO_PARTITION_PROPERTIES)
UNSUPPORTED_INFO(PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN)
UNSUPPORTED_INFO(PI_DEVICE_INFO_PARTITION_TYPE)
UNSUPPORTED_INFO(PI_DEVICE_INFO_OPENCL_C_VERSION)
Expand Down