Skip to content

[SYCL][ESIMD] Bring vc-intrinsics sources #1930

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
Jun 26, 2020
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
31 changes: 30 additions & 1 deletion sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.2)
cmake_minimum_required(VERSION 3.14)

project(sycl-solution)
# Requirements
Expand Down Expand Up @@ -184,6 +184,35 @@ install(DIRECTORY ${OPENCL_INCLUDE}/CL
COMPONENT opencl-headers
)

# vc-intrinsics could have been added earlier from llvm/projects
if (NOT TARGET LLVMGenXIntrinsics)
if (NOT DEFINED LLVMGenXIntrinsics_SOURCE_DIR)
message(STATUS "vc-intrinsics are missing. Will try to download them from github.com")

include(FetchContent)
FetchContent_Declare(vc-intrinsics
GIT_REPOSITORY https://github.com/intel/vc-intrinsics.git
GIT_TAG cce6e48c28eb850d7dadd30841c0d95f009bbca1
)
FetchContent_MakeAvailable(vc-intrinsics)
FetchContent_GetProperties(vc-intrinsics)

set(LLVMGenXIntrinsics_SOURCE_DIR ${vc-intrinsics_SOURCE_DIR})
set(LLVMGenXIntrinsics_BINARY_DIR ${vc-intrinsics_BINARY_DIR})
else()
# -DLLVMGenXIntrinsics_SOURCE_DIR is provided
message(STATUS "vc-intrinsics are added manually ${LLVMGenXIntrinsics_SOURCE_DIR}")

set(LLVMGenXIntrinsics_BINARY_DIR ${CMAKE_BINARY_DIR}/vc-intrinsics-build)
add_subdirectory(${LLVMGenXIntrinsics_SOURCE_DIR} ${LLVMGenXIntrinsics_BINARY_DIR})
endif()

target_include_directories(LLVMGenXIntrinsics
PUBLIC $<BUILD_INTERFACE:${LLVMGenXIntrinsics_SOURCE_DIR}/GenXIntrinsics/include>
PUBLIC $<BUILD_INTERFACE:${LLVMGenXIntrinsics_BINARY_DIR}/GenXIntrinsics/include>
)
endif()

option(SYCL_BUILD_PI_CUDA
"Enables the CUDA backend for the Plugin Interface" OFF)

Expand Down
2 changes: 1 addition & 1 deletion sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and a wide range of compute accelerators such as GPU and FPGA.
## Prerequisites

* `git` - [Download](https://git-scm.com/downloads)
* `cmake` version 3.2 or later - [Download](http://www.cmake.org/download/)
* `cmake` version 3.14 or later - [Download](http://www.cmake.org/download/)
* `python` - [Download](https://www.python.org/downloads/release/python-2716/)
* `ninja` -
[Download](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages)
Expand Down