Skip to content

Commit f4b9079

Browse files
authored
Merge branch 'sycl-develop' into python-interface-enable-sycl
2 parents 5360aba + b4a9835 commit f4b9079

22 files changed

+2318
-60
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ if (CUTLASS_ENABLE_SYCL)
113113
add_compile_definitions(CUTLASS_SYCL_PROFILING_ENABLED)
114114
add_compile_definitions(SYCLCOMPAT_PROFILING_ENABLED)
115115
endif()
116+
117+
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/onemkl.cmake)
116118
endif()
117119
find_package(Doxygen QUIET)
118120

benchmarks/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ function(cutlass_benchmark_add_executable NAME)
6565
)
6666

6767
if (CUTLASS_ENABLE_SYCL)
68+
add_dependencies(${NAME} onemkl_project)
69+
target_include_directories(${NAME} PRIVATE ${ONEMKL_INCLUDE_DIR})
70+
target_link_libraries(${NAME} PUBLIC ${ONEMKL_LIB})
6871
add_sycl_to_target(TARGET ${NAME})
6972
endif()
7073

cmake/FindDPCPP.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ if(NOT "${DPCPP_SYCL_ARCH}" STREQUAL "")
5757
endif()
5858
endif()
5959

60+
if("${DPCPP_SYCL_TARGET}" STREQUAL "intel_gpu_pvc")
61+
list(APPEND DPCPP_FLAGS "-Xspirv-translator;--spirv-ext=+SPV_INTEL_split_barrier")
62+
endif()
63+
6064
if(UNIX)
6165
set_target_properties(DPCPP::DPCPP PROPERTIES
6266
INTERFACE_COMPILE_OPTIONS "${DPCPP_FLAGS};${DPCPP_COMPILE_ONLY_FLAGS}"

cmake/onemkl.cmake

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Copyright (c) 2024 - 2024 Codeplay Software Ltd. All rights reserved.
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
#
4+
# Redistribution and use in source and binary forms, with or without
5+
# modification, are permitted provided that the following conditions are met:
6+
#
7+
# 1. Redistributions of source code must retain the above copyright notice, this
8+
# list of conditions and the following disclaimer.
9+
#
10+
# 2. Redistributions in binary form must reproduce the above copyright notice,
11+
# this list of conditions and the following disclaimer in the documentation
12+
# and/or other materials provided with the distribution.
13+
#
14+
# 3. Neither the name of the copyright holder nor the names of its
15+
# contributors may be used to endorse or promote products derived from
16+
# this software without specific prior written permission.
17+
#
18+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
29+
include_guard()
30+
31+
include(ExternalProject)
32+
33+
set(ONEMKL_INSTALL_DIR ${CMAKE_BINARY_DIR}/deps/oneMKL)
34+
set(ONEMKL_INCLUDE_DIR ${ONEMKL_INSTALL_DIR}/include)
35+
set(ONEMKL_LIB_DIR ${ONEMKL_INSTALL_DIR}/lib)
36+
set(ONEMKL_LIB ${ONEMKL_LIB_DIR}/libonemkl.so)
37+
38+
ExternalProject_Add(
39+
onemkl_project
40+
41+
PREFIX ${ONEMKL_INSTALL_DIR}
42+
GIT_REPOSITORY "https://github.com/oneapi-src/oneMKL.git"
43+
GIT_TAG "v0.5"
44+
45+
CMAKE_ARGS
46+
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
47+
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
48+
-DCMAKE_GENERATOR=${CMAKE_GENERATOR}
49+
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
50+
-DCMAKE_INSTALL_PREFIX=${ONEMKL_INSTALL_DIR}
51+
-DCMAKE_SHARED_LINKER_FLAGS="-Wl,-rpath=${ONEMKL_LIB_DIR}"
52+
-DENABLE_MKLCPU_BACKEND=OFF
53+
-DENABLE_MKLGPU_BACKEND=OFF
54+
-DBUILD_FUNCTIONAL_TESTS=OFF
55+
-DBUILD_EXAMPLES=OFF
56+
-DBUILD_DOC=OFF
57+
-DTARGET_DOMAINS=rng
58+
INSTALL_DIR ${ONEMKL_INSTALL_DIR}
59+
BUILD_BYPRODUCTS ${ONEMKL_LIB}
60+
)
61+
62+
add_library(oneMKL SHARED IMPORTED)

examples/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ function(cutlass_example_add_executable NAME)
6969
)
7070

7171
if (CUTLASS_ENABLE_SYCL)
72+
add_dependencies(${NAME} onemkl_project)
73+
target_include_directories(${NAME} PRIVATE ${ONEMKL_INCLUDE_DIR})
74+
target_link_libraries(${NAME} PUBLIC ${ONEMKL_LIB})
7275
add_sycl_to_target(TARGET ${NAME})
7376
endif()
7477

examples/sycl/pvc/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,8 @@ cutlass_example_add_executable(
4141
pvc_collective_builder
4242
pvc_collective_builder.cpp
4343
)
44+
45+
cutlass_example_add_executable(
46+
pvc_gemm_streamk
47+
pvc_gemm_streamk.cpp
48+
)

0 commit comments

Comments
 (0)