Skip to content

Commit 6ec70d9

Browse files
committed
Merge branch 'sycl' into pietro/comp_link
2 parents 144a918 + 6e095fd commit 6ec70d9

File tree

95 files changed

+908
-321
lines changed

Some content is hidden

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

95 files changed

+908
-321
lines changed

clang/test/Driver/sycl-device-lib-amdgcn.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
// Check that llvm-link uses the "-only-needed" flag.
4646
// Not using the flag breaks kernel bundles.
47-
// RUN: %clangxx -### -nogpulib --sysroot=%S/Inputs/SYCL \
47+
// RUN: %clangxx -### -nogpulib -fno-sycl-libspirv --sysroot=%S/Inputs/SYCL \
4848
// RUN: -fsycl -fsycl-targets=amdgcn-amd-amdhsa -Xsycl-target-backend --offload-arch=gfx906 %s 2>&1 \
4949
// RUN: | FileCheck -check-prefix=CHK-ONLY-NEEDED %s
5050

clang/test/Driver/sycl-device-lib-nvptx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
// Check that llvm-link uses the "-only-needed" flag.
4646
// Not using the flag breaks kernel bundles.
47-
// RUN: %clangxx -### --sysroot=%S/Inputs/SYCL -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \
47+
// RUN: %clangxx -### -nocudalib -fno-sycl-libspirv --sysroot=%S/Inputs/SYCL -fsycl -fsycl-targets=nvptx64-nvidia-cuda %s 2>&1 \
4848
// RUN: | FileCheck -check-prefix=CHK-ONLY-NEEDED %s
4949

5050
// CHK-ONLY-NEEDED: llvm-link"{{.*}}"-only-needed"{{.*}}"{{.*}}devicelib--cuda.bc"{{.*}}

