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

[SYCL] Remove plugin interface #14145

Merged
merged 239 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
239 commits
Select commit Hold shift + click to select a range
cd40463
UR port cmake basics
aarongreig Apr 3, 2024
580ae02
UR port plugin first pass
aarongreig Apr 3, 2024
dc83909
UR port platform/device to get sycl-ls working
aarongreig Apr 3, 2024
c8dd930
Finish up device queries, bump to a more recent UR.
aarongreig Apr 3, 2024
27a6f76
First pass at porting context, to enable queue/event.
aarongreig Apr 16, 2024
6f2ce5f
Queue first pass - Basic/queue.cpp e2e test passing.
aarongreig Apr 16, 2024
fa58efd
First pass port event.
aarongreig Apr 19, 2024
e4f7350
First pass of program and kernel port
callumfare Apr 25, 2024
504e5b6
Update UR to latest main tag
aarongreig Apr 26, 2024
85677f2
Buffer, image, bindless image, memory manager first pass.
aarongreig Apr 26, 2024
86d717b
Tidy duplicate device target string code
callumfare Apr 26, 2024
34a3c8e
Port USM impl
callumfare Apr 26, 2024
fb3c9bd
Port commands, scheduler, graphs, etc
callumfare Apr 30, 2024
adacf4b
Finish device global port
callumfare May 1, 2024
873f2cf
Fix kernel fusion check in queue_impl
callumfare May 1, 2024
2e1450a
Bump UR commit
callumfare May 2, 2024
b64e954
Fix atomic memory scope queries failing
callumfare May 2, 2024
5dd14bf
Port sampler
callumfare May 2, 2024
543a468
Set the UR_ENABLE_COMGR option for HIP when SYCL kernel fusion is ena…
callumfare May 7, 2024
5e08657
Remove some of the remaining PI calls from the runtime.
aarongreig May 7, 2024
c46c55c
Port interop and backend
callumfare May 7, 2024
b815dfa
Remove call to deprecated entry point piextPluginGetOpaqueData
aarongreig May 15, 2024
7c3d3b0
Fix a few compiler warnings we introduced and remove PI from error ha…
aarongreig May 7, 2024
506c09f
Port decoupled adapter sources to UR fetch module.
aarongreig May 17, 2024
0932f6a
Replace direct casts in opencl interop get calls to getNativeHandle
omarahmed1111 May 17, 2024
4d1111a
Remove the old plugin object.
aarongreig May 15, 2024
da1c029
Replace "UrPlugin" with just "Plugin".
aarongreig May 15, 2024
6d63685
Bump UR commit and fix some rebase issues
aarongreig May 21, 2024
5fe61a8
Uncomment platform info queries to fix test.
aarongreig May 21, 2024
9e27636
Delete ur.def
omarahmed1111 May 22, 2024
26da41c
Replace PI tracing with UR tracing
callumfare May 29, 2024
81a5c8c
Port usm_analyzer and sycl-sanitize to UR
callumfare Jun 4, 2024
434de32
Fix some rebase issues, bump UR commit and pull in some UR cmake changes
aarongreig Jun 11, 2024
7406b78
Remove PI plugin library ABI tests
kbenzie Jun 13, 2024
68f5289
Delete sycl/plugins directory
kbenzie Jun 13, 2024
bc618be
Remove pi.h includes from .cpp file
kbenzie Jun 13, 2024
e4ce2a8
Remove PI type aliases
kbenzie Jun 13, 2024
9dbf4dd
Remove pi.h includes in sycl/source files
kbenzie Jun 13, 2024
56eb238
Remove pi.h includes from sycl/detail headers
kbenzie Jun 13, 2024
43a9547
Remove pi.h includes from extension headers
kbenzie Jun 13, 2024
ee31f85
Remove pi.h from public headers
kbenzie Jun 13, 2024
f084966
Remove pi.h include from exception.hpp
kbenzie Jun 13, 2024
901d8c9
Resolve rebase issues + bump UR commit
aarongreig Jun 17, 2024
41eb6e3
[UR] Use CMake option to disable building examples
kbenzie Jun 11, 2024
2039ea6
Fix some tests from sycl/test
kbenzie Jun 17, 2024
a4c6b0f
Fix Windows build & bad formatting
kbenzie Jun 18, 2024
f9e9589
Fix Windows sycl.dll ABI symbols test
kbenzie Jun 18, 2024
61cf322
Merge branch 'benie/pi2ur-disable-examples' into 'PI2UR-main'
kbenzie Jun 19, 2024
50b7667
Rename placeholder getUrHandleRef -> getHandleRef.
aarongreig Jun 19, 2024
274c849
Merge branch 'benie/pi2ur-fix-windows-build' into 'PI2UR-main'
kbenzie Jun 19, 2024
bb49925
Merge branch 'benie/pi2ur-fix-some-sycl-tests' into 'PI2UR-main'
kbenzie Jun 19, 2024
e8e0871
Hook up urAdapterGetLastError.
martygrant May 22, 2024
c8f2efa
Force examples/tests to be disabled
kbenzie Jun 19, 2024
f887850
Update the SYCL ABI test on Linux
kbenzie Jun 19, 2024
ab31ce6
Merge branch 'pi2ur/adapterGetLastError' into 'PI2UR-main'
kbenzie Jun 20, 2024
2544c90
Various fixes for remaining XPTI fails
callumfare Jun 20, 2024
61de1cc
Merge branch 'aaron/replaceUrHandleRef' into 'PI2UR-main'
kbenzie Jun 20, 2024
1143db0
Merge branch 'pi2ur/xpti_fixes' into 'PI2UR-main'
kbenzie Jun 20, 2024
0ed5ed5
Merge branch 'benie/pi2ur-small-fixes' into 'PI2UR-main'
kbenzie Jun 21, 2024
da22011
Various bindless images fixes
kbenzie Jun 21, 2024
b279b1a
Enable the UR ASAN layer when required
callumfare Jun 21, 2024
9fa876d
Remove remaining uses of SYCL_PREFER_UR
callumfare Jun 21, 2024
621cd97
Remove stringifyErrorCode
callumfare Jun 21, 2024
533d611
Merge branch 'pi2ur/enable_asan' into 'PI2UR-main'
callumfare Jun 21, 2024
e823d12
Merge branch 'benie/pi2ur-fix-bindless-images' into 'PI2UR-main'
callumfare Jun 24, 2024
0b4f68b
Remove all remaining uses of pi_result
callumfare Jun 24, 2024
8c1c5b6
Merge branch 'pi2ur/replace_pi_result' into 'PI2UR-main'
aarongreig Jun 24, 2024
a2cf3ff
Add a backend_traits_hip include for interop-task-hip test
omarahmed1111 Jun 28, 2024
52f34ee
Merge branch 'fix-HostInteropTask/interop-task-hip' into 'PI2UR-main'
omarahmed1111 Jul 1, 2024
ddcfe1e
Test for adapter release; call urLoaderTearDown
callumfare Jul 2, 2024
fb3379b
Fix Regression/implicit_kernel_bundle_image_filtering checks
callumfare Jul 2, 2024
e8ead5b
Merge branch 'pi2ur/various_e2e_fixes' into 'PI2UR-main'
callumfare Jul 3, 2024
42e0f89
Fix USM/memadvise_flags.cpp E2E test
callumfare Jul 3, 2024
a54226d
Move pi::cast to ur::cast in new ur.hpp header
kbenzie Jul 1, 2024
538fdf5
Merge branch 'benie/pi2ur-replace-pi-cast' into 'PI2UR-main'
kbenzie Jul 3, 2024
7d5cfe8
Clean up some PI helper files
aarongreig Jul 4, 2024
bce17a4
Fix header lit tests
aarongreig Jul 5, 2024
4d515f5
Merge branch 'pi2ur/fix_usm_memadvise_flags' into 'PI2UR-main'
aarongreig Jul 5, 2024
807683e
Merge branch 'aaron/cleanUpPiFiles' into 'PI2UR-main'
aarongreig Jul 5, 2024
7e5b2ec
Remove pi::die, pi::assertion, and pi::cast
kbenzie Jul 5, 2024
c841103
Delete redundant event returns from queue_impl
omarahmed1111 Jul 5, 2024
a867839
Merge branch 'sycl' into aaron/mergeSyclToMain
aarongreig Jul 5, 2024
cab52ab
Merge branch 'benie/pi2ur-pi-assertion-cleanup' into 'PI2UR-main'
aarongreig Jul 5, 2024
c3bd737
Remove pi::die, pi::assertion, and pi::cast
kbenzie Jul 5, 2024
8fb916f
Port new features and fix bad conflict resolutions.
aarongreig Jul 8, 2024
fcc9435
Fix include_deps test.
aarongreig Jul 8, 2024
bcbd19d
Rename placeholder getUrHandleRef -> getHandleRef.
aarongreig Jun 19, 2024
78c8633
Various fixes for remaining XPTI fails
callumfare Jun 20, 2024
3e3d9b8
Force examples/tests to be disabled
kbenzie Jun 19, 2024
bb0d5c4
Update the SYCL ABI test on Linux
kbenzie Jun 19, 2024
8f20dab
Enable the UR ASAN layer when required
callumfare Jun 21, 2024
0cebe67
Remove remaining uses of SYCL_PREFER_UR
callumfare Jun 21, 2024
11c6f35
Various bindless images fixes
kbenzie Jun 21, 2024
4cccdcf
Remove stringifyErrorCode
callumfare Jun 21, 2024
94fcca0
Remove all remaining uses of pi_result
callumfare Jun 24, 2024
80fcc4a
Replace PiMock with interface to UR mocking functionality
aarongreig Jun 12, 2024
9342dcb
Merge branch 'PI2UR-main' into aaron/replacePiMock
aarongreig Jul 8, 2024
93e0d23
Merge branch 'aaron/mergeSyclToMain' into aaron/replacePiMock
aarongreig Jul 8, 2024
213dc5e
Fix conflict issues and port some new tests.
aarongreig Jul 8, 2024
7b13aa1
Fix kernel pointer + bad conflict resolution.
aarongreig Jul 9, 2024
9a71395
Port another new test
aarongreig Jul 9, 2024
64a3f99
Fix kernel pointer + bad conflict resolution.
aarongreig Jul 9, 2024
be4d80d
All tests passing again
aarongreig Jul 9, 2024
381d481
Port pi_win_proxy_loader to ur_win_proxy_loader
kbenzie Jul 9, 2024
6cdac15
Merge branch 'delete-redundant-event-returns' into 'PI2UR-main'
kbenzie Jul 9, 2024
9726cd3
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 9, 2024
0fa7e8b
Fix dodgy conflict resolution
aarongreig Jul 9, 2024
8d026ef
Merge remote-tracking branch 'internal/PI2UR-main' into PI2UR-main
aarongreig Jul 9, 2024
eff63c7
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 9, 2024
eeea5e6
Rename pi_utils.hpp to ur_utils.hpp
kbenzie Jul 9, 2024
cff16fd
Remove mode PI references
kbenzie Jul 9, 2024
f889704
Format the diff
kbenzie Jul 9, 2024
0fe9c2c
Fix Linux ABI test
kbenzie Jul 9, 2024
51a215a
Fixup tests
kbenzie Jul 9, 2024
1697d14
Fix some trivial new e2e regressions.
aarongreig Jul 9, 2024
56384d0
Merge branch 'PI2UR-main' into aaron/replacePiMock
aarongreig Jul 9, 2024
4a0b82a
Fix tests with latest commit.
aarongreig Jul 9, 2024
c854c04
Fix DiscardEvent fails.
aarongreig Jul 10, 2024
bcb9171
Fix CUDA & HIP feature macro definitions
kbenzie Jul 10, 2024
b2f66dc
Merge branch 'benie/pi2ur-port-win-proxy-loader' into 'PI2UR-main'
kbenzie Jul 10, 2024
28776c2
Merge branch 'benie/pi2ur-pi-renames' into 'PI2UR-main'
kbenzie Jul 10, 2024
7b1328f
Remove SYCL_PI_TRACE & its implementation
kbenzie Jul 8, 2024
e54cfa5
Cleanup or otherwise port a few bits and pieces.
aarongreig Jul 8, 2024
fd72048
prepare for removal of pi.h
aarongreig Jul 10, 2024
2267684
Remove pi.h, move dev binary stuff to ur.hpp
aarongreig Jul 10, 2024
985f032
Move binary defs into own file
aarongreig Jul 10, 2024
472a70d
Merge branch 'aaron/fixSomeNewRegressions' into 'PI2UR-main'
kbenzie Jul 10, 2024
dc7957b
Merge pi.hpp + ur.hpp.
aarongreig Jul 10, 2024
1c63acb
Merge pi.cpp + ur.cpp.
aarongreig Jul 10, 2024
053411f
Delete pi.hpp
aarongreig Jul 10, 2024
dc35a84
Move device binary definitions into ur.hpp
aarongreig Jul 10, 2024
9f61e7b
Remove last uses of pi.hpp and delete pi.def.
aarongreig Jul 10, 2024
dcd13bf
Init struct stype field
callumfare Jul 4, 2024
41546d6
Fix bindless image external semaphore signal
callumfare Jul 10, 2024
42d4479
Merge branch 'benie/pi2ur-remove-pi-trace' into 'PI2UR-main'
kbenzie Jul 10, 2024
88f60b5
Fix exception ABI test
aarongreig Jul 11, 2024
6faf39d
Fix include missing header that persisted in build dir.
aarongreig Jul 11, 2024
5358705
Add a macro to replace the non-descript zero values in trait .def files.
aarongreig Jul 11, 2024
60f2011
Merge branch 'benie/pi2ur-fix-feature-macros' into 'PI2UR-main'
kbenzie Jul 11, 2024
3d4d2a2
Merge branch 'aaron/miscCleanup' into 'PI2UR-main'
kbenzie Jul 11, 2024
fc4a5d4
Merge branch 'pi2ur/bindless_image_fixes' into 'PI2UR-main'
kbenzie Jul 11, 2024
497089f
Merge branch 'aaron/addMacroForZeroTraits' into 'PI2UR-main'
kbenzie Jul 11, 2024
16203dc
Fix Plugin/enqueue-arg-order tests
callumfare Jul 11, 2024
5104f21
Merge branch 'pi2ur/fix_enqueue_arg_order_tests' into 'PI2UR-main'
aarongreig Jul 12, 2024
60def75
Merge branch 'PI2UR-main' into aaron/removePiHeader
aarongreig Jul 12, 2024
4abab89
Fix include_deps again
aarongreig Jul 12, 2024
b75519b
Merge branch 'aaron/removePiHeader' into 'PI2UR-main'
aarongreig Jul 12, 2024
4da5fb8
Remove the workaround for CUDA/HIP backend operations now uintptr_t i…
callumfare Jul 12, 2024
7fa05fe
Update use of SYCL_PI_TRACE in GitHub workflows
kbenzie Jul 12, 2024
5e1c623
Merge branch 'benie/pi2ur-fix-sycl-ls-trace' into 'PI2UR-main'
kbenzie Jul 12, 2024
37a2cef
Fix Windows OS utils namespace & filenames
kbenzie Jul 12, 2024
6f07103
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 12, 2024
62c321a
Merge remote-tracking branch 'internal/PI2UR-main' into PI2UR-main
aarongreig Jul 12, 2024
ae8ff61
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 12, 2024
02fe912
Merge branch 'pi2ur/reenable_disabled_get_native_ops' into 'PI2UR-main'
kbenzie Jul 12, 2024
ec9028e
Merge branch 'benie/pi2ur-fix-os-utils' into 'PI2UR-main'
kbenzie Jul 12, 2024
d16668d
Don't reinterpret_cast to the same type
kbenzie Jul 12, 2024
c6f7942
Update Windows ABI test
kbenzie Jul 12, 2024
7929962
Delete pi_error.def
kbenzie Jul 12, 2024
fd17c83
Remove accidentally added files
kbenzie Jul 15, 2024
748fea1
Merge branch 'PI2UR-main' into aaron/replacePiMock
aarongreig Jul 15, 2024
3af09f3
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 15, 2024
a76d2b0
Fix documentation build
kbenzie Jul 15, 2024
1c9b149
Port new virtual function test + disable it until UR fix merges.
aarongreig Jul 15, 2024
4fbfc50
Merge branch 'PI2UR-main' into aaron/replacePiMock
aarongreig Jul 15, 2024
0390562
Remove unused .def file and fix incorrect conflict resolution.
aarongreig Jul 15, 2024
8528c9a
Merge branch 'aaron/replacePiMock' into 'PI2UR-main'
kbenzie Jul 15, 2024
d164006
Fix macOS build
kbenzie Jul 15, 2024
2bed873
Blanket rename all PI device binary stuff to UR.
aarongreig Jul 15, 2024
0f6404f
Rename and re-enable pi::cast unittest
aarongreig Jul 15, 2024
8b18075
Revert unrelated formatting change.
aarongreig Jul 15, 2024
71bd27b
Fix a few failing tests
aarongreig Jul 15, 2024
87f1b3d
Merge branch 'aaron/renameDeviceBinary' into 'PI2UR-main'
aarongreig Jul 15, 2024
0df01dd
Remove most remaining reference to PI
aarongreig Jul 16, 2024
1825b1a
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 16, 2024
05504e4
Fix erroneous bindless image type name change
kbenzie Jul 16, 2024
3c106d9
Address some review feedback.
aarongreig Jul 17, 2024
57ff033
Revert accessor.hpp formatting.
aarongreig Jul 17, 2024
04b60cb
Fix install of all adapters
kbenzie Jul 17, 2024
284cf07
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 17, 2024
ebb2bb2
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 17, 2024
2cd5ee4
XFAIL regressions to be fixed post-merge
aarongreig Jul 17, 2024
a4e247e
Fix unresolved tests
kbenzie Jul 17, 2024
ced5ac2
Change XFAIL: * to UNSUPPORTED: linux, windows.
aarongreig Jul 17, 2024
0ab745e
Un-XFAIL most native cpu tests
kbenzie Jul 17, 2024
5f169b4
XFAIL 2 two tests
kbenzie Jul 17, 2024
f1e899b
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 17, 2024
ccd2421
Update Windows ABI check test
kbenzie Jul 17, 2024
13adbda
Un-XFAIL one more native cpu test
kbenzie Jul 17, 2024
e04ce03
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 18, 2024
b271c28
XFAIL new windows fails.
aarongreig Jul 18, 2024
fad8eee
Disable validation temporarily to see if it unblocks cuda CI.
aarongreig Jul 18, 2024
fcf4a37
Remove ur_print.hpp include and re-implement stringifyErrorCode
aarongreig Jul 18, 2024
fed8dc4
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 18, 2024
254c4a2
Reset native cpu tag
kbenzie Jul 18, 2024
65a8864
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 18, 2024
f46e409
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 18, 2024
5de3077
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 19, 2024
96a6d15
Revert abi break to num_regs aspect, re-enable validation.
aarongreig Jul 19, 2024
5d39e5b
Revert contextSetExtendedDeleter ABI break
aarongreig Jul 19, 2024
e705c38
Port new unittest over to new mock framework
kbenzie Jul 19, 2024
f5a30ff
Update tests that still expect PI tracing
callumfare Jul 23, 2024
75c654c
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 24, 2024
312070c
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 24, 2024
03baa49
Fix RuntimeLinkingCommon.hpp override
kbenzie Jul 24, 2024
bc007c5
Revert all xfailed e2e + lit tests.
aarongreig Jul 24, 2024
11f0b98
Remove debug prints
kbenzie Jul 24, 2024
18e38ed
Fix USM/memory_coherency_hip test
callumfare Jul 24, 2024
7e87131
Fix handling of device_read_only usm flag
callumfare Jul 24, 2024
a2809d6
Fix Plugin/interop-opencl.cpp by removing direct UR native handle cast.
aarongreig Jul 11, 2024
b9f6e55
Fix the majority of the native cpu lit fails
aarongreig Jul 19, 2024
a1ba4d2
Use AdjustedName when calling urKernelCreate - fixes kernel_compiler_…
martygrant Jul 24, 2024
cb943a3
Use UR version of mem_advice flag for in_order_usm_implicit e2e test.
martygrant Jul 24, 2024
cac3da9
Fix various e2e tests related to opencl interop and others
omarahmed1111 Jul 24, 2024
c3746c8
Fix CUDA interop tests in check-sycl
kbenzie Jul 24, 2024
a627db5
Address review feedback
omarahmed1111 Jul 24, 2024
98f3161
Merge branch 'sycl' into PI2UR-main
callumfare Jul 25, 2024
39760e3
Merge branch 'sycl' into PI2UR-main
callumfare Jul 25, 2024
5ed9db1
Fix include_deps tests
callumfare Jul 25, 2024
866c209
Merge branch 'sycl' into PI2UR-main
callumfare Jul 25, 2024
7949962
Fix Windows ABI test
kbenzie Jul 25, 2024
9f0123b
Update Plugin/dll-detach-order.cpp
kbenzie Jul 25, 2024
97597e6
Mark Basic/queue/release.cpp unsupported on Windows
kbenzie Jul 25, 2024
5411d4b
Fix regex match for DiscardEvents/discard_events_usm_ooo_queue.cpp
kbenzie Jul 25, 2024
b1cd015
Fix cache_env_vars_* tests
omarahmed1111 Jul 25, 2024
ac868cd
Disable Windows regressions
kbenzie Jul 25, 2024
957fabb
Disable remaining tests
kbenzie Jul 25, 2024
2373a19
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 25, 2024
9187e16
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 25, 2024
97a3311
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 26, 2024
9b0f038
Disable new windows regression.
aarongreig Jul 26, 2024
d31a163
Merge branch 'sycl' into PI2UR-main
aarongreig Jul 26, 2024
39f424b
Fix bad conflict resolution in unittest
aarongreig Jul 26, 2024
f769b4d
Remove unnecessary includes
kbenzie Jul 26, 2024
632cc70
Merge remote-tracking branch 'origin/sycl' into PI2UR-main
kbenzie Jul 26, 2024
5db5bdb
Disable latest regressions
kbenzie Jul 26, 2024
58edb70
[UR] Bump main tag to b7b0c8b3
kbenzie Jul 26, 2024
cd22184
Disable kernel fusion tests on hip
kbenzie Jul 26, 2024
3653659
Make Plugin/dll-detach-order.cpp unsupported on Windows
kbenzie Jul 26, 2024
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
39 changes: 24 additions & 15 deletions sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,27 @@ if (NOT DEFINED SYCL_ENABLE_PLUGINS)
set(SYCL_ENABLE_PLUGINS "opencl;level_zero")
endif()
aarongreig marked this conversation as resolved.
Show resolved Hide resolved

