Skip to content

Commit 4de7a52

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents ebbcd09 + 974cc70 commit 4de7a52

File tree

168 files changed

+464
-381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+464
-381
lines changed

llvm/lib/SYCLLowerIR/ESIMD/ESIMDVerifier.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ namespace id = itanium_demangle;
3131
#define DEBUG_TYPE "esimd-verifier"
3232

3333
// A list of SYCL functions (regexps) allowed for use in ESIMD context.
34+
// clang-format off
3435
static const char *LegalSYCLFunctions[] = {
3536
"^sycl::_V1::accessor<.+>::accessor",
3637
"^sycl::_V1::accessor<.+>::~accessor",
@@ -80,6 +81,7 @@ static const char *LegalSYCLFunctionsInStatelessMode[] = {
8081
"^sycl::_V1::accessor<.+>::getMemoryRange",
8182
"^sycl::_V1::accessor<.+>::getOffset",
8283
"^sycl::_V1::accessor<.+>::operator\\[\\]"};
84+
// clang-format on
8385

8486
namespace {
8587

sycl/doc/design/DeviceLibExtensions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Device library extensions
44
Device compiler that indicates support for a particular extension is
55
supposed to support *all* the corresponding functions.
66

7-
cl_intel_devicelib_cassert
7+
cl_intel_devicelib_assert
88
==========================
99

1010
.. code:

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler_opencl.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ https://github.com/intel/llvm/issues
3737

3838
== Dependencies
3939

40-
This extension is written against the SYCL 2020 revision 7 specification.
40+
This extension is written against the SYCL 2020 revision 8 specification.
4141
All references below to the "core SYCL specification" or to section numbers in
4242
the SYCL specification refer to that revision.
4343

4444
This extension also depends on the following other SYCL extensions:
4545

46-
* link:../proposed/sycl_ext_oneapi_kernel_compiler.asciidoc[
46+
* link:../experimental/sycl_ext_oneapi_kernel_compiler.asciidoc[
4747
sycl_ext_oneapi_kernel_compiler]
4848

4949

@@ -60,7 +60,7 @@ this specification.*
6060
== Overview
6161

6262
This is an extension to
63-
link:../proposed/sycl_ext_oneapi_kernel_compiler.asciidoc[
63+
link:../experimental/sycl_ext_oneapi_kernel_compiler.asciidoc[
6464
sycl_ext_oneapi_kernel_compiler], which allows an application to define a
6565
kernel in the OpenCL C language when dynamically compiling a kernel from
6666
source.

sycl/doc/extensions/proposed/sycl_ext_oneapi_free_function_queries.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ existing interfaces is not feasible.
8282
The `sycl::ext::oneapi::this_kernel` namespace contains functionality related
8383
to the currently executing kernel.
8484

85-
It is the user's responsibility to ensure that that these functions are called
85+
It is the user's responsibility to ensure that these functions are called
8686
in a manner that is compatible with the kernel's launch parameters, as detailed
8787
in the definition of each function. Calling these functions from an incompatible
8888
kernel results in undefined behavior.

sycl/plugins/unified_runtime/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ if(SYCL_PI_UR_USE_FETCH_CONTENT)
5757
include(FetchContent)
5858

5959
set(UNIFIED_RUNTIME_REPO "https://github.com/oneapi-src/unified-runtime.git")
60-
# commit 71957e849435169b43e51a42025afeeb63d7508b
61-
# Merge: ce152a64 e001b98d
60+
# commit 31b654f981f6098936e7f04c65803395a2ea343a
61+
# Merge: 71957e84 3da21336
6262
# Author: Kenneth Benzie (Benie) <k.benzie@codeplay.com>
63-
# Date: Tue Nov 21 16:41:08 2023 +0000
64-
# Merge pull request #1100 from kbenzie/benie/fixup-multi-device-compile
65-
# [CUDA][HIP][OpenCL][NATIVECPU] Fix multi-device compile
66-
set(UNIFIED_RUNTIME_TAG 71957e849435169b43e51a42025afeeb63d7508b)
63+
# Date: Wed Nov 22 11:27:33 2023 +0000
64+
# Merge pull request #1053 from jandres742/url0leakkey
65+
# [UR][L0] Add UR_L0_LEAKS_DEBUG key
66+
set(UNIFIED_RUNTIME_TAG 31b654f981f6098936e7f04c65803395a2ea343a)
6767

6868
if(SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO)
6969
set(UNIFIED_RUNTIME_REPO "${SYCL_PI_UR_OVERRIDE_FETCH_CONTENT_REPO}")

sycl/source/detail/common.cpp

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,24 @@ const char *stringifyErrorCode(pi_int32 error) {
7272
}
7373

7474
std::vector<std::string> split_string(const std::string &str, char delimeter) {
75-
std::vector<std::string> result;
76-
size_t beg = 0;
77-
size_t end = 0;
78-
while ((end = str.find(delimeter, beg)) != std::string::npos) {
79-
result.push_back(str.substr(beg, end - beg));
80-
beg = end + 1;
75+
std::vector<std::string> Result;
76+
size_t Start = 0;
77+
size_t End = 0;
78+
while ((End = str.find(delimeter, Start)) != std::string::npos) {
79+
Result.push_back(str.substr(Start, End - Start));
80+
Start = End + 1;
8181
}
82-
end = str.find('\0');
83-
if (beg < end) {
84-
result.push_back(str.substr(beg, end - beg));
82+
// Get the last substring and ignore the null character so we wouldn't get
83+
// double null characters \0\0 at the end of the substring
84+
End = str.find('\0');
85+
if (Start < End) {
86+
std::string LastSubStr(str.substr(Start, End - Start));
87+
// In case str has a delimeter at the end, the substring will be empty, so
88+
// we shouldn't add it to the final vector
89+
if (!LastSubStr.empty())
90+
Result.push_back(LastSubStr);
8591
}
86-
return result;
92+
return Result;
8793
}
8894

8995
} // namespace detail

sycl/source/detail/graph_impl.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -416,15 +416,13 @@ void graph_impl::makeEdge(std::shared_ptr<node_impl> Src,
416416

417417
std::vector<sycl::detail::EventImplPtr> graph_impl::getExitNodesEvents() {
418418
std::vector<sycl::detail::EventImplPtr> Events;
419-
auto EnqueueExitNodesEvents = [&](std::shared_ptr<node_impl> &Node,
420-
std::deque<std::shared_ptr<node_impl>> &) {
419+
420+
for (auto Node : MNodeStorage) {
421421
if (Node->MSuccessors.empty()) {
422422
Events.push_back(getEventForNode(Node));
423423
}
424-
return false;
425-
};
424+
}
426425

427-
searchDepthFirst(EnqueueExitNodesEvents);
428426
return Events;
429427
}
430428

sycl/source/detail/graph_impl.hpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,24 @@ class graph_impl {
784784
/// @return vector of events associated to exit nodes.
785785
std::vector<sycl::detail::EventImplPtr> getExitNodesEvents();
786786

787+
/// Removes all Barrier nodes from the list of extra dependencies
788+
/// MExtraDependencies.
789+
/// @return vector of events associated to previous barrier nodes.
790+
std::vector<sycl::detail::EventImplPtr>
791+
removeBarriersFromExtraDependencies() {
792+
std::vector<sycl::detail::EventImplPtr> Events;
793+
for (auto It = MExtraDependencies.begin();
794+
It != MExtraDependencies.end();) {
795+
if ((*It)->MCGType == sycl::detail::CG::Barrier) {
796+
Events.push_back(getEventForNode(*It));
797+
It = MExtraDependencies.erase(It);
798+
} else {
799+
++It;
800+
}
801+
}
802+
return Events;
803+
}
804+
787805
private:
788806
/// Iterate over the graph depth-first and run \p NodeFunc on each node.
789807
/// @param NodeFunc A function which receives as input a node in the graph to
@@ -861,7 +879,7 @@ class graph_impl {
861879
/// added to this graph.
862880
/// This list is mainly used by barrier nodes which must be considered
863881
/// as predecessors for all nodes subsequently added to the graph.
864-
std::vector<std::shared_ptr<node_impl>> MExtraDependencies;
882+
std::list<std::shared_ptr<node_impl>> MExtraDependencies;
865883
};
866884

867885
/// Class representing the implementation of command_graph<executable>.

sycl/source/detail/queue_impl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ event queue_impl::memset(const std::shared_ptr<detail::queue_impl> &Self,
8585
// Emit a begin/end scope for this call
8686
PrepareNotify.scopedNotify((uint16_t)xpti::trace_point_type_t::task_begin);
8787
#endif
88+
if (MGraph.lock()) {
89+
throw sycl::exception(make_error_code(errc::invalid),
90+
"The memset feature is not yet available "
91+
"for use with the SYCL Graph extension.");
92+
}
93+
8894
if (MHasDiscardEventsSupport) {
8995
MemoryManager::fill_usm(Ptr, Self, Count, Value,
9096
getOrWaitEvents(DepEvents, MContext), nullptr);

sycl/source/handler.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,14 @@ event handler::finalize() {
389389
// nodes/events of the graph
390390
if (MEventsWaitWithBarrier.size() == 0) {
391391
MEventsWaitWithBarrier = GraphImpl->getExitNodesEvents();
392+
// Graph-wide barriers take precedence over previous one.
393+
// We therefore remove the previous ones from ExtraDependencies list.
394+
// The current barrier is then added to this list in the graph_impl.
395+
std::vector<detail::EventImplPtr> EventsBarriers =
396+
GraphImpl->removeBarriersFromExtraDependencies();
397+
MEventsWaitWithBarrier.insert(std::end(MEventsWaitWithBarrier),
398+
std::begin(EventsBarriers),
399+
std::end(EventsBarriers));
392400
}
393401
CGData.MEvents.insert(std::end(CGData.MEvents),
394402
std::begin(MEventsWaitWithBarrier),

0 commit comments

Comments
 (0)