llvm/lib/SYCLLowerIR/ESIMD/ESIMDVerifier.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ static const char *LegalSYCLFunctions[] = {
5353
"^sycl::_V1::multi_ptr<.+>::.+",
5454
"^sycl::_V1::nd_item<.+>::.+",
5555
"^sycl::_V1::group<.+>::.+",
56+
"^sycl::_V1::group_barrier<.+>",
5657
"^sycl::_V1::sub_group::.+",
5758
"^sycl::_V1::range<.+>::.+",
5859
"^sycl::_V1::kernel_handler::.+",
@@ -64,9 +65,12 @@ static const char *LegalSYCLFunctions[] = {
6465
"^sycl::_V1::operator.+<.+>",
6566
"^sycl::_V1::ext::oneapi::experimental::properties",
6667
"^sycl::_V1::ext::oneapi::experimental::detail::ExtractProperties",
68+
"^sycl::_V1::ext::oneapi::experimental::root_group<.+>::.+",
69+
"^sycl::_V1::ext::oneapi::experimental::this_group<.+>",
6770
"^sycl::_V1::ext::oneapi::sub_group::.+",
6871
"^sycl::_V1::ext::oneapi::experimental::spec_constant<.+>::.+",
6972
"^sycl::_V1::ext::oneapi::experimental::this_sub_group",
73+
"^sycl::_V1::ext::oneapi::experimental::this_work_item::get_root_group<.+>",
7074
"^sycl::_V1::ext::oneapi::experimental::uniform<.+>::.+",
7175
"^sycl::_V1::ext::oneapi::bfloat16::.+",
7276
"^sycl::_V1::ext::oneapi::experimental::if_architecture_is"};

sycl/include/sycl/detail/array.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE
1212
#include <sycl/exception.hpp>
13-
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE
1413

1514
#include <stddef.h> // for size_t
1615
#include <type_traits> // for enable_if_t

sycl/include/sycl/detail/cg_types.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <sycl/nd_item.hpp> // for nd_item
2424
#include <sycl/nd_range.hpp> // for nd_range
2525
#include <sycl/range.hpp> // for range, operator*
26-
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE
2726

2827
#include <functional> // for function
2928
#include <stddef.h> // for size_t

sycl/include/sycl/detail/common.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ class __SYCL_EXPORT tls_code_loc_t {
140140
/// @return The code location information saved in the TLS slot. If not TLS
141141
/// entry has been set up, a default coe location is returned.
142142
const detail::code_location &query();
143+
/// @brief Returns true if the TLS slot was cleared when this object was
144+
/// constructed.
145+
bool isToplevel() const { return !MLocalScope; }
143146

144147
private:
145148
// The flag that is used to determine if the object is in a local scope or in

sycl/include/sycl/detail/ur.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include <sycl/detail/os_util.hpp>
2020
#include <ur_api.h>
2121

22-
#include <memory>
2322
#include <type_traits>
2423
#include <vector>
2524

@@ -103,9 +102,6 @@ __SYCL_EXPORT void contextSetExtendedDeleter(const sycl::context &constext,
103102
void *user_data);
104103
}
105104

106-
class Adapter;
107-
using AdapterPtr = std::shared_ptr<Adapter>;
108-
109105
// TODO: To be removed as this was only introduced for esimd which was removed.
110106
template <sycl::backend BE>
111107
__SYCL_EXPORT void *getPluginOpaqueData(void *opaquedata_arg);
@@ -123,15 +119,6 @@ int unloadOsLibrary(void *Library);
123119
// library, implementation is OS dependent.
124120
void *getOsLibraryFuncAddress(void *Library, const std::string &FunctionName);
125121

126-
void *getURLoaderLibrary();
127-
128-
// Performs UR one-time initialization.
129-
std::vector<AdapterPtr> &
130-
initializeUr(ur_loader_config_handle_t LoaderConfig = nullptr);
131-
132-
// Get the adapter serving given backend.
133-
template <backend BE> const AdapterPtr &getAdapter();
134-
135122
// The SYCL_UR_TRACE sets what we will trace.
136123
// This is a bit-mask of various things we'd want to trace.
137124
enum TraceLevel { TRACE_BASIC = 0x1, TRACE_CALLS = 0x2, TRACE_ALL = -1 };

sycl/include/sycl/ext/oneapi/accessor_property_list.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <sycl/detail/property_list_base.hpp> // for PropertyListBase
1515
#include <sycl/exception.hpp>
1616
#include <sycl/property_list.hpp> // for property_list
17-
#include <ur_api.h> // for UR_RESULT_ERROR_INVALID_VALUE
1817

1918
#include <bitset> // for bitset
2019
#include <memory> // for shared_ptr

sycl/include/sycl/ext/oneapi/bindless_images.hpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1369,7 +1369,7 @@ inline event queue::ext_oneapi_copy(
13691369
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
13701370
return submit(
13711371
[&](handler &CGH) { CGH.ext_oneapi_copy(Src, Dest, DestImgDesc); },
1372-
CodeLoc);
1372+
TlsCodeLocCapture.query());
13731373
}
13741374

13751375
inline event queue::ext_oneapi_copy(
@@ -1383,7 +1383,7 @@ inline event queue::ext_oneapi_copy(
13831383
CGH.ext_oneapi_copy(Src, SrcOffset, SrcExtent, Dest, DestOffset,
13841384
DestImgDesc, CopyExtent);
13851385
},
1386-
CodeLoc);
1386+
TlsCodeLocCapture.query());
13871387
}
13881388

13891389
inline event queue::ext_oneapi_copy(
@@ -1396,7 +1396,7 @@ inline event queue::ext_oneapi_copy(
13961396
CGH.depends_on(DepEvent);
13971397
CGH.ext_oneapi_copy(Src, Dest, DestImgDesc);
13981398
},
1399-
CodeLoc);
1399+
TlsCodeLocCapture.query());
14001400
}
14011401

14021402
inline event queue::ext_oneapi_copy(
@@ -1412,7 +1412,7 @@ inline event queue::ext_oneapi_copy(
14121412
CGH.ext_oneapi_copy(Src, SrcOffset, SrcExtent, Dest, DestOffset,
14131413
DestImgDesc, CopyExtent);
14141414
},
1415-
CodeLoc);
1415+
TlsCodeLocCapture.query());
14161416
}
14171417

