Skip to content

Commit 37c66e4

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into sycl
2 parents b393637 + 3238b3f commit 37c66e4

File tree

12 files changed

+25
-910
lines changed

12 files changed

+25
-910
lines changed

llvm/test/Other/cfg-printer-branch-weights.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
;RUN: opt < %s -analyze -dot-cfg -cfg-dot-filename-prefix=%t 2>/dev/null
22
;RUN: FileCheck %s -input-file=%t.f.dot
33

4+
;TODO: Investigate why this test doesn't work with dynamically linked libraries
5+
;REQUIRES: static-libs
6+
47
define void @f(i32) {
58
entry:
69
%check = icmp sgt i32 %0, 0

llvm/test/Other/cfg_deopt_unreach.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
; RUN: opt < %s -analyze -dot-cfg -cfg-hide-unreachable-paths -cfg-hide-deoptimize-paths -cfg-dot-filename-prefix=%t/both-flags 2>/dev/null
1010
; RUN: FileCheck %s -input-file=%t/both-flags.callee.dot -check-prefix=BOTH-FLAGS
1111

12+
; TODO: Investigate why this test doesn't work with dynamically linked libraries
13+
; REQUIRES: static-libs
14+
1215
declare i8 @llvm.experimental.deoptimize.i8(...)
1316

1417
define i8 @callee(i1* %c) alwaysinline {

sycl/doc/GetStartedGuide.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ and a wide range of compute accelerators such as GPU and FPGA.
2424
* `git` - https://git-scm.com/downloads
2525
* `cmake` version 3.2 or later - http://www.cmake.org/download/
2626
* `python` - https://www.python.org/downloads/release/python-2716/
27+
* `ninja` - https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages
2728
* C++ compiler
2829
* Linux: `GCC` version 5.1.0 or later (including libstdc++) -
2930
https://gcc.gnu.org/install/
@@ -259,13 +260,8 @@ c:\oclcpu_rt_<cpu_version>\install.bat c:\tbb_<tbb_version>\tbb\bin\intel64\vc14
259260

260261
To verify that built DPC++ toolchain is working correctly, run:
261262

262-
**Linux**
263+
**Linux/Windows (64-bit)**
263264
```bash
264-
make -j`nproc` check-all
265-
```
266-
267-
**Windows (64-bit)**
268-
```bat
269265
ninja check-all
270266
```
271267

sycl/include/CL/sycl/detail/builtins.hpp

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
#define __SYCL_EXTERN_IT2(Ret, prefix, call, Arg1, Arg2)
2525
#define __SYCL_EXTERN_IT2_SAME(Ret, prefix, call, Arg)
2626
#define __SYCL_EXTERN_IT3(Ret, prefix, call, Arg1, Arg2, Arg3)
27-
#define __SYCL_TPARAMS0(Type)
28-
#define __SYCL_TPARAMS1(Ret, A1)
29-
#define __SYCL_TPARAMS2(Ret, A1, A2)
30-
#define __SYCL_TPARAMS3(Ret, A1, A2, A3)
3127
#else
3228
#define __FUNC_PREFIX_OCL
3329
#define __FUNC_PREFIX_CORE
@@ -39,10 +35,6 @@
3935
extern Ret __SYCL_PPCAT(prefix, call)(Arg1, Arg2)
4036
#define __SYCL_EXTERN_IT3(Ret, prefix, call, Arg1, Arg2, Arg3) \
4137
extern Ret __SYCL_PPCAT(prefix, call)(Arg1, Arg2, Arg3)
42-
#define __SYCL_TPARAMS0(Type)
43-
#define __SYCL_TPARAMS1(Ret, A1)
44-
#define __SYCL_TPARAMS2(Ret, A1, A2)
45-
#define __SYCL_TPARAMS3(Ret, A1, A2, A3)
4638
#endif
4739

4840
#define __SYCL_PPCAT_NX(A, B) A##B
@@ -55,7 +47,7 @@
5547
using Arg1 = cl::sycl::detail::ConvertToOpenCLType_t<T1>; \
5648
__SYCL_EXTERN_IT1(Ret, prefix, call, Arg1); \
5749
Arg1 arg1 = cl::sycl::detail::convertDataToType<T1, Arg1>(t1); \
58-
Ret ret = __SYCL_PPCAT(prefix, call) __SYCL_TPARAMS1(Ret, Arg1)(arg1); \
50+
Ret ret = __SYCL_PPCAT(prefix, call)(arg1); \
5951
return cl::sycl::detail::convertDataToType<Ret, R>(ret); \
6052
}
6153

@@ -68,8 +60,7 @@
6860
__SYCL_EXTERN_IT2(Ret, prefix, call, Arg1, Arg2); \
6961
Arg1 arg1 = cl::sycl::detail::convertDataToType<T1, Arg1>(t1); \
7062
Arg2 arg2 = cl::sycl::detail::convertDataToType<T2, Arg2>(t2); \
71-
Ret ret = __SYCL_PPCAT(prefix, call) \
72-
__SYCL_TPARAMS2(Ret, Arg1, Arg2)(arg1, arg2); \
63+
Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
7364
return cl::sycl::detail::convertDataToType<Ret, R>(ret); \
7465
}
7566