# Option to enable online kernel fusion via a JIT compiler
option(SYCL_ENABLE_KERNEL_FUSION "Enable kernel fusion via JIT compiler" ON)
if(SYCL_ENABLE_KERNEL_FUSION AND WIN32)
message(WARNING "Kernel fusion not yet supported on Windows")
set(SYCL_ENABLE_KERNEL_FUSION OFF CACHE
BOOL "Kernel fusion not yet supported on Windows" FORCE)
endif()

if (NOT XPTI_INCLUDES)
set(XPTI_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/../xpti/include)
endif()

if (NOT XPTI_PROXY_SRC)
set(XPTI_PROXY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../xpti/src/xpti_proxy.cpp)
endif()

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
include(AddSYCLExecutable)
include(AddSYCL)
include(SYCLUtils)
include(FetchUnifiedRuntime)

# The change in SYCL_MAJOR_VERSION must be accompanied with the same update in
# llvm/clang/lib/Driver/CMakeLists.txt.
Expand Down Expand Up @@ -144,14 +161,6 @@ install(DIRECTORY ${OpenCL_INCLUDE_DIR}/CL
DESTINATION ${SYCL_INCLUDE_DIR}/sycl
COMPONENT OpenCL-Headers)

# Option to enable online kernel fusion via a JIT compiler
option(SYCL_ENABLE_KERNEL_FUSION "Enable kernel fusion via JIT compiler" ON)
if(SYCL_ENABLE_KERNEL_FUSION AND WIN32)
message(WARNING "Kernel fusion not yet supported on Windows")
set(SYCL_ENABLE_KERNEL_FUSION OFF CACHE
BOOL "Kernel fusion not yet supported on Windows" FORCE)
endif()

