From 894c308d4ec8427252e527652809f318e6e2cd88 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 19 Sep 2023 04:21:01 -0500 Subject: [PATCH 1/3] Remove stray space character from README.md The command to produce SPV from OpenCL source file had a stray space character in the middle of compiler flag, rendering the command invalid. --- examples/pybind11/use_dpctl_sycl_kernel/resource/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pybind11/use_dpctl_sycl_kernel/resource/README.md b/examples/pybind11/use_dpctl_sycl_kernel/resource/README.md index e83f8296a8..828d14d9d5 100644 --- a/examples/pybind11/use_dpctl_sycl_kernel/resource/README.md +++ b/examples/pybind11/use_dpctl_sycl_kernel/resource/README.md @@ -2,7 +2,7 @@ ```bash export TOOLS_DIR=$(dirname $(dirname $(which icx)))/bin-llvm -$TOOLS_DIR/clang -cc1 -triple spir double_it.cl -finclude-default-header -flto -emit -llvm-bc -o double_it.bc +$TOOLS_DIR/clang -cc1 -triple spir double_it.cl -finclude-default-header -flto -emit-llvm-bc -o double_it.bc $TOOLS_DIR/llvm-spirv double_it.bc -o double_it.spv rm double_it.bc ``` From 32c2bac6e294e535f0436d41354cf10565b3cc8f Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Fri, 15 Sep 2023 14:35:07 -0500 Subject: [PATCH 2/3] Fixed build break Ensure that libsyclinterface/include/*.hpp are copied at build time into dpctl/include/syclinterface, also make sure that *.hpp files are added to PUBLIC_HEADER property of DPCTLSyclInterface target --- dpctl/CMakeLists.txt | 2 +- libsyclinterface/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dpctl/CMakeLists.txt b/dpctl/CMakeLists.txt index 487a5782e2..5353348736 100644 --- a/dpctl/CMakeLists.txt +++ b/dpctl/CMakeLists.txt @@ -86,7 +86,7 @@ add_custom_target(_build_time_create_dpctl_include ALL ) set(_copied_header_files) -file(GLOB _syclinterface_h ${CMAKE_SOURCE_DIR}/libsyclinterface/include/*.h) +file(GLOB _syclinterface_h ${CMAKE_SOURCE_DIR}/libsyclinterface/include/*.h*) foreach(hf ${_syclinterface_h}) get_filename_component(_header_name ${hf} NAME) set(_target_header_file ${DPCTL_INCLUDE_DIR}/syclinterface/${_header_name}) diff --git a/libsyclinterface/CMakeLists.txt b/libsyclinterface/CMakeLists.txt index 79cea3696d..01b0321064 100644 --- a/libsyclinterface/CMakeLists.txt +++ b/libsyclinterface/CMakeLists.txt @@ -1,7 +1,8 @@ -cmake_minimum_required(VERSION 3.10...3.22 FATAL_ERROR) +cmake_minimum_required(VERSION 3.21...3.22 FATAL_ERROR) project( "libDPCTLSYCLInterface" + LANGUAGES C CXX DESCRIPTION "A C API for a subset of SYCL" ) @@ -259,8 +260,7 @@ endif() # Install all headers -file(GLOB MAIN_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") -file(GLOB MAIN_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp") +file(GLOB MAIN_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/include/*.hpp") file(GLOB SUPPORT_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/Support/*.h") file(GLOB CONFIG_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/Config/*.h") From b73df1f396b840b2748024c5ca6d5504eb3e9027 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Sat, 23 Sep 2023 08:40:07 -0500 Subject: [PATCH 3/3] Test that dpctl/include expected header files are in place --- dpctl/tests/test_service.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dpctl/tests/test_service.py b/dpctl/tests/test_service.py index 1161a42ec2..f16ff51227 100644 --- a/dpctl/tests/test_service.py +++ b/dpctl/tests/test_service.py @@ -68,6 +68,18 @@ def test_get_include(): assert type(incl) is str assert incl != "" assert os.path.isdir(incl) + assert os.path.exists(os.path.join(incl, "dpctl4pybind11.hpp")) + assert os.path.exists(os.path.join(incl, "dpctl_capi.h")) + assert os.path.exists(os.path.join(incl, "dpctl_sycl_interface.h")) + assert os.path.exists( + os.path.join(incl, "syclinterface", "Config", "dpctl_config.h") + ) + assert os.path.exists( + os.path.join(incl, "syclinterface", "dpctl_sycl_types.h") + ) + assert os.path.exists( + os.path.join(incl, "syclinterface", "dpctl_sycl_type_casters.hpp") + ) def test_get_dpcppversion():