@@ -81,8 +72,7 @@
8172
__SYCL_EXTERN_IT2_SAME(Ret, prefix, call, Arg); \
8273
Arg arg1 = cl::sycl::detail::convertDataToType<T, Arg>(t1); \
8374
Arg arg2 = cl::sycl::detail::convertDataToType<T, Arg>(t2); \
84-
Ret ret = \
85-
__SYCL_PPCAT(prefix, call) __SYCL_TPARAMS1(Ret, Arg)(arg1, arg2); \
75+
Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
8676
return cl::sycl::detail::convertDataToType<Ret, R>(ret); \
8777
}
8878

@@ -93,7 +83,7 @@
9383
__SYCL_EXTERN_IT2_SAME(Type, prefix, call, Type); \
9484
Type arg1 = cl::sycl::detail::convertDataToType<T, Type>(v1); \
9585
Type arg2 = cl::sycl::detail::convertDataToType<T, Type>(v2); \
96-
Type ret = __SYCL_PPCAT(prefix, call) __SYCL_TPARAMS0(Type)(arg1, arg2); \
86+
Type ret = __SYCL_PPCAT(prefix, call)(arg1, arg2); \
9787
return cl::sycl::detail::convertDataToType<Type, T>(ret); \
9888
}
9989

@@ -108,8 +98,7 @@
10898
Arg1 arg1 = cl::sycl::detail::convertDataToType<T1, Arg1>(t1); \
10999
Arg2 arg2 = cl::sycl::detail::convertDataToType<T2, Arg2>(t2); \
110100
Arg3 arg3 = cl::sycl::detail::convertDataToType<T3, Arg3>(t3); \
111-
Ret ret = __SYCL_PPCAT(prefix, call) \
112-
__SYCL_TPARAMS3(Ret, Arg1, Arg2, Arg3)(arg1, arg2, arg3); \
101+
Ret ret = __SYCL_PPCAT(prefix, call)(arg1, arg2, arg3); \
113102
return cl::sycl::detail::convertDataToType<Ret, R>(ret); \
114103
}
115104

@@ -302,10 +291,6 @@ __SYCL_MAKE_CALL_ARG3(select, __FUNC_PREFIX_OCL) // select
302291
#undef __SYCL_PPCAT
303292
#undef __FUNC_PREFIX_OCL
304293
#undef __FUNC_PREFIX_CORE
305-
#undef __SYCL_TPARAMS0
306-
#undef __SYCL_TPARAMS1
307-
#undef __SYCL_TPARAMS2
308-
#undef __SYCL_TPARAMS3
309294
#undef __SYCL_EXTERN_IT1
310295
#undef __SYCL_EXTERN_IT2
311296
#undef __SYCL_EXTERN_IT2_SAME

