Skip to content

[SYCL][CMake] Move opencl-aot to opencl #3670

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 1 commit into from
May 6, 2021
Merged
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
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ clang/**/Driver @mdtoguchi @AGindinson
# LLVM-SPIRV translator
llvm-spirv/ @AlexeySotkin @AlexeySachkov

# OpenCL deps
opencl/ @pvchupin @vladimirlaz

# OpenCL "offline" compiler
opencl-aot/ @dm-vodopyanov @AlexeySachkov @romanovvlad
opencl/opencl-aot/ @dm-vodopyanov @AlexeySachkov @romanovvlad

# Device library
libdevice/ @vzakhari @jinge90
Expand Down
1 change: 0 additions & 1 deletion buildbot/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def do_compile(args):
"--build", abs_obj_dir,
"--",
"deploy-sycl-toolchain",
"deploy-opencl-aot",
"-j", str(cpu_count)]

if args.verbose:
Expand Down
2 changes: 1 addition & 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;opencl-aot;libdevice;xpti;xptifw'
llvm_external_projects = 'sycl;llvm-spirv;opencl;libdevice;xpti;xptifw'

llvm_dir = os.path.join(abs_src_dir, "llvm")
sycl_dir = os.path.join(abs_src_dir, "sycl")
Expand Down
115 changes: 0 additions & 115 deletions opencl-aot/CMakeLists.txt

This file was deleted.

5 changes: 3 additions & 2 deletions opencl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(OCL_LOADER_TAG 5f8249691ec8c25775789498951f8e9eb62c201d)

# OpenCL Headers
if(NOT OpenCL_HEADERS)
message(STATUS "Will fetch OpenCL headers from github.com")
message(STATUS "Will fetch OpenCL headers from ${OCL_HEADERS_REPO}")

FetchContent_Declare(ocl-headers
GIT_REPOSITORY ${OCL_HEADERS_REPO}
Expand Down Expand Up @@ -49,7 +49,7 @@ set(OPENCL_ICD_LOADER_HEADERS_DIR
set(BUILD_SHARED_LIBS ON)

if(NOT OpenCL_LIBRARY_SRC)
message(STATUS "Will fetch OpenCL ICD Loader from github.com")
message(STATUS "Will fetch OpenCL ICD Loader from ${OCL_LOADER_REPO}")

FetchContent_Declare(ocl-icd
GIT_REPOSITORY ${OCL_LOADER_REPO}
Expand All @@ -69,3 +69,4 @@ endif()
FetchContent_MakeAvailable(ocl-icd)
add_library(OpenCL-ICD ALIAS OpenCL)

add_subdirectory(opencl-aot)
File renamed without changes.
File renamed without changes.
18 changes: 18 additions & 0 deletions opencl/opencl-aot/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
cmake_minimum_required(VERSION 3.14)

set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
Support
)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
file(GLOB TARGET_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/source/*.cpp)

set(OPENCL_AOT_PROJECT_NAME opencl-aot)

add_llvm_tool(${OPENCL_AOT_PROJECT_NAME} ${TARGET_SOURCES})

target_link_libraries(${OPENCL_AOT_PROJECT_NAME}
PRIVATE
OpenCL-Headers
OpenCL-ICD)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 2 additions & 7 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -190,17 +190,11 @@ add_custom_target( sycl-toolchain
llvm-objcopy
sycl-post-link
sycl-ls
opencl-aot
${XPTIFW_LIBS}
COMMENT "Building SYCL compiler toolchain..."
)

# Check if opencl-aot tool is enabled.
list(FIND LLVM_ENABLE_PROJECTS opencl-aot OPENCL_AOT_FOUND)
if(NOT OPENCL_AOT_FOUND EQUAL -1)
add_dependencies(sycl-toolchain opencl-aot)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS opencl-aot)
endif()

if (SYCL_ENABLE_XPTI_TRACING)
add_dependencies( sycl-toolchain xpti)
if (MSVC)
Expand Down Expand Up @@ -246,6 +240,7 @@ set( SYCL_TOOLCHAIN_DEPLOY_COMPONENTS
sycl-ls
clang-resource-headers
OpenCL-Headers
opencl-aot
sycl-headers
sycl-headers-extras
sycl
Expand Down
2 changes: 1 addition & 1 deletion sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ AOT compiler for each device type:
#### CPU

* CPU AOT compiler `opencl-aot` is enabled by default. For more, see
[opencl-aot documentation](../../opencl-aot/README.md).
[opencl-aot documentation](../../opencl/opencl-aot/README.md).

#### Accelerator

Expand Down