Skip to content

[OpenCL] Add build entry point for OpenCL CPU RT #8218

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 15 additions & 1 deletion buildbot/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def do_configure(args):
if not os.path.isdir(abs_obj_dir):
os.makedirs(abs_obj_dir)

llvm_external_projects = 'sycl;llvm-spirv;opencl;xpti;xptifw'
llvm_external_projects = 'sycl;llvm-spirv;opencl-cpu;opencl;xpti;xptifw'

# libdevice build requires a working SYCL toolchain, which is not the case
# with macOS target right now.
Expand Down Expand Up @@ -51,6 +51,8 @@ def do_configure(args):
llvm_build_shared_libs = 'OFF'
llvm_enable_lld = 'OFF'
sycl_enabled_plugins = ["opencl"]
sycl_enable_opencl_cpu_rt_build = 'OFF'
sycl_enable_fpga_emu_build = 'OFF'

sycl_enable_xpti_tracing = 'ON'
xpti_enable_werror = 'OFF'
Expand All @@ -65,6 +67,12 @@ def do_configure(args):
if args.enable_esimd_emulator:
sycl_enabled_plugins.append("esimd_emulator")

if args.bldocl:
sycl_enable_opencl_cpu_rt_build = 'ON'

if args.bldfpgaemu:
sycl_enable_fpga_emu_build = 'ON'

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

Expand Down Expand Up @@ -156,6 +164,10 @@ def do_configure(args):
"-DLIBCLC_GENERATE_REMANGLED_VARIANTS={}".format(libclc_gen_remangled_variants),
"-DSYCL_BUILD_PI_HIP_PLATFORM={}".format(sycl_build_pi_hip_platform),
"-DLLVM_BUILD_TOOLS=ON",
"-DOPENCL_INTREE_BUILD=ON",
"-DSYCL_ENALBE_OPENCL_CPU_RT_BUILD={}".format(sycl_enable_opencl_cpu_rt_build),
"-DSYCL_ENALBE_FPGA_EMU_RT_BUILD={}".format(sycl_enable_fpga_emu_build),
"-DCOMMON_CLANG_LIBRARY_NAME=common_clang",
"-DSYCL_ENABLE_WERROR={}".format(sycl_werror),
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
"-DSYCL_INCLUDE_TESTS=ON", # Explicitly include all kinds of SYCL tests.
Expand Down Expand Up @@ -232,6 +244,8 @@ def main():
parser.add_argument("--host-target", default='X86',
help="host LLVM target architecture, defaults to X86, multiple targets may be provided as a semi-colon separated string")
parser.add_argument("--enable-esimd-emulator", action='store_true', help="build with ESIMD emulation support")
parser.add_argument("-bldocl", "--bldocl", action='store_true', help="build OpenCL CPU RT")
parser.add_argument("-bldfpgaemu", "--bldfpgaemu", action='store_true', help="build FPGA EMU RT")
parser.add_argument("--enable-all-llvm-targets", action='store_true', help="build compiler with all supported targets, it doesn't change runtime build")
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
Expand Down
8 changes: 8 additions & 0 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,5 +478,13 @@ add_custom_target(deploy-sycl-toolchain
DEPENDS sycl-toolchain ${manifest_list}
)

if (SYCL_ENALBE_OPENCL_CPU_RT_BUILD)
add_dependencies(deploy-sycl-toolchain deploy-ocl-cpu)
endif(SYCL_ENALBE_OPENCL_CPU_RT_BUILD)

if (SYCL_ENALBE_FPGA_EMU_RT_BUILD)
add_dependencies(deploy-sycl-toolchain deploy-fpga-emu)
endif(SYCL_ENALBE_FPGA_EMU_RT_BUILD)

# SYCL Runtime documentation
add_subdirectory(doc)