# Option for enabling building the SYCL major release preview library.
option(SYCL_ENABLE_MAJOR_RELEASE_PREVIEW_LIB "Enable build of the SYCL major release preview library" ON)

Expand Down Expand Up @@ -229,6 +238,7 @@ add_custom_command(
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/std ${SYCL_INCLUDE_BUILD_DIR}/std
COMMAND ${CMAKE_COMMAND} -E copy_directory ${sycl_inc_dir}/syclcompat ${SYCL_INCLUDE_BUILD_DIR}/syclcompat
COMMAND ${CMAKE_COMMAND} -E copy ${sycl_inc_dir}/syclcompat.hpp ${SYCL_INCLUDE_BUILD_DIR}/syclcompat.hpp
COMMAND ${CMAKE_COMMAND} -E copy ${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h ${SYCL_INCLUDE_BUILD_DIR}/sycl
COMMENT "Copying SYCL headers ...")

# Copy SYCL headers from source to install directory
Expand All @@ -238,6 +248,8 @@ install(DIRECTORY "${sycl_inc_dir}/std" DESTINATION ${SYCL_INCLUDE_DIR} COMPONEN
install(DIRECTORY ${BOOST_MP11_DESTINATION_DIR} DESTINATION ${SYCL_INCLUDE_DIR}/sycl/detail COMPONENT boost_mp11-headers)
install(DIRECTORY "${sycl_inc_dir}/syclcompat" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
install(FILES "${sycl_inc_dir}/syclcompat.hpp" DESTINATION ${SYCL_INCLUDE_DIR} COMPONENT sycl-headers)
install(FILES "${UNIFIED_RUNTIME_INCLUDE_DIR}/ur_api.h" DESTINATION ${SYCL_INCLUDE_DIR}/sycl
COMPONENT sycl-headers)

if (WIN32)
set(SYCL_RT_LIBS sycl${SYCL_MAJOR_VERSION})
Expand Down Expand Up @@ -382,9 +394,6 @@ if(NOT "${SYCL_BUILD_PI_HIP_PLATFORM}" STREQUAL "")
string(TOUPPER ${SYCL_BUILD_PI_HIP_PLATFORM} SYCL_BUILD_PI_HIP_PLATFORM)
endif()

# Plugin Library
add_subdirectory( plugins )

add_subdirectory(tools)

if (WIN32)
Expand Down Expand Up @@ -475,8 +484,8 @@ if("cuda" IN_LIST SYCL_ENABLE_PLUGINS)
"CUDA support requires adding \"libclc\" to the CMake argument \"LLVM_ENABLE_PROJECTS\"")
endif()

add_dependencies(sycl-toolchain pi_cuda)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS pi_cuda)
add_dependencies(sycl-toolchain ur_adapter_cuda)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS ur_adapter_cuda)
endif()

