-
Notifications
You must be signed in to change notification settings - Fork 790
[SYCL][NATIVECPU] NativeCPU with optional oneTBB backend #16803
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
Changes from all commits
Commits
Show all changes
134 commits
Select commit
Hold shift + click to select a range
d4700e5
[NATIVECPU] faster enqueue for larger ranges
uwedolinsky b3f2215
[NATIVECPU] use size_t, reserve vector size
uwedolinsky 780588c
[NATIVECPU] added threadpool file to CMakeList
uwedolinsky db924f0
[NATIVECPU] Simple TBB backend
uwedolinsky 1509655
[NATIVECPU] more shared code
uwedolinsky 45ee46c
[NATIVECPU] update oneTBB tag
uwedolinsky aa7dec8
[NATIVECPU] added required include not needed by Windows
uwedolinsky 29d11f9
[NATIVECPU] added system headers first
uwedolinsky e202f8d
[NATIVECPU] cmake fix
uwedolinsky fe8d099
[NATIVECPU] removed GIT_SHALLOW
uwedolinsky c2a3f57
[NATIVECPU] turn CMAKE_INCLUDE_CURRENT_DIR off for tbb
uwedolinsky be5b134
[NATIVECPU] workaround for oneTBB casting away const qualifiers
uwedolinsky b18401f
[NATIVECPU] workaround for oneTBB casting away const qualifiers
uwedolinsky 4bff038
[NATIVECPU] remove potentially unneeded cmake
uwedolinsky eacf522
[NATIVECPU] oneTBB disabled by default
uwedolinsky c2996eb
[NATIVECPU] tbb to oneTBB
uwedolinsky 91a6a49
[NATIVECPU] improved comment
uwedolinsky c1745c7
[NATIVECPU] tbb to oneTBB
uwedolinsky 488504c
[NATIVECPU] tbb to oneTBB
uwedolinsky 53013d4
[NATIVECPU] num_threads with oneTBB
uwedolinsky e8d8ff4
[NATIVECPU] added comment to cmake
uwedolinsky 99c76c9
[NATIVECPU] using old task ids with tbb (WIP)
uwedolinsky 9b40081
[NATIVECPU] fixed merge from main
uwedolinsky 07c178d
[NATIVECPU] fix merge with events update
uwedolinsky aee938a
[NATIVECPU] revert noise
uwedolinsky 59d731a
[NATIVECPU] fix integer size warnings
uwedolinsky e0341ef
[NATIVECPU] update oneTBB tag
uwedolinsky e719ec0
[NATIVECPU] use oneTBB UXL github
uwedolinsky 81c3c82
[NATIVECPU] undefine _DEBUG in release builds for tbb
uwedolinsky ecaf51b
[NATIVECPU] oneTBB bump
uwedolinsky f5d6547
[NATIVECPU] clang-format and removed one inline
uwedolinsky e975e77
[NATIVECPU] clang-format
uwedolinsky 26a5bd0
[NATIVECPU] removed inline
uwedolinsky 38a91f7
[NATIVECPU] renamed wait to wait_all
uwedolinsky b31bd44
[NATIVECPU] move
uwedolinsky 960b1d5
[NATIVECPU] removed unused groups
uwedolinsky 04bd48a
[NATIVECPU] added async memcpy
uwedolinsky 45c76d9
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 7985e95
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 7008b8b
[NATIVECPU] added non-blocking invoker, removed unused variable
uwedolinsky a3f4ea0
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 2f1b3fe
[NATIVECPU] waiting for events in threads
uwedolinsky d5aa0cf
[NATIVECPU] resolved merge
uwedolinsky 8efb1e4
[NATIVECPU] ndrange enqueue with less work for main thread
uwedolinsky 67e9995
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 2c52186
[NATIVECPU] static_assert for pointer type
uwedolinsky 57bff8e
[NATIVECPU] resolved merge
uwedolinsky 5348490
[NATIVECPU] added anonymous namespace
uwedolinsky 1de1251
[NATIVECPU] separated out Invokers for enqueues
uwedolinsky 9173f5e
[NATIVECPU] made more memops async
uwedolinsky 7cd7caa
[NATIVECPU] memop pointer check outside worker lambda
uwedolinsky 849ba98
Merge remote-tracking branch 'origin/sycl' into uwe/nativecpu_eventswait
uwedolinsky 32ecf09
[NATIVECPU] moved inEvents
uwedolinsky c77454e
[NATIVECPU] fixed merge
uwedolinsky 6142549
Merge remote-tracking branch 'origin/uwe/nativecpu_eventswait' into u…
uwedolinsky 4b05062
[NATIVECPU] use unique_ptr for WaitInfo
uwedolinsky 2722cad
[NATIVECPU] async memcopy
uwedolinsky 24a0da3
[NATIVECPU] fixed merge
uwedolinsky 22898b4
[NATIVECPU] code reuse for memcopies
uwedolinsky bed18b6
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 5d12b7a
[NATIVECPU] removed invoker
uwedolinsky 400ba0d
[NATIVECPU] removed unneeded function
uwedolinsky 40f7270
[NATIVECPU] async wait in noop copy
uwedolinsky bd161bc
[NATIVECPU] async membuffer ops
uwedolinsky 870754a
[NATIVECPU] quick fix for in-order queues
uwedolinsky e11f596
[NATIVECPU] construct state inside thread
uwedolinsky b4069d1
[NATIVECPU] update comments
uwedolinsky e83715c
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky ee2d232
Merge remote-tracking branch 'origin/sycl' into uwe/onetbb_integratio…
uwedolinsky dfc67d8
[NATIVECPU] removed nullptr check for pHEventWaitList
uwedolinsky a25b2c7
[NATIVECPU] updated oneTBB tag
uwedolinsky 3074b16
[NATIVECPU] removed unneeded mutable
uwedolinsky 070f0cf
[NATIVECPU] moved lambda code from enqueueMemBufferReadWriteRect_impl…
uwedolinsky eb64e5d
[NATIVECPU] resolved merge with events
uwedolinsky 3207ffa
[NATIVECPU] simplified event generation
uwedolinsky 106a31f
[MNATIVECPU] fixed merge with async branch
uwedolinsky 6e1f722
[NATIVECPU] added interface to disable waiting in threads (for oneTBB)
uwedolinsky 2a557f9
[NATIVECPU] removed the now unneeded std::function wrapper for oneTBB
uwedolinsky 29c201c
[NATIVECPU] revert accidental filemode change
uwedolinsky 941932b
[NATIVECPU] replaced function pointer template parameter
uwedolinsky 4c5700d
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 1532779
[NATIVECPU] simplified WaitInfo
uwedolinsky 0204d11
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky ffe66d0
[NATIVECPU] added mutex to backend queue
uwedolinsky 3505c76
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky c95ebe7
[NATIVECPU] renamed flag to lock mutex
uwedolinsky 67d77da
Merge remote-tracking branch 'origin/sycl' into uwe/nativecpu_queuemutex
uwedolinsky 73cf574
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 6fcea0f
[NATIVECPU] launch ranges with number of work items that is multiple …
uwedolinsky 788cf69
[NATIVECPU] merge with events branch
uwedolinsky d86f429
[NATIVECPU] used lock_guard
uwedolinsky ddb908f
[NATIVECPU] removed unused local
uwedolinsky 22ab082
[NATIVECPU] fixed merge with uwe/nativecpu_queuemutex
uwedolinsky 8b20c39
Merge remote-tracking branch 'origin/uwe/fasternativecpuenqueue_async…
uwedolinsky c57b68a
Merge remote-tracking branch 'origin/uwe/nativecpu_queuemutex' into u…
uwedolinsky 1d62903
[NATIVECPU] removed reference captures in enqueue lambdas
uwedolinsky aced1a4
Merge remote-tracking branch 'origin/uwe/fasternativecpuenqueue_async…
uwedolinsky 11ebe05
[NATIVECPU] bump oneTBB version
uwedolinsky 666f2ae
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 37ccfca
[NATIVECPU] added option to turn off waiting in threads for oneTBB
uwedolinsky 50e0720
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 5fcea55
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 4ad9ee7
[NATIEVCPU] resolved merge
uwedolinsky 2fd6b37
[NATIVECPU] resolved merge with sycl branch
uwedolinsky 5e0b99d
[NATIVECPU] removed unneeded capture
uwedolinsky f05bba1
[NATIVECPU] removed mutable from task lambda
uwedolinsky 8548f6a
[NATIVECPU] merge with uwe/fasternativecpuenqueue_async_ops_eventswait
uwedolinsky 58ffb89
[NATIVECPU] clang-format
uwedolinsky aecf330
[NATIVECPU] merge with uwe/fasternativecpuenqueue_async_ops_eventswait
uwedolinsky f6b68dc
[NATIVECPU] clang-format
uwedolinsky faa03d2
[SYCL][NATIVECPU] update docs for oneTBB integration
uwedolinsky cfcc325
[SYCL][NATIVECPU] fixed heading for oneTBB integration
uwedolinsky 159db63
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky a26eb58
[NATIVECPU] removed unused code
uwedolinsky 271cf93
[NATIVECPU] revert to size_t
uwedolinsky 5784a93
[NATIVECPU] remove inline
uwedolinsky 49942d2
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 5bcb27c
Merge remote-tracking branch 'origin/uwe/fasternativecpuenqueue_async…
uwedolinsky 6a6f19f
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky ecf52a5
Merge remote-tracking branch 'origin/uwe/fasternativecpuenqueue_async…
uwedolinsky fc9b330
[NATIVECPU] resolved merge with sycl
uwedolinsky 0e0b454
[NATIVECPU] remove comment
uwedolinsky a009bd2
[NATIVECPU] removed unused function
uwedolinsky 02450dc
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky a44fc99
[NATIVECPU] update oneTBB
uwedolinsky 6a5f9d1
[NATIVECPU] add -Wno-stringop-overflow for oneTBB
uwedolinsky 87f3e17
[NATIVECPU] add -Wno-unknown-warning-option for oneTBB
uwedolinsky f856e32
[NATIVECPU] comment added to getWaitInfo
uwedolinsky 4251ba8
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky e330c0d
[NATIVECPU] renamed futures/tasksinfo function for consistency
uwedolinsky 4604d13
[NATIVECPU] renamed futures to tasksinfo for consistency
uwedolinsky 320e55f
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 3ecb6ab
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky 7f8bb75
Merge remote-tracking branch 'origin/sycl' into uwe/fasternativecpuen…
uwedolinsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ add_ur_adapter(${TARGET_NAME} | |
${CMAKE_CURRENT_SOURCE_DIR}/queue.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/queue.hpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/sampler.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/threadpool.hpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/ur_interface_loader.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/usm_p2p.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/virtual_mem.cpp | ||
|
@@ -51,6 +52,34 @@ set_target_properties(${TARGET_NAME} PROPERTIES | |
SOVERSION "${PROJECT_VERSION_MAJOR}" | ||
) | ||
|
||
# oneTBB is used as an optional NativeCPU backend and disabled by default. | ||
option(NATIVECPU_WITH_ONETBB "Use oneTBB as backend for Native CPU" OFF) | ||
if(NATIVECPU_WITH_ONETBB) | ||
message(STATUS "Configuring Native CPU adapter with oneTBB backend.") | ||
|
||
include(FetchContent) | ||
FetchContent_Declare( | ||
tbb | ||
GIT_REPOSITORY https://github.com/uxlfoundation/oneTBB.git | ||
# commit 4e4fffed4fb86ae0960a3364700f549b539c777e (HEAD -> master, origin/master, origin/HEAD) | ||
# Author: Ilya Isaev <[email protected]> | ||
# Date: Mon Aug 18 10:35:26 2025 +0200 | ||
# Improve task_arena interoperability with task_groups (#1784) | ||
GIT_TAG 4e4fffed4fb86ae0960a3364700f549b539c777e | ||
CMAKE_ARGS "-DTBB_TEST:BOOL=OFF -DTBB_EXAMPLES:BOOL=OFF -DTBB_BENCH:BOOL=OFF" | ||
OVERRIDE_FIND_PACKAGE | ||
) | ||
set(TBB_TEST OFF CACHE INTERNAL "" FORCE) | ||
set(TBB_EXAMPLES OFF CACHE INTERNAL "" FORCE) | ||
set(TBB_BENCH OFF CACHE INTERNAL "" FORCE) | ||
set(TBB_BUILD ON CACHE INTERNAL "" FORCE) | ||
set(TBB_FIND_PACKAGE OFF CACHE INTERNAL "" FORCE) | ||
set(TBB_FUZZ_TESTING OFF CACHE INTERNAL "" FORCE) | ||
set(TBB_INSTALL ON CACHE INTERNAL "" FORCE) | ||
set (CMAKE_INCLUDE_CURRENT_DIR OFF) | ||
FetchContent_MakeAvailable(tbb) | ||
endif() | ||
|
||
find_package(Threads REQUIRED) | ||
|
||
target_link_libraries(${TARGET_NAME} PRIVATE | ||
|
@@ -63,3 +92,23 @@ target_link_libraries(${TARGET_NAME} PRIVATE | |
target_include_directories(${TARGET_NAME} PRIVATE | ||
"${CMAKE_CURRENT_SOURCE_DIR}/../../" | ||
) | ||
|
||
if(NATIVECPU_WITH_ONETBB) | ||
target_link_libraries(${TARGET_NAME} PRIVATE | ||
TBB::tbb | ||
) | ||
if (NOT MSVC) | ||
# oneTBB currently casts away some const qualifiers | ||
# todo: check if compiler actually supports these options | ||
target_compile_options(tbb PRIVATE -Wno-cast-qual -Wno-stringop-overflow -Wno-unknown-warning-option) | ||
target_compile_options(tbbmalloc PRIVATE -Wno-cast-qual) | ||
endif() | ||
|
||
# Undefine _DEBUG option in release builds to find | ||
# release tbbbind | ||
if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") | ||
target_compile_options(tbb PRIVATE -U_DEBUG) | ||
endif() | ||
|
||
target_compile_definitions(${TARGET_NAME} PRIVATE NATIVECPU_WITH_ONETBB) | ||
endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.