Skip to content
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

Adding pSTL-offload sample #2374

Merged
merged 2 commits into from Jul 10, 2024
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
25 changes: 25 additions & 0 deletions Libraries/oneDPL/pSTL_offload/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cmake_minimum_required (VERSION 3.4.0)

set(CMAKE_CXX_COMPILER "icpx")

project (pSTL_offload)
# Set default build type to RelWithDebInfo if not specified
if (NOT CMAKE_BUILD_TYPE)
message (STATUS "Default CMAKE_BUILD_TYPE not set using Release with Debug Info")
set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE
STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel"
FORCE)
endif ()

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

option (BUILD_SYCL_MIGRATED_SUBPROJECT "Build targets from subproject FileWordCount" ON)
option (BUILD_SYCL_MIGRATED_SUBPROJECT "Build targets from subproject WordCount" ON)

if (BUILD_SYCL_MIGRATED_SUBPROJECT)
add_subdirectory (FileWordCount)
endif ()

if (BUILD_SYCL_MIGRATED_SUBPROJECT)
add_subdirectory (WordCount)
endif ()
15 changes: 15 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
if(GPU)
#To build for Intel® Data Center GPU Max 1550 or 1100
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl -fsycl-pstl-offload=gpu -D GPU")
endif()
if(CPU)
#To build for Intel® UHD Graphics, Intel® Gen9, Gen11, Xeon CPU
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D CPU ")
endif()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "-ltbb ${CMAKE_EXE_LINKER_FLAGS}")

add_executable (FileWordCount main.cpp)

add_custom_target (run_fwc0 cd ${CMAKE_SOURCE_DIR}/FileWordCount/ && ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/FileWordCount GutenbergBooks 0)
add_custom_target (run_fwc1 cd ${CMAKE_SOURCE_DIR}/FileWordCount/ && ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/FileWordCount GutenbergBooks 1)
958 changes: 958 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/GutenbergBooks/10001.txt

Large diffs are not rendered by default.

5,690 changes: 5,690 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/GutenbergBooks/10002-8.txt

Large diffs are not rendered by default.

5,690 changes: 5,690 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/GutenbergBooks/10002.txt

Large diffs are not rendered by default.

9,331 changes: 9,331 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/GutenbergBooks/12372-8.txt

Large diffs are not rendered by default.

9,331 changes: 9,331 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/GutenbergBooks/12372.txt

Large diffs are not rendered by default.

8,776 changes: 8,776 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/GutenbergBooks/12373.txt

Large diffs are not rendered by default.

8,747 changes: 8,747 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/GutenbergBooks/12374-8.txt

Large diffs are not rendered by default.

8,747 changes: 8,747 additions & 0 deletions Libraries/oneDPL/pSTL_offload/FileWordCount/GutenbergBooks/12374.txt

Large diffs are not rendered by default.

Loading