14181418
inline event queue::ext_oneapi_copy(
@@ -1425,7 +1425,7 @@ inline event queue::ext_oneapi_copy(
14251425
CGH.depends_on(DepEvents);
14261426
CGH.ext_oneapi_copy(Src, Dest, DestImgDesc);
14271427
},
1428-
CodeLoc);
1428+
TlsCodeLocCapture.query());
14291429
}
14301430

14311431
inline event queue::ext_oneapi_copy(
@@ -1441,7 +1441,7 @@ inline event queue::ext_oneapi_copy(
14411441
CGH.ext_oneapi_copy(Src, SrcOffset, SrcExtent, Dest, DestOffset,
14421442
DestImgDesc, CopyExtent);
14431443
},
1444-
CodeLoc);
1444+
TlsCodeLocCapture.query());
14451445
}
14461446

14471447
inline event queue::ext_oneapi_copy(
@@ -1451,7 +1451,7 @@ inline event queue::ext_oneapi_copy(
14511451
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
14521452
return submit(
14531453
[&](handler &CGH) { CGH.ext_oneapi_copy(Src, Dest, SrcImgDesc); },
1454-
CodeLoc);
1454+
TlsCodeLocCapture.query());
14551455
}
14561456

14571457
inline event queue::ext_oneapi_copy(
@@ -1466,7 +1466,7 @@ inline event queue::ext_oneapi_copy(
14661466
CGH.ext_oneapi_copy(Src, SrcOffset, SrcImgDesc, Dest, DestOffset,
14671467
DestExtent, CopyExtent);
14681468
},
1469-
CodeLoc);
1469+
TlsCodeLocCapture.query());
14701470
}
14711471

14721472
inline event queue::ext_oneapi_copy(
@@ -1479,7 +1479,7 @@ inline event queue::ext_oneapi_copy(
14791479
CGH.depends_on(DepEvent);
14801480
CGH.ext_oneapi_copy(Src, Dest, SrcImgDesc);
14811481
},
1482-
CodeLoc);
1482+
TlsCodeLocCapture.query());
14831483
}
14841484

14851485
inline event queue::ext_oneapi_copy(
@@ -1496,7 +1496,7 @@ inline event queue::ext_oneapi_copy(
14961496
CGH.ext_oneapi_copy(Src, SrcOffset, SrcImgDesc, Dest, DestOffset,
14971497
DestExtent, CopyExtent);
14981498
},
1499-
CodeLoc);
1499+
TlsCodeLocCapture.query());
15001500
}
15011501

15021502
inline event queue::ext_oneapi_copy(
@@ -1509,7 +1509,7 @@ inline event queue::ext_oneapi_copy(
15091509
CGH.depends_on(DepEvents);
15101510
CGH.ext_oneapi_copy(Src, Dest, SrcImgDesc);
15111511
},
1512-
CodeLoc);
1512+
TlsCodeLocCapture.query());
15131513
}
15141514

15151515
inline event queue::ext_oneapi_copy(
@@ -1526,7 +1526,7 @@ inline event queue::ext_oneapi_copy(
15261526
CGH.ext_oneapi_copy(Src, SrcOffset, SrcImgDesc, Dest, DestOffset,
15271527
DestExtent, CopyExtent);
15281528
},
1529-
CodeLoc);
1529+
TlsCodeLocCapture.query());
15301530
}
15311531

15321532
inline event queue::ext_oneapi_copy(
@@ -1538,7 +1538,7 @@ inline event queue::ext_oneapi_copy(
15381538
[&](handler &CGH) {
15391539
CGH.ext_oneapi_copy(Src, Dest, DeviceImgDesc, DeviceRowPitch);
15401540
},
1541-
CodeLoc);
1541+
TlsCodeLocCapture.query());
15421542
}
15431543

15441544
inline event queue::ext_oneapi_copy(
@@ -1553,7 +1553,7 @@ inline event queue::ext_oneapi_copy(
15531553
CGH.ext_oneapi_copy(Src, SrcOffset, Dest, DestOffset, DeviceImgDesc,
15541554
DeviceRowPitch, HostExtent, CopyExtent);
15551555
},
1556-
CodeLoc);
1556+
TlsCodeLocCapture.query());
15571557
}
15581558

