Skip to content

[ESIMD] Enable esimd emulator build by default #5058

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 23 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 4 additions & 4 deletions buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ 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_esimd_emulator = 'ON'
sycl_build_pi_hip = 'OFF'
sycl_build_pi_hip_platform = 'AMD'
sycl_clang_extra_flags = ''
Expand All @@ -50,8 +50,8 @@ 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.disable_esimd_emulator:
sycl_build_pi_esimd_emulator = 'OFF'

if args.cuda or args.hip:
llvm_enable_projects += ';libclc'
Expand Down Expand Up @@ -213,7 +213,7 @@ def main():
parser.add_argument("--hip-platform", type=str, choices=['AMD', 'NVIDIA'], default='AMD', help="choose hardware platform for HIP backend")
parser.add_argument("--hip-amd-arch", type=str, help="Sets AMD gpu architecture for llvm lit tests, this is only needed for the HIP backend and AMD platform")
parser.add_argument("--arm", action='store_true', help="build ARM support rather than x86")
parser.add_argument("--enable-esimd-cpu-emulation", action='store_true', help="build with ESIMD_CPU emulation support")
parser.add_argument("--disable-esimd-emulator", action='store_true', help="exclude ESIMD_EMULATOR support")
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
parser.add_argument("--no-werror", action='store_true', help="Don't treat warnings as errors")
Expand Down
14 changes: 4 additions & 10 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -336,17 +336,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
8 changes: 4 additions & 4 deletions sycl/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ endif()
add_subdirectory(opencl)
add_subdirectory(level_zero)

# TODO : Remove 'if (NOT MSVC)' when CM_EMU supports Windows
# environment
if (NOT MSVC)
if (SYCL_BUILD_PI_ESIMD_EMULATOR)
if(SYCL_BUILD_PI_ESIMD_EMULATOR)
# TODO : Remove 'if (NOT MSVC)' when CM_EMU supports Windows
# environment
if (NOT MSVC)
add_subdirectory(esimd_emulator)
endif()
endif()
8 changes: 7 additions & 1 deletion sycl/plugins/esimd_emulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@ else ()
if (MSVC)
message(FATAL_ERROR "Online-building of CM_EMU library is not supported under Windows environment")
else()
# Arguments for online patching to suppress log message from CM_EMU
# Replacing CM_EMU's log print-out macro controlled by 'GFX_EMU_WITH_FLAGS_'
# with blank space from $CM_EMU_SRC/common/emu_log.h
set (replacing_pattern s/{\ ?GFX_EMU_WITH_FLAGS_.*//g)
ExternalProject_Add(cm-emu
GIT_REPOSITORY https://github.com/intel/cm-cpu-emulation.git
GIT_TAG c19234cea13bdfc32b5ed9
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_build
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_install
PATCH_COMMAND perl -pi.back -e ${replacing_pattern} ${CMAKE_CURRENT_BINARY_DIR}/cm-emu-prefix/src/cm-emu/common/emu_log.h
CMAKE_ARGS -DLIBVA_INSTALL_PATH=/usr
-D__SYCL_EXPLICIT_SIMD_PLUGIN__=true
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
Expand Down Expand Up @@ -139,7 +145,7 @@ install(TARGETS pi_esimd_emulator

# Copy CM Header files to $(INSTALL)/include/sycl/CL/
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cm-emu_install/include/libcm/cm/
DESTINATION ${SYCL_INCLUDE_DIR}/CL
DESTINATION ${SYCL_INCLUDE_DIR}/sycl/CL
COMPONENT libcmrt-headers
FILES_MATCHING PATTERN "*.h"
)
Expand Down
Loading