if("hip" IN_LIST SYCL_ENABLE_PLUGINS)
Expand All @@ -492,8 +501,8 @@ if("hip" IN_LIST SYCL_ENABLE_PLUGINS)
"HIP support requires adding \"lld\" to the CMake argument \"LLVM_ENABLE_PROJECTS\"")
endif()

add_dependencies(sycl-toolchain pi_hip)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS pi_hip)
add_dependencies(sycl-toolchain ur_adapter_hip)
list(APPEND SYCL_TOOLCHAIN_DEPLOY_COMPONENTS ur_adapter_hip)
endif()

# Use it as fake dependency in order to force another command(s) to execute.
Expand Down
2 changes: 2 additions & 0 deletions sycl/cmake/modules/AddSYCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ function(add_sycl_library LIB_NAME TYPE)
add_common_options(${LIB_NAME})
endfunction()

# current ur adapter dependency managing is a bit hacky, we should try to copy
# this as closely as possible instead
function(add_sycl_plugin PLUGIN_NAME)
cmake_parse_arguments("ARG"
""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# PI Unified Runtime plugin library.
#
# Either fetches UR from the appropriate repo or sets up variables based on user
# preference.

# TODO: taken from sycl/plugins/CMakeLists.txt - maybe we should handle this
# within UR (although it is an obscure warning that the build system here
# seems to specifically enable)
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang|IntelLLVM" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-covered-switch-default")
endif()