15591559
inline event queue::ext_oneapi_copy(
@@ -1567,7 +1567,7 @@ inline event queue::ext_oneapi_copy(
15671567
CGH.depends_on(DepEvent);
15681568
CGH.ext_oneapi_copy(Src, Dest, DeviceImgDesc, DeviceRowPitch);
15691569
},
1570-
CodeLoc);
1570+
TlsCodeLocCapture.query());
15711571
}
15721572

15731573
inline event queue::ext_oneapi_copy(
@@ -1581,7 +1581,7 @@ inline event queue::ext_oneapi_copy(
15811581
CGH.depends_on(DepEvent);
15821582
CGH.ext_oneapi_copy(Src, Dest, ImageDesc);
15831583
},
1584-
CodeLoc);
1584+
TlsCodeLocCapture.query());
15851585
}
15861586

15871587
inline event queue::ext_oneapi_copy(
@@ -1595,7 +1595,7 @@ inline event queue::ext_oneapi_copy(
15951595
CGH.depends_on(DepEvents);
15961596
CGH.ext_oneapi_copy(Src, Dest, ImageDesc);
15971597
},
1598-
CodeLoc);
1598+
TlsCodeLocCapture.query());
15991599
}
16001600

16011601
inline event queue::ext_oneapi_copy(
@@ -1606,7 +1606,7 @@ inline event queue::ext_oneapi_copy(
16061606
detail::tls_code_loc_t TlsCodeLocCapture(CodeLoc);
16071607
return submit(
16081608
[&](handler &CGH) { CGH.ext_oneapi_copy(Src, Dest, ImageDesc); },
1609-
CodeLoc);
1609+
TlsCodeLocCapture.query());
16101610
}
16111611

16121612
inline event queue::ext_oneapi_copy(
@@ -1622,7 +1622,7 @@ inline event queue::ext_oneapi_copy(
16221622
CGH.ext_oneapi_copy(Src, SrcOffset, Dest, DestOffset, DeviceImgDesc,
16231623
DeviceRowPitch, HostExtent, CopyExtent);
16241624
},
1625-
CodeLoc);
1625+
TlsCodeLocCapture.query());
16261626
}
16271627

16281628
inline event queue::ext_oneapi_copy(
@@ -1636,7 +1636,7 @@ inline event queue::ext_oneapi_copy(
16361636
CGH.depends_on(DepEvents);
16371637
CGH.ext_oneapi_copy(Src, Dest, DeviceImgDesc, DeviceRowPitch);
16381638
},
1639-
CodeLoc);
1639+
TlsCodeLocCapture.query());
16401640
}
16411641

16421642
inline event queue::ext_oneapi_copy(
@@ -1652,7 +1652,7 @@ inline event queue::ext_oneapi_copy(
16521652
CGH.ext_oneapi_copy(Src, SrcOffset, Dest, DestOffset, DeviceImgDesc,
16531653
DeviceRowPitch, HostExtent, CopyExtent);
16541654
},
1655-
CodeLoc);
1655+
TlsCodeLocCapture.query());
16561656
}
16571657

16581658
inline event queue::ext_oneapi_wait_external_semaphore(
@@ -1664,7 +1664,7 @@ inline event queue::ext_oneapi_wait_external_semaphore(
16641664
CGH.depends_on(DepEvent);
16651665
CGH.ext_oneapi_wait_external_semaphore(SemaphoreHandle);
16661666
},
1667-
CodeLoc);
1667+
TlsCodeLocCapture.query());
16681668
}
16691669

16701670
inline event queue::ext_oneapi_wait_external_semaphore(
@@ -1676,7 +1676,7 @@ inline event queue::ext_oneapi_wait_external_semaphore(
16761676
CGH.depends_on(DepEvents);
16771677
CGH.ext_oneapi_wait_external_semaphore(SemaphoreHandle);
16781678
},
1679-
CodeLoc);
1679+
TlsCodeLocCapture.query());
16801680
}
16811681