sycl/source/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ set(SYCL_SOURCES
105105
"detail/scheduler/graph_builder.cpp"
106106
"detail/spec_constant_impl.cpp"
107107
"detail/sycl_mem_obj_t.cpp"
108-
"detail/usm/clusm.cpp"
109-
"detail/usm/usm_dispatch.cpp"
110108
"detail/usm/usm_impl.cpp"
111109
"detail/util.cpp"
112110
"accessor.cpp"

sycl/source/detail/context_impl.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <detail/kernel_program_cache.hpp>
1818
#include <detail/platform_impl.hpp>
1919
#include <detail/program_manager/program_manager.hpp>
20-
#include <detail/usm/usm_dispatch.hpp>
2120

2221
#include <map>
2322
#include <memory>
@@ -152,7 +151,6 @@ class context_impl {
152151
bool MPluginInterop;
153152
bool MHostContext;
154153
bool MUseCUDAPrimaryContext;
155-
std::shared_ptr<usm::USMDispatcher> MUSMDispatch;
156154
std::map<DeviceLibExt, RT::PiProgram> MCachedLibPrograms;
157155
mutable KernelProgramCache MKernelProgramCache;
158156
};

sycl/source/detail/memory_manager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <detail/context_impl.hpp>
1111
#include <detail/event_impl.hpp>
1212
#include <detail/queue_impl.hpp>
13-
#include <detail/usm/usm_dispatch.hpp>
1413

1514
#include <algorithm>
1615
#include <cassert>

sycl/source/detail/platform_impl.cpp

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ struct DevDescT {
6565
int platformVerSize = 0;
6666
};
6767

68-
static std::vector<DevDescT> getWhiteListDesc() {
68+
static std::vector<DevDescT> getAllowListDesc() {
6969
const char *str = SYCLConfig<SYCL_DEVICE_ALLOWLIST>::get();
7070
if (!str)
7171
return {};
@@ -101,15 +101,13 @@ static std::vector<DevDescT> getWhiteListDesc() {
101101
}
102102

103103
if (':' != *str)
104-
throw sycl::runtime_error("Malformed device white list",
105-
PI_INVALID_VALUE);
104+
throw sycl::runtime_error("Malformed device allowlist", PI_INVALID_VALUE);
106105

107106
// Skip ':'
108107
str += 1;
109108

110109
if ('{' != *str || '{' != *(str + 1))
111-
throw sycl::runtime_error("Malformed device white list",
112-
PI_INVALID_VALUE);
110+
throw sycl::runtime_error("Malformed device allowlist", PI_INVALID_VALUE);
113111

114112
// Skip opening sequence "{{"
115113
str += 2;
@@ -121,8 +119,7 @@ static std::vector<DevDescT> getWhiteListDesc() {
121119
++str;
122120

123121
if ('\0' == *str)
124-
throw sycl::runtime_error("Malformed device white list",
125-
PI_INVALID_VALUE);
122+
throw sycl::runtime_error("Malformed device allowlist", PI_INVALID_VALUE);
126123

127124
*size = str - *valuePtr;
128125

@@ -136,20 +133,18 @@ static std::vector<DevDescT> getWhiteListDesc() {
136133
if ('|' == *str)
137134
decDescs.emplace_back();
138135
else if (',' != *str)
139-
throw sycl::runtime_error("Malformed device white list",
140-
PI_INVALID_VALUE);
136+
throw sycl::runtime_error("Malformed device allowlist", PI_INVALID_VALUE);
141137

142138
++str;
143139
}
144140

145141
return decDescs;
146142
}
147143

148-
static void filterWhiteList(vector_class<RT::PiDevice> &PiDevices,
149-
RT::PiPlatform PiPlatform,
150-
const plugin &Plugin) {
151-
const std::vector<DevDescT> WhiteList(getWhiteListDesc());
152-
if (WhiteList.empty())
144+
static void filterAllowList(vector_class<RT::PiDevice> &PiDevices,
145+
RT::PiPlatform PiPlatform, const plugin &Plugin) {
146+
const std::vector<DevDescT> AllowList(getAllowListDesc());
147+
if (AllowList.empty())
153148
return;
154149

155150
const string_class PlatformName =
@@ -170,7 +165,7 @@ static void filterWhiteList(vector_class<RT::PiDevice> &PiDevices,
170165
const string_class DeviceDriverVer = sycl::detail::get_device_info<
171166
string_class, info::device::driver_version>::get(Device, Plugin);
172167

173-
for (const DevDescT &Desc : WhiteList) {
168+
for (const DevDescT &Desc : AllowList) {
174169
if (nullptr != Desc.platformName &&
175170
!std::regex_match(PlatformName,
176171
std::regex(std::string(Desc.platformName,
@@ -229,9 +224,9 @@ platform_impl::get_devices(info::device_type DeviceType) const {
229224
pi::cast<RT::PiDeviceType>(DeviceType),
230225
NumDevices, PiDevices.data(), nullptr);
231226

232-
// Filter out devices that are not present in the white list
227+
// Filter out devices that are not present in the allowlist
233228
if (SYCLConfig<SYCL_DEVICE_ALLOWLIST>::get())
234-
filterWhiteList(PiDevices, MPlatform, this->getPlugin());
229+
filterAllowList(PiDevices, MPlatform, this->getPlugin());
235230

236231
std::transform(PiDevices.begin(), PiDevices.end(), std::back_inserter(Res),
237232
[this](const RT::PiDevice &PiDevice) -> device {

sycl/source/detail/queue_impl.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include <CL/sycl/detail/pi.hpp>
1313
#include <CL/sycl/device.hpp>
1414
#include <detail/queue_impl.hpp>
15-
#include <detail/usm/usm_dispatch.hpp>
1615

1716
#include <cstring>
1817

0 commit comments

Comments
 (0)