# Options to override the default behaviour of the FetchContent to include UR
# source code.
Expand All @@ -18,6 +26,8 @@ set(SYCL_PI_UR_SOURCE_DIR
# Override default to enable building tests from unified-runtime
AlexeySachkov marked this conversation as resolved.
Show resolved Hide resolved
set(UR_BUILD_TESTS OFF CACHE BOOL "Build unit tests.")
set(UMF_ENABLE_POOL_TRACKING ON)
set(UR_BUILD_XPTI_LIBS OFF)
set(UR_ENABLE_TRACING ON)

if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
set(UR_BUILD_ADAPTER_L0 ON)
Expand All @@ -27,6 +37,9 @@ if("cuda" IN_LIST SYCL_ENABLE_PLUGINS)
endif()
if("hip" IN_LIST SYCL_ENABLE_PLUGINS)
set(UR_BUILD_ADAPTER_HIP ON)
if (SYCL_ENABLE_KERNEL_FUSION)
set(UR_ENABLE_COMGR ON)
endif()
endif()
if("opencl" IN_LIST SYCL_ENABLE_PLUGINS)
set(UR_BUILD_ADAPTER_OPENCL ON)
Expand Down Expand Up @@ -203,85 +216,59 @@ target_include_directories(UnifiedRuntime-Headers

find_package(Threads REQUIRED)

set(UNIFIED_RUNTIME_PLUGIN_ARGS
SOURCES
# These are short-term shared with Unified Runtime
# The two plugins define a few things differently so must
# be built separately. This difference is spelled in
# their "ur_bindings.hpp" files.
"ur_bindings.hpp"
"pi2ur.hpp"
# These below belong to Unified Runtime PI Plugin only
"pi_unified_runtime.hpp"
"pi_unified_runtime.cpp"
LIBRARIES
Threads::Threads
UnifiedRuntimeLoader
UnifiedRuntime-Headers
UnifiedRuntimeCommon
INCLUDE_DIRS
"${UNIFIED_RUNTIME_SRC_INCLUDE_DIR}"
"${UNIFIED_RUNTIME_COMMON_INCLUDE_DIR}"
)

# We need for #include <ze_api.h> in common.h
if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
list(APPEND UNIFIED_RUNTIME_PLUGIN_ARGS LevelZeroLoader-Headers)
endif()

if("opencl" IN_LIST SYCL_ENABLE_PLUGINS)
list(APPEND UNIFIED_RUNTIME_PLUGIN_ARGS OpenCL-ICD)
endif()

add_sycl_plugin(unified_runtime ${UNIFIED_RUNTIME_PLUGIN_ARGS})

if(TARGET UnifiedRuntimeLoader)
set_target_properties(hello_world PROPERTIES EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
# Install the UR loader.
# TODO: this is piggy-backing on the existing target component level-zero-sycl-dev
# When UR is moved to its separate repo perhaps we should introduce new component,
# e.g. unified-runtime-sycl-dev.
# TODO: yeah we definitely should do this as part of the port
kbenzie marked this conversation as resolved.
Show resolved Hide resolved
install(TARGETS ur_loader
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
RUNTIME DESTINATION "bin" COMPONENT level-zero-sycl-dev
)
endif()

# Install the UR adapters too
if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(sycl-runtime-libraries ur_adapter_level_zero)

# Install the UR adapters too
install(TARGETS ur_adapter_level_zero
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
RUNTIME DESTINATION "bin" COMPONENT level-zero-sycl-dev
)
endif()
add_custom_target(UnifiedRuntimeAdapters)

if("cuda" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(sycl-runtime-libraries ur_adapter_cuda)
endif()

if("hip" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(sycl-runtime-libraries ur_adapter_hip)
endif()
if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(UnifiedRuntimeAdapters ur_adapter_level_zero)

if ("opencl" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(sycl-runtime-libraries ur_adapter_opencl)
# TODO: L0 adapter does other... things in its cmake - make sure they get
# added to the new build system

# Install the UR adapters too
install(TARGETS ur_adapter_opencl
# Install L0 library
if("level_zero" IN_LIST SYCL_ENABLE_PLUGINS)
install(TARGETS ur_adapter_level_zero
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
RUNTIME DESTINATION "bin" COMPONENT level-zero-sycl-dev
)
endif()
endif()
if("cuda" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(UnifiedRuntimeAdapters ur_adapter_cuda)
endif()
if("hip" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(UnifiedRuntimeAdapters ur_adapter_hip)
endif()
if("opencl" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(UnifiedRuntimeAdapters ur_adapter_opencl)

if ("native_cpu" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(sycl-runtime-libraries ur_adapter_native_cpu)
# Install the UR adapters too
# TODO: copied from plugins/unified-runtime/CMakeLists.txt, looks a little
# weird: why the level-zero-sycl-dev component for opencl??
aarongreig marked this conversation as resolved.
Show resolved Hide resolved
install(TARGETS ur_adapter_opencl
LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}" COMPONENT level-zero-sycl-dev
RUNTIME DESTINATION "bin" COMPONENT level-zero-sycl-dev
)
endif()
if("native_cpu" IN_LIST SYCL_ENABLE_PLUGINS)
add_dependencies(UnifiedRuntimeAdapters ur_adapter_native_cpu)

# Deal with OCK option
option(NATIVECPU_USE_OCK "Use the oneAPI Construction Kit for Native CPU" ON)

if(NATIVECPU_USE_OCK)
Expand Down
31 changes: 15 additions & 16 deletions sycl/include/sycl/accessor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <sycl/detail/handler_proxy.hpp> // for associateWithH...
#include <sycl/detail/helpers.hpp> // for loop
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
#include <sycl/detail/pi.h> // for PI_ERROR_INVAL...
#include <sycl/detail/property_helper.hpp> // for PropWithDataKind
#include <sycl/detail/property_list_base.hpp> // for PropertyListBase
#include <sycl/detail/type_list.hpp> // for is_contained
Expand All @@ -38,6 +37,7 @@
#include <sycl/property_list.hpp> // for property_list
#include <sycl/range.hpp> // for range
#include <sycl/sampler.hpp> // for addressing_mode
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE

#include <cstddef> // for size_t
#include <functional> // for hash
Expand Down Expand Up @@ -1450,7 +1450,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
throw sycl::invalid_object_error(
"accessor with requested offset and range would exceed the bounds of "
"the buffer",
PI_ERROR_INVALID_VALUE);
UR_RESULT_ERROR_INVALID_VALUE);

initHostAcc();
detail::constructorNotification(detail::getSyclObjImpl(BufferRef).get(),
Expand Down Expand Up @@ -1494,7 +1494,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
throw sycl::invalid_object_error(
"accessor with requested offset and range would exceed the bounds of "
"the buffer",
PI_ERROR_INVALID_VALUE);
UR_RESULT_ERROR_INVALID_VALUE);

initHostAcc();
detail::constructorNotification(detail::getSyclObjImpl(BufferRef).get(),
Expand Down Expand Up @@ -1565,7 +1565,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
throw sycl::invalid_object_error(
"accessor with requested offset and range would exceed the bounds of "
"the buffer",
PI_ERROR_INVALID_VALUE);
UR_RESULT_ERROR_INVALID_VALUE);

initHostAcc();
detail::associateWithHandler(CommandGroupHandler, this, AccessTarget);
Expand Down Expand Up @@ -1609,7 +1609,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
throw sycl::invalid_object_error(
"accessor with requested offset and range would exceed the bounds of "
"the buffer",
PI_ERROR_INVALID_VALUE);
UR_RESULT_ERROR_INVALID_VALUE);

initHostAcc();
detail::associateWithHandler(CommandGroupHandler, this, AccessTarget);
Expand Down Expand Up @@ -1961,7 +1961,7 @@ class __SYCL_EBO __SYCL_SPECIAL_CLASS __SYCL_TYPE(accessor) accessor :
AccessMode == access::mode::read) {
throw sycl::invalid_object_error(
"accessor would cannot be both read_only and no_init",
PI_ERROR_INVALID_VALUE);
UR_RESULT_ERROR_INVALID_VALUE);
}
}

Expand Down Expand Up @@ -2281,10 +2281,10 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
}
#endif

template <int Dims = Dimensions, typename = std::enable_if_t<Dims == 0>>
local_accessor_base(handler &, const property_list &propList,
const detail::code_location CodeLoc =
detail::code_location::current())
template <int Dims = Dimensions, typename = std::enable_if_t<Dims == 0>>
aarongreig marked this conversation as resolved.
Show resolved Hide resolved
local_accessor_base(
handler &, const property_list &propList,
const detail::code_location CodeLoc = detail::code_location::current())
#ifdef __SYCL_DEVICE_ONLY__
: impl(range<AdjustedDim>{1}) {
(void)propList;
Expand Down Expand Up @@ -2316,12 +2316,11 @@ class __SYCL_SPECIAL_CLASS local_accessor_base :
}
#endif

template <int Dims = Dimensions,
typename = std::enable_if_t<(Dims > 0)>>
local_accessor_base(range<Dimensions> AllocationSize, handler &,
const property_list &propList,
const detail::code_location CodeLoc =
detail::code_location::current())
template <int Dims = Dimensions, typename = std::enable_if_t<(Dims > 0)>>
local_accessor_base(
range<Dimensions> AllocationSize, handler &,
const property_list &propList,
const detail::code_location CodeLoc = detail::code_location::current())
#ifdef __SYCL_DEVICE_ONLY__
: impl(AllocationSize) {
(void)propList;
Expand Down
Loading