16821682
inline event queue::ext_oneapi_wait_external_semaphore(
@@ -1687,7 +1687,7 @@ inline event queue::ext_oneapi_wait_external_semaphore(
16871687
[&](handler &CGH) {
16881688
CGH.ext_oneapi_wait_external_semaphore(SemaphoreHandle, WaitValue);
16891689
},
1690-
CodeLoc);
1690+
TlsCodeLocCapture.query());
16911691
}
16921692

16931693
inline event queue::ext_oneapi_wait_external_semaphore(
@@ -1699,7 +1699,7 @@ inline event queue::ext_oneapi_wait_external_semaphore(
16991699
CGH.depends_on(DepEvent);
17001700
CGH.ext_oneapi_wait_external_semaphore(SemaphoreHandle, WaitValue);
17011701
},
1702-
CodeLoc);
1702+
TlsCodeLocCapture.query());
17031703
}
17041704

17051705
inline event queue::ext_oneapi_wait_external_semaphore(
@@ -1712,7 +1712,7 @@ inline event queue::ext_oneapi_wait_external_semaphore(
17121712
CGH.depends_on(DepEvents);
17131713
CGH.ext_oneapi_wait_external_semaphore(SemaphoreHandle, WaitValue);
17141714
},
1715-
CodeLoc);
1715+
TlsCodeLocCapture.query());
17161716
}
17171717

17181718
inline event queue::ext_oneapi_signal_external_semaphore(
@@ -1723,7 +1723,7 @@ inline event queue::ext_oneapi_signal_external_semaphore(
17231723
[&](handler &CGH) {
17241724
CGH.ext_oneapi_signal_external_semaphore(SemaphoreHandle);
17251725
},
1726-
CodeLoc);
1726+
TlsCodeLocCapture.query());
17271727
}
17281728

17291729
inline event queue::ext_oneapi_signal_external_semaphore(
@@ -1735,7 +1735,7 @@ inline event queue::ext_oneapi_signal_external_semaphore(
17351735
CGH.depends_on(DepEvent);
17361736
CGH.ext_oneapi_signal_external_semaphore(SemaphoreHandle);
17371737
},
1738-
CodeLoc);
1738+
TlsCodeLocCapture.query());
17391739
}
17401740

17411741
inline event queue::ext_oneapi_signal_external_semaphore(
@@ -1747,7 +1747,7 @@ inline event queue::ext_oneapi_signal_external_semaphore(
17471747
CGH.depends_on(DepEvents);
17481748
CGH.ext_oneapi_signal_external_semaphore(SemaphoreHandle);
17491749
},
1750-
CodeLoc);
1750+
TlsCodeLocCapture.query());
17511751
}
17521752

17531753
inline event queue::ext_oneapi_signal_external_semaphore(
@@ -1758,7 +1758,7 @@ inline event queue::ext_oneapi_signal_external_semaphore(
17581758
[&](handler &CGH) {
17591759
CGH.ext_oneapi_signal_external_semaphore(SemaphoreHandle, SignalValue);
17601760
},
1761-
CodeLoc);
1761+
TlsCodeLocCapture.query());
17621762
}
17631763

17641764
inline event queue::ext_oneapi_signal_external_semaphore(
@@ -1771,7 +1771,7 @@ inline event queue::ext_oneapi_signal_external_semaphore(
17711771
CGH.depends_on(DepEvent);
17721772
CGH.ext_oneapi_signal_external_semaphore(SemaphoreHandle, SignalValue);
17731773
},
1774-
CodeLoc);
1774+
TlsCodeLocCapture.query());
17751775
}
17761776

17771777
inline event queue::ext_oneapi_signal_external_semaphore(
@@ -1784,7 +1784,7 @@ inline event queue::ext_oneapi_signal_external_semaphore(
17841784
CGH.depends_on(DepEvents);
17851785
CGH.ext_oneapi_signal_external_semaphore(SemaphoreHandle, SignalValue);
17861786
},
1787-
CodeLoc);
1787+
TlsCodeLocCapture.query());
17881788
}
17891789

17901790
} // namespace _V1

0 commit comments

Comments
 (0)